Commit 6e8e3325 authored by Mart Lubbers's avatar Mart Lubbers

remove gDefault from the iTask class collection

parent 01f019e4
Pipeline #27078 failed with stage
in 2 minutes and 3 seconds
......@@ -10,6 +10,4 @@ derive JSONEncode AnalogClock
derive JSONDecode AnalogClock
derive gEditor AnalogClock
derive gEq AnalogClock
derive gDefault AnalogClock
derive gText AnalogClock
......@@ -13,7 +13,6 @@ import StdEnv
derive JSONEncode AnalogClock
derive JSONDecode AnalogClock
derive gEq AnalogClock
derive gDefault AnalogClock
derive gText AnalogClock
gEditor{|AnalogClock|} = analogClockEditor
......
......@@ -51,7 +51,6 @@ instance < Date, Time, DateTime
derive JSONEncode Date, Time, DateTime
derive JSONDecode Date, Time, DateTime
derive gDefault Date, Time, DateTime
derive gEq Date, Time, DateTime
derive gText Date, Time, DateTime
derive gEditor Date, Time, DateTime
......
......@@ -23,7 +23,6 @@ instance toString FileException
//Necessary generics to be able to handle documents in tasks
derive JSONEncode Document
derive JSONDecode Document
derive gDefault Document
derive gEq Document
derive gText Document
derive gEditor Document
......
......@@ -31,7 +31,6 @@ where
derive JSONEncode Document
derive JSONDecode Document
derive gDefault Document
derive gEq Document
instance toString Document
......
......@@ -6,8 +6,14 @@ from Data.Set import :: Set
leafletEditor :: Editor LeafletMap
//Customization of editors
customLeafletEditor :: (LeafletEventHandlers s) -> Editor (LeafletMap, s) | iTask s
/*
* Customization of editors
*
* @param handlers
* @param initial value
* @result editor
*/
customLeafletEditor :: (LeafletEventHandlers s) s -> Editor (LeafletMap, s) | iTask s
:: LeafletMap =
......
......@@ -730,11 +730,11 @@ where
toggle (LeafletObjectID "cursor") xs = xs //The cursor can't be selected
toggle x xs = if (isMember x xs) (removeMember x xs) ([x:xs])
customLeafletEditor :: (LeafletEventHandlers s) -> Editor (LeafletMap, s) | iTask s
customLeafletEditor handlers = leafEditorToEditor (customLeafletEditor` handlers)
customLeafletEditor :: (LeafletEventHandlers s) s -> Editor (LeafletMap, s) | iTask s
customLeafletEditor handlers initial = leafEditorToEditor (customLeafletEditor` handlers initial)
customLeafletEditor` ::(LeafletEventHandlers s) -> LeafEditor [LeafletEdit] (LeafletMap,s) (LeafletMap,s) | iTask s
customLeafletEditor` handlers =
customLeafletEditor` ::(LeafletEventHandlers s) s -> LeafEditor [LeafletEdit] (LeafletMap,s) (LeafletMap,s) | iTask s
customLeafletEditor` handlers initial =
{ LeafEditor
| genUI = genUI
, onEdit = onEdit
......@@ -744,7 +744,7 @@ customLeafletEditor` handlers =
where
genUI attributes datapath mode vst = case leafletEditor`.LeafEditor.genUI attributes datapath (mapEditMode fst mode) vst of
(Error e, vst) = (Error e, vst)
(Ok (ui,mapState),vst) = (Ok (ui,(mapState,defaultValue)),vst)
(Ok (ui,mapState),vst) = (Ok (ui,(mapState, initial)),vst)
onEdit datapath edit (mapState,customState) vst = case leafletEditor`.LeafEditor.onEdit datapath edit mapState vst of
(Error e, vst) = (Error e, vst)
......@@ -778,6 +778,7 @@ instance == LeafletIconID where (==) (LeafletIconID x) (LeafletIconID y) = x ==
derive JSONEncode LeafletMap, LeafletPerspective, LeafletLatLng
derive JSONDecode LeafletMap, LeafletPerspective, LeafletLatLng
//derive gDefault LeafletMap, LeafletPerspective, LeafletLatLng
derive gDefault LeafletLatLng
derive gEq LeafletMap, LeafletPerspective
derive gText LeafletMap, LeafletPerspective, LeafletLatLng
......
definition module iTasks.Internal.Distributed.Symbols
from iTasks.WF.Definition import class iTask
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from Data.Maybe import :: Maybe
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
from iTasks.Internal.Generic.Visualization import :: TextFormat(..)
......
......@@ -9,6 +9,7 @@ from iTasks.UI.Definition import :: UIChange
from iTasks.UI.Editor import :: EditState
from iTasks.UI.Layout import :: LUI, :: LUIMoves, :: LUIMoveID, :: LUINo, :: LUIEffectStage
from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
from Data.GenDefault import generic gDefault
from Data.Map import :: Map
from Data.Maybe import :: Maybe
from Data.Queue import :: Queue
......@@ -35,6 +36,7 @@ derive JSONDecode TIMeta, TIType, TIReduct, TaskTree
//Identification and classification information
, attributes :: !TaskAttributes //Arbitrary meta-data
}
derive gDefault TIMeta
:: TIType
= TIStartup
......
......@@ -15,6 +15,8 @@ import Data.Error, Data.Either
derive JSONEncode TIMeta, TIType, TIValue, TIReduct, TaskTree, ParallelTaskState, ParallelTaskChange, TaskResult, TaskEvalInfo, TonicOpts, CircularStack, AsyncAction
derive JSONDecode TIMeta, TIType, TIValue, TIReduct, TaskTree, ParallelTaskState, ParallelTaskChange, TaskResult, TaskEvalInfo, TonicOpts, CircularStack, AsyncAction
derive gDefault TIMeta, InstanceProgress, TIType, TaskId, ValueStatus
instance toString DeferredJSON where
toString (DeferredJSON x) = toString $ toJSON x
toString (DeferredJSONNode json) = toString json
......
......@@ -29,6 +29,7 @@ from System.Time import :: Timestamp
, includeProgress :: !Bool
, includeAttributes :: !Bool
}
derive gDefault InstanceFilter
:: InstanceData :== (!InstanceNo,!Maybe InstanceConstants,!Maybe InstanceProgress,!Maybe TaskAttributes)
......
......@@ -37,7 +37,8 @@ derive JSONEncode Queue, Event
derive JSONDecode TaskOutputMessage, TaskResult, TaskEvalInfo, TIValue, ParallelTaskState, ParallelTaskChange, TIUIState
derive JSONDecode Queue, Event
derive gDefault TIMeta, TIType
derive gDefault InstanceFilter
derive gEq ParallelTaskChange, TaskOutputMessage
derive gText ParallelTaskChange
derive class iTask InstanceFilter
......
......@@ -4,7 +4,7 @@ definition module iTasks.SDS.Combinators.Common
*/
import iTasks.SDS.Definition
from iTasks.WF.Definition import :: TaskException, :: TaskValue, :: TaskId, :: TaskAttributes, :: InstanceProgress, class iTask
from iTasks.WF.Definition import generic gEditor, generic gEq, generic gDefault, generic gText, generic JSONEncode, generic JSONDecode
from iTasks.WF.Definition import generic gEditor, generic gEq, generic gText, generic JSONEncode, generic JSONDecode
from iTasks.WF.Combinators.Core import :: TaskList, :: TaskListFilter, :: TaskListItem, :: SharedTaskList
from iTasks.Internal.Generic.Visualization import :: TextFormat
from iTasks.UI.Editor import :: Editor
......
......@@ -10,7 +10,7 @@ from Text.GenJSON import :: JSONNode
from System.Time import :: Timespec
from iTasks.WF.Definition import class iTask
from iTasks.WF.Definition import generic gEditor, generic gEq, generic gDefault, generic gText, generic JSONEncode, generic JSONDecode
from iTasks.WF.Definition import generic gEditor, generic gEq, generic gText, generic JSONEncode, generic JSONDecode
from iTasks.UI.Editor import :: Editor
from iTasks.Internal.Generic.Visualization import :: TextFormat
......@@ -30,4 +30,4 @@ sdsParallel :: !String !(p -> (p1,p2)) !((r1,r2) -> r) !(SDSLensWrite p w r1 w1)
sdsSequence :: !String !(p -> p1) !(p r1 -> p2) (p r1 -> Either r ((r1,r2) -> r)) !(SDSLensWrite p w r1 w1) !(SDSLensWrite p w r2 w2) !(sds1 p1 r1 w1) !(sds2 p2 r2 w2) -> SDSSequence p r w | gText{|*|} p1 & TC p1 & gText{|*|} p2 & TC p2 & TC r1 & TC r2 & TC w1 & TC w2 & RWShared sds1 & RWShared sds2
// Create a cached version of an SDS
sdsCache:: (p (Maybe r) (Maybe w) w -> (Maybe r, SDSCacheWrite)) (SDSSource p r w) -> SDSCache p r w | iTask p & TC r & TC w
\ No newline at end of file
sdsCache:: (p (Maybe r) (Maybe w) w -> (Maybe r, SDSCacheWrite)) (SDSSource p r w) -> SDSCache p r w | iTask p & TC r & TC w
......@@ -110,7 +110,7 @@ where
= step
(t st)
id
[ OnValue $ ifStable \st` -> get (sdsFocus {gDefault{|*|} & onlySelf=True} tlist) >>- \(_, [{TaskListItem|taskId}]) ->
[ OnValue $ ifStable \st` -> get (sdsFocus {defaultValue & onlySelf=True} tlist) >>- \(_, [{TaskListItem|taskId}]) ->
appendTask Embedded (par st` (Just taskId)) tlist @! st`
]
......
......@@ -64,6 +64,7 @@ ActionClose :== Action "Close"
, includeAttributes :: !Bool
, includeProgress :: !Bool
}
derive gDefault TaskListFilter
/**
* State of another task instance.
......
......@@ -66,6 +66,7 @@ derive gEq ParallelTaskChange
, includeAttributes :: !Bool
, includeProgress :: !Bool
}
derive gDefault TaskListFilter, TaskId
instance toString AttachException
where
......
......@@ -17,7 +17,6 @@ from System.Time import :: Timestamp, :: Timespec
from iTasks.UI.Editor import :: Editor
from iTasks.UI.Editor.Generic import generic gEditor
from iTasks.Internal.Generic.Visualization import generic gText, :: TextFormat
from iTasks.Internal.Generic.Defaults import generic gDefault
from Text.GenJSON import generic JSONEncode, generic JSONDecode
from Data.GenEq import generic gEq
from StdString import class toString, class fromString
......@@ -117,7 +116,6 @@ class iTask a
, JSONEncode{|*|}
, JSONDecode{|*|}
//Data
, gDefault{|*|}
, gEq{|*|}
, TC a
......@@ -20,11 +20,9 @@ from Text.HTML import :: SVGStrokeDashArray, :: SVGStrokeDashOffset, :: SVGStrok
//Common library types
derive gEq (->), Dynamic
derive gDefault HtmlAttr
derive gEditor HtmlAttr
derive gText HtmlAttr
derive gDefault SVGElt, SVGAttr, SVGAlign, SVGColor, SVGDefer, SVGFillOpacity, SVGFuncIRI, SVGLengthAdjust, SVGLengthUnit, SVGLineCap, SVGFillRule, SVGLineJoin, SVGMeetOrSlice, SVGStrokeMiterLimit, SVGPaint, SVGStrokeDashArray, SVGStrokeDashOffset, SVGStrokeWidth, SVGTransform, SVGZoomAndPan
derive gEditor SVGElt, SVGAttr, SVGAlign, SVGColor, SVGDefer, SVGFillOpacity, SVGFuncIRI, SVGLengthAdjust, SVGLengthUnit, SVGLineCap, SVGFillRule, SVGLineJoin, SVGMeetOrSlice, SVGStrokeMiterLimit, SVGPaint, SVGStrokeDashArray, SVGStrokeDashOffset, SVGStrokeWidth, SVGTransform, SVGZoomAndPan
derive gText SVGElt, SVGAttr, SVGAlign, SVGColor, SVGDefer, SVGFillOpacity, SVGFuncIRI, SVGLengthAdjust, SVGLengthUnit, SVGLineCap, SVGFillRule, SVGLineJoin, SVGMeetOrSlice, SVGStrokeMiterLimit, SVGPaint, SVGStrokeDashArray, SVGStrokeDashOffset, SVGStrokeWidth, SVGTransform, SVGZoomAndPan
......@@ -36,7 +34,6 @@ derive class iTask TaskId, TaskListFilter, AttachmentStatus
derive JSONEncode TaskValue, TaskListItem, InstanceConstants, InstanceProgress, ValueStatus, TaskInstance, Action, Timespec, ClockParameter
derive JSONDecode TaskValue, TaskListItem, InstanceConstants, InstanceProgress, ValueStatus, TaskInstance, Action, Timespec, ClockParameter
derive gDefault TaskValue, TaskListItem, InstanceConstants, InstanceProgress, ValueStatus, TaskInstance, Action, ClockParameter
derive gEq TaskValue, TaskListItem, InstanceConstants, InstanceProgress, ValueStatus, TaskInstance, Action, Timespec, ClockParameter
derive gText TaskValue, TaskListItem, InstanceConstants, InstanceProgress, ValueStatus, TaskInstance, Action
......
......@@ -20,16 +20,13 @@ gEq{|Dynamic|} _ _ = False // dynamics are never equal
gEditor{|{}|} _ _ tjx fjx = emptyEditorWithDefaultInEnterMode_ (JSONEncode{|* -> *|} tjx) (JSONDecode{|* -> *|} fjx) {}
gText{|{}|} _ _ _ = []
derive gDefault SVGElt, SVGAttr, SVGAlign, SVGColor, SVGDefer, SVGFillOpacity, SVGFuncIRI, SVGLengthAdjust, SVGLengthUnit, SVGLineCap, SVGFillRule, SVGLineJoin, SVGMeetOrSlice, SVGStrokeMiterLimit, SVGPaint, SVGStrokeDashArray, SVGStrokeDashOffset, SVGStrokeWidth, SVGTransform, SVGZoomAndPan
derive gEditor SVGElt, SVGAttr, SVGAlign, SVGColor, SVGDefer, SVGFillOpacity, SVGFuncIRI, SVGLengthAdjust, SVGLengthUnit, SVGLineCap, SVGFillRule, SVGLineJoin, SVGMeetOrSlice, SVGStrokeMiterLimit, SVGPaint, SVGStrokeDashArray, SVGStrokeDashOffset, SVGStrokeWidth, SVGTransform, SVGZoomAndPan
derive gText SVGElt, SVGAttr, SVGAlign, SVGColor, SVGDefer, SVGFillOpacity, SVGFuncIRI, SVGLengthAdjust, SVGLengthUnit, SVGLineCap, SVGFillRule, SVGLineJoin, SVGMeetOrSlice, SVGStrokeMiterLimit, SVGPaint, SVGStrokeDashArray, SVGStrokeDashOffset, SVGStrokeWidth, SVGTransform, SVGZoomAndPan
derive gDefault HtmlAttr
derive gEditor HtmlAttr
derive gText HtmlAttr
derive JSONEncode TaskValue, InstanceConstants, InstanceType, InstanceProgress, ValueStatus, TaskInstance, TaskListItem, Action, Timespec, ClockParameter
derive JSONDecode TaskValue, InstanceConstants, InstanceType, InstanceProgress, ValueStatus, TaskInstance, TaskListItem, Action, Timespec, ClockParameter
derive gDefault TaskValue, TaskListItem, InstanceConstants, InstanceType, InstanceProgress, ValueStatus, TaskInstance, Action, ClockParameter
derive gEq TaskValue, InstanceConstants, InstanceProgress, InstanceType, ValueStatus, TaskInstance, TaskListItem, Action, Timespec, ClockParameter
derive gText TaskValue, InstanceConstants, InstanceType, InstanceProgress, ValueStatus, TaskInstance, TaskListItem, Action
derive gEditor TaskValue, InstanceConstants, InstanceType, InstanceProgress, ValueStatus, TaskInstance, TaskListItem, Action, Timespec, ClockParameter
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment