]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.diagram.ontology/graph/Diagram.pgraph
Configurable connection crossing styles
[simantics/platform.git] / bundles / org.simantics.diagram.ontology / graph / Diagram.pgraph
index 7b7bb6b2e2d7eca5b83bcc764733423b8c385e4e..6ea207f88d754cd59825b9c2e533fadc6190cb4a 100644 (file)
@@ -9,6 +9,11 @@ DIA = <http://www.simantics.org/Diagram-2.2> : L0.Ontology
     @L0.new
     L0.HasResourceClass "org.simantics.diagram.stubs.DiagramResource"
 
     @L0.new
     L0.HasResourceClass "org.simantics.diagram.stubs.DiagramResource"
 
+DIA.SCLMain : L0.SCLModule
+    L0.SCLModule.definition """
+        include "Simantics/Diagram/Internal/DiagramOntologyEntryPoint"
+        """
+
 //// Import / Export
 
 DIA.DiagramSubgraphExtent : L0X.SubgraphExtent
 //// Import / Export
 
 DIA.DiagramSubgraphExtent : L0X.SubgraphExtent
@@ -41,6 +46,8 @@ DIA.Element <T STR.Component : DIA.ElementClass
       L0.HasLabel "Hide Profile Monitors?"
     >-- DIA.Element.upProfileMonitors --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
       L0.HasLabel "Grow Profile Monitors Upward?"
       L0.HasLabel "Hide Profile Monitors?"
     >-- DIA.Element.upProfileMonitors --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
       L0.HasLabel "Grow Profile Monitors Upward?"
+    
+DIA.symbolFunction <R L0.HasProperty : L0.FunctionalRelation
 
 DIA.DiagramContainer <T L0.Entity
     @L0.singleProperty L0.HasName
 
 DIA.DiagramContainer <T L0.Entity
     @L0.singleProperty L0.HasName
@@ -61,8 +68,11 @@ DIA.IOTableRename <T L0.Entity
 DIA.Diagram <T DIA.Composite
     >-- DIA.Diagram.IOTableRenaming --> DIA.IOTableRename <T L0.DependsOn 
     @L0.optionalProperty DIA.HasModCount
 DIA.Diagram <T DIA.Composite
     >-- DIA.Diagram.IOTableRenaming --> DIA.IOTableRename <T L0.DependsOn 
     @L0.optionalProperty DIA.HasModCount
+    @L0.assert DIA.ConnectionCrossingStyle ""
+    @L0.assert DIA.ConnectionCrossingStyle.Width 0.0
+    @L0.assert DIA.ConnectionCrossingStyle.HasType DIA.ConnectionCrossingStyle.Type.None
 
 
-DIA.HasModCount <R L0.HasProperty
+DIA.HasModCount <R L0.HasProperty : L0.FunctionalRelation
     L0.HasLabel "Modification Counter"
     L0.HasDescription "A counter for modifications performed on the property owner resource. Used for naming elements with running number IDs."
     L0.HasDomain DIA.Composite
     L0.HasLabel "Modification Counter"
     L0.HasDescription "A counter for modifications performed on the property owner resource. Used for naming elements with running number IDs."
     L0.HasDomain DIA.Composite
@@ -112,11 +122,17 @@ DIA.Functions.activeProfileModifier : L0.Function
     L0.HasValueType "String -> String"
 DIA.Functions.diagramElementIssuePath : L0.Function
 
     L0.HasValueType "String -> String"
 DIA.Functions.diagramElementIssuePath : L0.Function
 
+DIA.DefinedElement.Parameter <T L0.PropertyRelation <T L0.FunctionalRelation
+
 DIA.DefinedElement
   // RequiresValueType ]is omitted during transition period.
   // Used to be ==> "[String]" but DIA.symbolCode now returns either "[String]" or "[G2DNodeModification]" directly
   >-- DIA.symbolCode <R L0.HasProperty : L0.FunctionalRelation
   >-- DIA.symbolDropHandler ==> "[WorkbenchSelectionElement] -> <WriteGraph,Proc> ()" <R L0.HasProperty : L0.FunctionalRelation
 DIA.DefinedElement
   // RequiresValueType ]is omitted during transition period.
   // Used to be ==> "[String]" but DIA.symbolCode now returns either "[String]" or "[G2DNodeModification]" directly
   >-- DIA.symbolCode <R L0.HasProperty : L0.FunctionalRelation
   >-- DIA.symbolDropHandler ==> "[WorkbenchSelectionElement] -> <WriteGraph,Proc> ()" <R L0.HasProperty : L0.FunctionalRelation
+  // Parameters are id of edited element and new text.
+  >-- DIA.DefinedElement.textEditor ==> "SVGMeasurementContext -> String -> String -> <Proc> ()" <R L0.HasProperty : DIA.DefinedElement.Parameter
+  // This function gives initial text for the text editor. Parameter is the id of the edited element.
+  >-- DIA.DefinedElement.textEditorFullText ==> "String -> <Proc> String" <R L0.HasProperty : DIA.DefinedElement.Parameter 
 
 DIA.DiagramActivityCondition <T L0.Entity
   --> DIA.DiagramActivityCondition.test ==> "Resource -> <ReadGraph> String" <R L0.HasProperty : L0.FunctionalRelation 
 
 DIA.DiagramActivityCondition <T L0.Entity
   --> DIA.DiagramActivityCondition.test ==> "Resource -> <ReadGraph> String" <R L0.HasProperty : L0.FunctionalRelation 
@@ -130,4 +146,31 @@ DIA.diagramActivityCondition : L0.Template
 
 DIA.ProfileEntryContribution <T L0.Entity
   --> DIA.ProfileEntryContribution.HasEntry --> DIA.ProfileEntry <R L0.IsRelatedTo  
 
 DIA.ProfileEntryContribution <T L0.Entity
   --> DIA.ProfileEntryContribution.HasEntry --> DIA.ProfileEntry <R L0.IsRelatedTo  
-                
\ No newline at end of file
+
+DIA.ConnectionCrossingStyle <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
+    L0.HasLabel "Connection Crossing Style"
+    SEL.HasDisplayValue ""
+    L0.readOnly true
+    SEL.canBeLifted false
+
+DIA.ConnectionCrossingStyle.Width <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
+    L0.HasLabel "Width"
+    L0.HasDescription "Width of connection crossings."
+    L0.HasDomain DIA.Diagram
+    L0.HasRange L0.Double
+    SEL.IsShownUnder DIA.ConnectionCrossingStyle
+
+DIA.ConnectionCrossingStyle.HasType <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
+    L0.HasLabel "Type"
+    L0.HasDescription "Type of connection crossings."
+    L0.HasDomain DIA.Diagram
+    L0.HasRange DIA.ConnectionCrossingStyle.Type
+    SEL.IsShownUnder DIA.ConnectionCrossingStyle
+
+DIA.ConnectionCrossingStyle.Type <T L0.Value
+    @L0.tag L0.Enumeration
+
+DIA.ConnectionCrossingStyle.Type.Arc : DIA.ConnectionCrossingStyle.Type
+DIA.ConnectionCrossingStyle.Type.Square : DIA.ConnectionCrossingStyle.Type
+DIA.ConnectionCrossingStyle.Type.Gap : DIA.ConnectionCrossingStyle.Type
+DIA.ConnectionCrossingStyle.Type.None : DIA.ConnectionCrossingStyle.Type
\ No newline at end of file