]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.document.base.ontology/graph/Components.pgraph
ValueType modifications to satisfy compilation of SCL-expressions
[simantics/platform.git] / bundles / org.simantics.document.base.ontology / graph / Components.pgraph
index 5fa11e906f7433e02c585926695e3e1a710dd15a..8c03f41c5e9935fd4d47c485460040e102ffd999 100644 (file)
@@ -21,13 +21,13 @@ connectionPoint = COMPONENTS.connectionPoint : L0.Template
             >-- %relation    
 
 sclAttribute = COMPONENTS.sclAttribute : L0.Template
-    @template %subject %relation %command
+    @template %subject %relation %command %valueType
         %subject
             >-- %relation
             L0.Asserts _ : L0.Assertion
                 L0.HasPredicate %relation
                 L0.HasObject _ : DOC.SCLValue
-                  L0.HasValueType "String"
+                  L0.HasValueType %valueType
                   L0.SCLValue.expression %command
                   L0.default false
 
@@ -49,6 +49,7 @@ DOC.sclValue : L0.Template
             L0.HasValueType %valueType
 
 DOC.SCLValue <T L0.SCLValue
+  @L0.scl L0.SCLValueType.validator """\self -> compileDocumentSCLValueExpression self""" "Variable -> <ReadGraph> String"
   @L0.assert L0.ConvertsToValueWith
     DOC.Functions.sclValue : L0.ExternalValue
 
@@ -59,13 +60,12 @@ COMPONENTS.Component <T STR.Component
     @attribute PROPERTIES.session FUNCTIONS.session
     @attribute PROPERTIES.state FUNCTIONS.state
     @attribute PROPERTIES.icstate FUNCTIONS.icstate
-    @sclAttribute PROPERTIES.commands "commandList self"
+    @sclAttribute PROPERTIES.commands "commandList self" "[Command]"
 
 COMPONENTS.PrimitiveComponent <T COMPONENTS.Component
     @L0.assert PROPERTIES.primitiveProperties
       _ : L0.Value
         L0.domainProperties FUNCTIONS.primitiveProperties
-        
 
 COMPONENTS.ParentlessComponent <T COMPONENTS.PrimitiveComponent /* Component without a parent, e.g. Root, DialogBox */
 
@@ -84,8 +84,8 @@ COMPONENTS.Event <T COMPONENTS.ParentlessComponent
  
 COMPONENTS.CommandEvent <T COMPONENTS.Event
    @connectionPoint RELATIONS.data1
-   @sclAttribute PROPERTIES.dataDefinitions "dataDefinitions self"   
-   @sclAttribute PROPERTIES.SCLFunction "emptyOnClick ()"
+   @sclAttribute PROPERTIES.dataDefinitions "dataDefinitions self" "[DataDefinition]"
+   @sclAttribute PROPERTIES.SCLFunction "emptyOnClick ()" "String"
 
 DOC.commandEvent : L0.Template
     @template %instance %expression %valueType