--- /dev/null
+L0 = <http://www.simantics.org/Layer0-1.0>\r
+L0X = <http://www.simantics.org/Layer0X-1.0>\r
+DIA = <http://www.simantics.org/Diagram-2.0>\r
+SYSDYN = <http://www.simantics.org/Sysdyn-1.0>\r
+\r
+PROFILES = SYSDYN.Profiles : L0.Library\r
+\r
+\r
+// TEMPLATE\r
+groupStyleEntry : L0.Template\r
+ @template %subject %style %group\r
+ %subject : DIA.GroupStyleProfileEntry\r
+ DIA.ProfileEntry.HasStyle %style\r
+ DIA.ProfileEntry.HasGroup %group\r
+\r
+ \r
+SYSDYN.SimulationPlaybackStyle : DIA.Style\r
+\r
+SYSDYN.AllElementsGroup : DIA.TypeGroup\r
+ L0.HasLabel "Element"\r
+ DIA.HasType DIA.Element\r
+\r
+PROFILES.SimulationPlaybackColours\r
+ L0.HasLabel "Playback colours"\r
+ @groupStyleEntry SYSDYN.SimulationPlaybackStyle SYSDYN.AllElementsGroup
\ No newline at end of file
\r
public final Resource AdditionalSymbols;\r
public final Resource AdditionalSymbols_Text;\r
+ public final Resource AllElementsGroup;\r
public final Resource ArrayIndexes;\r
public final Resource ArrayIndexes_Inverse;\r
public final Resource Auxiliary;\r
public final Resource ParameterExpression;\r
public final Resource Polarity;\r
public final Resource Polarity_Inverse;\r
+ public final Resource Profiles;\r
+ public final Resource Profiles_SimulationPlaybackColours;\r
public final Resource ProjectActionContext;\r
public final Resource ProjectActionContext_Actions;\r
public final Resource ProjectActionContext_Actions_NewEnumeration;\r
public final Resource ShowEnumerationIndexInCharts;\r
public final Resource ShowEnumerationIndexInCharts_Inverse;\r
public final Resource SimulateOnChangeExperiment;\r
+ public final Resource SimulationPlaybackStyle;\r
public final Resource Stock;\r
public final Resource StockExpression;\r
public final Resource StockSymbol;\r
public static class URIs {\r
public static final String AdditionalSymbols = "http://www.simantics.org/Sysdyn-1.0/AdditionalSymbols";\r
public static final String AdditionalSymbols_Text = "http://www.simantics.org/Sysdyn-1.0/AdditionalSymbols/Text";\r
+ public static final String AllElementsGroup = "http://www.simantics.org/Sysdyn-1.0/AllElementsGroup";\r
public static final String ArrayIndexes = "http://www.simantics.org/Sysdyn-1.0/ArrayIndexes";\r
public static final String ArrayIndexes_Inverse = "http://www.simantics.org/Sysdyn-1.0/ArrayIndexes/Inverse";\r
public static final String Auxiliary = "http://www.simantics.org/Sysdyn-1.0/Auxiliary";\r
public static final String ParameterExpression = "http://www.simantics.org/Sysdyn-1.0/ParameterExpression";\r
public static final String Polarity = "http://www.simantics.org/Sysdyn-1.0/Polarity";\r
public static final String Polarity_Inverse = "http://www.simantics.org/Sysdyn-1.0/Polarity/Inverse";\r
+ public static final String Profiles = "http://www.simantics.org/Sysdyn-1.0/Profiles";\r
+ public static final String Profiles_SimulationPlaybackColours = "http://www.simantics.org/Sysdyn-1.0/Profiles/SimulationPlaybackColours";\r
public static final String ProjectActionContext = "http://www.simantics.org/Sysdyn-1.0/ProjectActionContext";\r
public static final String ProjectActionContext_Actions = "http://www.simantics.org/Sysdyn-1.0/ProjectActionContext/Actions";\r
public static final String ProjectActionContext_Actions_NewEnumeration = "http://www.simantics.org/Sysdyn-1.0/ProjectActionContext/Actions/NewEnumeration";\r
public static final String ShowEnumerationIndexInCharts = "http://www.simantics.org/Sysdyn-1.0/ShowEnumerationIndexInCharts";\r
public static final String ShowEnumerationIndexInCharts_Inverse = "http://www.simantics.org/Sysdyn-1.0/ShowEnumerationIndexInCharts/Inverse";\r
public static final String SimulateOnChangeExperiment = "http://www.simantics.org/Sysdyn-1.0/SimulateOnChangeExperiment";\r
+ public static final String SimulationPlaybackStyle = "http://www.simantics.org/Sysdyn-1.0/SimulationPlaybackStyle";\r
public static final String Stock = "http://www.simantics.org/Sysdyn-1.0/Stock";\r
public static final String StockExpression = "http://www.simantics.org/Sysdyn-1.0/StockExpression";\r
public static final String StockSymbol = "http://www.simantics.org/Sysdyn-1.0/StockSymbol";\r
public SysdynResource(ReadGraph graph) {\r
AdditionalSymbols = getResourceOrNull(graph, URIs.AdditionalSymbols);\r
AdditionalSymbols_Text = getResourceOrNull(graph, URIs.AdditionalSymbols_Text);\r
+ AllElementsGroup = getResourceOrNull(graph, URIs.AllElementsGroup);\r
ArrayIndexes = getResourceOrNull(graph, URIs.ArrayIndexes);\r
ArrayIndexes_Inverse = getResourceOrNull(graph, URIs.ArrayIndexes_Inverse);\r
Auxiliary = getResourceOrNull(graph, URIs.Auxiliary);\r
ParameterExpression = getResourceOrNull(graph, URIs.ParameterExpression);\r
Polarity = getResourceOrNull(graph, URIs.Polarity);\r
Polarity_Inverse = getResourceOrNull(graph, URIs.Polarity_Inverse);\r
+ Profiles = getResourceOrNull(graph, URIs.Profiles);\r
+ Profiles_SimulationPlaybackColours = getResourceOrNull(graph, URIs.Profiles_SimulationPlaybackColours);\r
ProjectActionContext = getResourceOrNull(graph, URIs.ProjectActionContext);\r
ProjectActionContext_Actions = getResourceOrNull(graph, URIs.ProjectActionContext_Actions);\r
ProjectActionContext_Actions_NewEnumeration = getResourceOrNull(graph, URIs.ProjectActionContext_Actions_NewEnumeration);\r
ShowEnumerationIndexInCharts = getResourceOrNull(graph, URIs.ShowEnumerationIndexInCharts);\r
ShowEnumerationIndexInCharts_Inverse = getResourceOrNull(graph, URIs.ShowEnumerationIndexInCharts_Inverse);\r
SimulateOnChangeExperiment = getResourceOrNull(graph, URIs.SimulateOnChangeExperiment);\r
+ SimulationPlaybackStyle = getResourceOrNull(graph, URIs.SimulationPlaybackStyle);\r
Stock = getResourceOrNull(graph, URIs.Stock);\r
StockExpression = getResourceOrNull(graph, URIs.StockExpression);\r
StockSymbol = getResourceOrNull(graph, URIs.StockSymbol);\r
org.simantics.selectionview;bundle-version="1.0.0",
org.simantics.issues;bundle-version="1.1.0",
org.simantics.issues.ui;bundle-version="1.1.0",
- org.simantics.issues.common;bundle-version="1.1.0"
+ org.simantics.issues.common;bundle-version="1.1.0",
+ org.simantics.scenegraph.profile;bundle-version="1.0.0"
Bundle-Activator: org.simantics.sysdyn.ui.Activator
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.sysdyn.ui.browser.nodes
VTT Technical Research Centre of Finland - initial API and implementation\r
-->\r
-<adapters>\r\r <target interface="org.simantics.db.layer0.adapter.Realization">\r <type uri="http://www.simantics.org/Sysdyn-1.0/Module"\r class="org.simantics.structural2.realization.StructuralRealization">\r <this />\r </type>\r </target>\r\r<!-- \r <target interface="org.simantics.db.layer0.variable.Variable">\r <type uri="http://www.simantics.org/Sysdyn-1.0/HistoryRealization"\r class="org.simantics.sysdyn.ui.project.HistoryVariable" >\r <this />\r </type>\r <type uri="http://www.simantics.org/Sysdyn-1.0/DefaultRealization"\r class="org.simantics.sysdyn.ui.project.DefaultVariable" >\r <this />\r </type>\r </target>\r -->\r\r <target interface="org.simantics.layer0.utils.triggers.ITrigger">\r <type uri = "http://www.simantics.org/Sysdyn-1.0/DiagramToCompositeMapping"\r class = "org.simantics.sysdyn.ui.editor.DiagramToCompositeMapping3">\r <graph/>\r <this />\r </type>\r </target>\r \r <target interface="org.simantics.structural.ui.modelBrowser.nodes.AbstractNode">\r <type uri="http://www.simantics.org/Sysdyn-1.0/SysdynModel"\r class="org.simantics.structural.ui.modelBrowser.nodes.ModelNode">\r <this />\r </type>\r </target> \r \r\r <target\r interface="org.simantics.browsing.ui.common.node.AbstractNode">\r <type\r uri="http://www.simantics.org/Sysdyn-1.0/SysdynModel"\r class="org.simantics.sysdyn.ui.browser.nodes.ModelNode">\r <this />\r </type>\r\r <resource\r uri="http://www.simantics.org/Sysdyn-1.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.browser.nodes.SymbolNode">\r <this />\r </resource>\r\r <type\r uri="http://www.simantics.org/Simulation-1.0/Experiment"\r class="org.simantics.sysdyn.ui.browser.nodes.ExperimentNode">\r <this />\r </type>\r \r <type\r uri="http://www.simantics.org/Sysdyn-1.0/Result"\r class="org.simantics.sysdyn.ui.browser.nodes.SimulationResultNode">\r <this />\r </type>\r \r </target>\r\r <!-- Inject default connection routing algorithm for sysdyn diagrams -->\r <target interface="org.simantics.g2d.diagram.DiagramClass">\r <adapter uri="http://www.simantics.org/Sysdyn-1.0/ConfigurationDiagram"\r adapterClass="org.simantics.sysdyn.ui.elements2.ConfigurationDiagramClassAdapter" />\r </target>\r\r <!-- Sysdyn symbols -->\r <target interface="org.simantics.diagram.adapter.ElementFactory">\r <resource uri="http://www.simantics.org/Sysdyn-1.0/StockSymbol"\r class="org.simantics.sysdyn.ui.elements2.StockFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.elements2.ModuleFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ValveSymbol"\r class="org.simantics.sysdyn.ui.elements2.ValveFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/AuxiliarySymbol"\r class="org.simantics.sysdyn.ui.elements2.AuxiliaryFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/CloudSymbol"\r class="org.simantics.sysdyn.ui.elements2.CloudFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/InputSymbol"\r class="org.simantics.sysdyn.ui.elements2.InputFactory" />\r\r <type uri="http://www.simantics.org/Sysdyn-1.0/StockSymbol"\r class="org.simantics.sysdyn.ui.elements2.StockFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.elements2.ModuleFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/ValveSymbol"\r class="org.simantics.sysdyn.ui.elements2.ValveFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/AuxiliarySymbol"\r class="org.simantics.sysdyn.ui.elements2.AuxiliaryFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/CloudSymbol"\r class="org.simantics.sysdyn.ui.elements2.CloudFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/InputSymbol"\r class="org.simantics.sysdyn.ui.elements2.InputFactory" /> \r </target>\r \r <!-- Sysdyn connections -->\r <target interface="org.simantics.diagram.adapter.ElementFactory">\r <!-- Edges -->\r <resource uri="http://www.simantics.org/Sysdyn-1.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.FlowEdgeFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.DependencyEdgeFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.FlowEdgeFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.DependencyEdgeFactory" />\r <!-- : SYSDYN.Connection-->\r <type uri="http://www.simantics.org/Sysdyn-1.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.FlowConnectionFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.DependencyConnectionFactory" />\r </target>\r \r <target interface="org.simantics.g2d.connection.EdgeVisualsConfigurer">\r <baseType uri="http://www.simantics.org/Diagram-2.0/HasConnector" />\r <resource uri="http://www.simantics.org/Diagram-2.0/HasPlainConnector"\r class="org.simantics.diagram.content.ArrowConfigurer">\r <string>none 0</string>\r </resource>\r <resource uri="http://www.simantics.org/Diagram-2.0/HasArrowConnector"\r class="org.simantics.diagram.content.ArrowConfigurer">\r <string>fill 1</string>\r </resource>\r </target>\r \r <!-- ModelBrowser2 -->\r \r <target interface="org.simantics.browsing.ui.model.children.ChildRule">\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectBrowseContext/ModuleTypeChildRule"\r class="org.simantics.sysdyn.ui.browser.childrules.ModuleTypeChildRule"/>\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectBrowseContext/ModuleContentChildRule"\r class="org.simantics.sysdyn.ui.browser.childrules.ModuleContentChildRule"/> \r </target>\r \r <target interface="org.simantics.browsing.ui.model.visuals.VisualsRule">\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectBrowseContext/ModuleTypeLabelRule"\r class="org.simantics.sysdyn.ui.browser.labelrules.ModuleTypeLabelRule"/>\r </target> \r \r <target interface="org.simantics.db.layer0.adapter.ActionFactory">\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectActionContext/Actions/NewModuleType"\r class="org.simantics.sysdyn.ui.browser.actions.NewModuleTypeAction" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectActionContext/Actions/NewEnumeration"\r class="org.simantics.sysdyn.ui.browser.actions.NewEnumerationAction" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectActionContext/Actions/OpenWorkbook"\r class="org.simantics.sysdyn.ui.browser.actions.OpenWorkbookAction" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectActionContext/Actions/NewFunction"\r class="org.simantics.sysdyn.ui.browser.actions.NewFunctionAction" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectActionContext/Actions/NewFunctionLibrary"\r class="org.simantics.sysdyn.ui.browser.actions.NewFunctionLibraryAction" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectActionContext/Actions/NewSharedFunctionLibrary"\r class="org.simantics.sysdyn.ui.browser.actions.NewSharedFunctionLibraryAction" /> \r </target> \r \r \r <!-- ISSUES\r <target interface="org.simantics.db.layer0.adapter.IssueSource">\r <resource\r uri="http://www.simantics.org/Sysdyn-1.0/Validations/DependencyConnections"\r class="org.simantics.sysdyn.ui.validation.DependencyIssueSource">\r <graph/>\r <this />\r </resource>\r </target>\r -->\r
+<adapters>\r\r <target interface="org.simantics.db.layer0.adapter.Realization">\r <type uri="http://www.simantics.org/Sysdyn-1.0/Module"\r class="org.simantics.structural2.realization.StructuralRealization">\r <this />\r </type>\r </target>\r\r<!-- \r <target interface="org.simantics.db.layer0.variable.Variable">\r <type uri="http://www.simantics.org/Sysdyn-1.0/HistoryRealization"\r class="org.simantics.sysdyn.ui.project.HistoryVariable" >\r <this />\r </type>\r <type uri="http://www.simantics.org/Sysdyn-1.0/DefaultRealization"\r class="org.simantics.sysdyn.ui.project.DefaultVariable" >\r <this />\r </type>\r </target>\r -->\r\r <target interface="org.simantics.layer0.utils.triggers.ITrigger">\r <type uri = "http://www.simantics.org/Sysdyn-1.0/DiagramToCompositeMapping"\r class = "org.simantics.sysdyn.ui.editor.DiagramToCompositeMapping3">\r <graph/>\r <this />\r </type>\r </target>\r \r <target interface="org.simantics.structural.ui.modelBrowser.nodes.AbstractNode">\r <type uri="http://www.simantics.org/Sysdyn-1.0/SysdynModel"\r class="org.simantics.structural.ui.modelBrowser.nodes.ModelNode">\r <this />\r </type>\r </target> \r \r\r <target\r interface="org.simantics.browsing.ui.common.node.AbstractNode">\r <type\r uri="http://www.simantics.org/Sysdyn-1.0/SysdynModel"\r class="org.simantics.sysdyn.ui.browser.nodes.ModelNode">\r <this />\r </type>\r\r <resource\r uri="http://www.simantics.org/Sysdyn-1.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.browser.nodes.SymbolNode">\r <this />\r </resource>\r\r <type\r uri="http://www.simantics.org/Simulation-1.0/Experiment"\r class="org.simantics.sysdyn.ui.browser.nodes.ExperimentNode">\r <this />\r </type>\r \r <type\r uri="http://www.simantics.org/Sysdyn-1.0/Result"\r class="org.simantics.sysdyn.ui.browser.nodes.SimulationResultNode">\r <this />\r </type>\r \r </target>\r\r <!-- Inject default connection routing algorithm for sysdyn diagrams -->\r <target interface="org.simantics.g2d.diagram.DiagramClass">\r <adapter uri="http://www.simantics.org/Sysdyn-1.0/ConfigurationDiagram"\r adapterClass="org.simantics.sysdyn.ui.elements2.ConfigurationDiagramClassAdapter" />\r </target>\r\r <!-- Sysdyn symbols -->\r <target interface="org.simantics.diagram.adapter.ElementFactory">\r <resource uri="http://www.simantics.org/Sysdyn-1.0/StockSymbol"\r class="org.simantics.sysdyn.ui.elements2.StockFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.elements2.ModuleFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ValveSymbol"\r class="org.simantics.sysdyn.ui.elements2.ValveFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/AuxiliarySymbol"\r class="org.simantics.sysdyn.ui.elements2.AuxiliaryFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/CloudSymbol"\r class="org.simantics.sysdyn.ui.elements2.CloudFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/InputSymbol"\r class="org.simantics.sysdyn.ui.elements2.InputFactory" />\r\r <type uri="http://www.simantics.org/Sysdyn-1.0/StockSymbol"\r class="org.simantics.sysdyn.ui.elements2.StockFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.elements2.ModuleFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/ValveSymbol"\r class="org.simantics.sysdyn.ui.elements2.ValveFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/AuxiliarySymbol"\r class="org.simantics.sysdyn.ui.elements2.AuxiliaryFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/CloudSymbol"\r class="org.simantics.sysdyn.ui.elements2.CloudFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/InputSymbol"\r class="org.simantics.sysdyn.ui.elements2.InputFactory" /> \r </target>\r \r <!-- Sysdyn connections -->\r <target interface="org.simantics.diagram.adapter.ElementFactory">\r <!-- Edges -->\r <resource uri="http://www.simantics.org/Sysdyn-1.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.FlowEdgeFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.DependencyEdgeFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.FlowEdgeFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.DependencyEdgeFactory" />\r <!-- : SYSDYN.Connection-->\r <type uri="http://www.simantics.org/Sysdyn-1.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.FlowConnectionFactory" />\r <type uri="http://www.simantics.org/Sysdyn-1.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements2.connections.DependencyConnectionFactory" />\r </target>\r \r <target interface="org.simantics.g2d.connection.EdgeVisualsConfigurer">\r <baseType uri="http://www.simantics.org/Diagram-2.0/HasConnector" />\r <resource uri="http://www.simantics.org/Diagram-2.0/HasPlainConnector"\r class="org.simantics.diagram.content.ArrowConfigurer">\r <string>none 0</string>\r </resource>\r <resource uri="http://www.simantics.org/Diagram-2.0/HasArrowConnector"\r class="org.simantics.diagram.content.ArrowConfigurer">\r <string>fill 1</string>\r </resource>\r </target>\r \r <!-- ModelBrowser2 -->\r \r <target interface="org.simantics.browsing.ui.model.children.ChildRule">\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectBrowseContext/ModuleTypeChildRule"\r class="org.simantics.sysdyn.ui.browser.childrules.ModuleTypeChildRule"/>\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectBrowseContext/ModuleContentChildRule"\r class="org.simantics.sysdyn.ui.browser.childrules.ModuleContentChildRule"/> \r </target>\r \r <target interface="org.simantics.browsing.ui.model.visuals.VisualsRule">\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectBrowseContext/ModuleTypeLabelRule"\r class="org.simantics.sysdyn.ui.browser.labelrules.ModuleTypeLabelRule"/>\r </target> \r \r <target interface="org.simantics.db.layer0.adapter.ActionFactory">\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectActionContext/Actions/NewModuleType"\r class="org.simantics.sysdyn.ui.browser.actions.NewModuleTypeAction" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectActionContext/Actions/NewEnumeration"\r class="org.simantics.sysdyn.ui.browser.actions.NewEnumerationAction" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectActionContext/Actions/OpenWorkbook"\r class="org.simantics.sysdyn.ui.browser.actions.OpenWorkbookAction" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectActionContext/Actions/NewFunction"\r class="org.simantics.sysdyn.ui.browser.actions.NewFunctionAction" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectActionContext/Actions/NewFunctionLibrary"\r class="org.simantics.sysdyn.ui.browser.actions.NewFunctionLibraryAction" />\r <resource uri="http://www.simantics.org/Sysdyn-1.0/ProjectActionContext/Actions/NewSharedFunctionLibrary"\r class="org.simantics.sysdyn.ui.browser.actions.NewSharedFunctionLibraryAction" /> \r </target> \r \r <!-- PROFILES -->\r <target interface="org.simantics.scenegraph.profile.Style">\r <resource uri="http://www.simantics.org/Sysdyn-1.0/SimulationPlaybackStyle"\r class="org.simantics.sysdyn.ui.elements2.profiles.SimulationPlaybackStyle">\r </resource>\r </target>\r
</adapters>
\ No newline at end of file
--- /dev/null
+package org.simantics.sysdyn.ui.elements2.profiles;\r
+\r
+import java.awt.BasicStroke;\r
+import java.awt.Color;\r
+import java.awt.geom.AffineTransform;\r
+import java.awt.geom.Rectangle2D;\r
+\r
+import org.simantics.db.ReadGraph;\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.common.request.ObjectsWithType;\r
+import org.simantics.db.common.utils.NameUtils;\r
+import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.db.layer0.variable.Variable;\r
+import org.simantics.diagram.profile.StyleBase;\r
+import org.simantics.diagram.stubs.G2DResource;\r
+import org.simantics.diagram.synchronization.graph.DiagramGraphUtil;\r
+import org.simantics.issues.ontology.IssueResource;\r
+import org.simantics.layer0.Layer0;\r
+import org.simantics.modeling.ModelingResources;\r
+import org.simantics.scenegraph.INode;\r
+import org.simantics.scenegraph.g2d.nodes.ShapeNode;\r
+import org.simantics.scenegraph.profile.EvaluationContext;\r
+import org.simantics.scenegraph.profile.Observer;\r
+import org.simantics.scenegraph.profile.common.ProfileVariables;\r
+import org.simantics.scenegraph.utils.GeometryUtils;\r
+import org.simantics.scenegraph.utils.NodeUtil;\r
+import org.simantics.sysdyn.SysdynResource;\r
+\r
+public class SimulationPlaybackStyle extends StyleBase<AffineTransform> {\r
+\r
+ public static class A extends ShapeNode {\r
+\r
+ private static final long serialVersionUID = -5273246617906214956L;\r
+\r
+ @Override\r
+ public Rectangle2D getBoundsInLocal() {\r
+ return null;\r
+ }\r
+\r
+ @Override\r
+ public Rectangle2D getBoundsInLocal(boolean b) {\r
+ return null;\r
+ }\r
+\r
+ @Override\r
+ public Rectangle2D getBounds() {\r
+ return null;\r
+ }\r
+ \r
+ }\r
+ \r
+ @Override\r
+ public AffineTransform calculateStyle(ReadGraph graph, Resource runtimeDiagram, Resource entry, Resource element, Variable configuration) throws DatabaseException {\r
+// TODO: Get results from variable\r
+// DiagramResource dr = DiagramResource.getInstance(graph);\r
+// String rvi = graph.getPossibleRelatedValue(runtimeDiagram, dr.RuntimeDiagram_HasRVI, Bindings.STRING);\r
+ \r
+ Layer0 l0 = Layer0.getInstance(graph);\r
+ SysdynResource sr = SysdynResource.getInstance(graph);\r
+ ModelingResources mr = ModelingResources.getInstance(graph);\r
+ IssueResource issue = IssueResource.getInstance(graph);\r
+ \r
+ Resource component = graph.getPossibleObject(element, mr.ElementToComponent);\r
+ if (component == null)\r
+ return null;\r
+ \r
+ Resource config = graph.getPossibleObject(component, l0.PartOf);\r
+ \r
+ Resource model = graph.getPossibleObject(config, l0.PartOf);\r
+ if(!graph.isInstanceOf(model, sr.SysdynModel))\r
+ return null;\r
+ \r
+ for(Resource i : graph.syncRequest(new ObjectsWithType(model, l0.ConsistsOf, issue.Issue))) {\r
+ System.out.println(NameUtils.getSafeName(graph, graph.getSingleObject(i, issue.HasIssueContext)));\r
+ if(graph.getSingleObject(i, issue.HasIssueContext).equals(component)) {\r
+ AffineTransform at = DiagramGraphUtil.getAffineTransform(graph, element, G2DResource.getInstance(graph).HasTransform, true);\r
+ return at;\r
+ }\r
+ }\r
+ \r
+ return null;\r
+// String name = graph.getPossibleRelatedValue(config, l0.HasName, Bindings.STRING);\r
+// if(name == null)\r
+// return null;\r
+// if(name.startsWith("A")) {\r
+// AffineTransform at = DiagramGraphUtil.getAffineTransform(graph, element, G2DResource.getInstance(graph).HasTransform, true);\r
+// return at;\r
+// } else {\r
+// return null;\r
+// }\r
+ }\r
+\r
+ @Override\r
+ public void styleResultChanged(Observer observer, Resource element, AffineTransform result) {\r
+ if (result != null)\r
+ values.put(element, result);\r
+ else\r
+ values.remove(element);\r
+ observer.update();\r
+ }\r
+\r
+ @Override\r
+ public void applyStyleForNode(EvaluationContext observer, INode _node, AffineTransform transform) {\r
+ if (transform != null) {\r
+ A node = ProfileVariables.claimChild(_node, "", "simulationPlaybackColour", A.class, observer);\r
+ if (node == null)\r
+ return;\r
+\r
+ Rectangle2D expandedElementBounds = GeometryUtils.expandRectangle( NodeUtil.getLocalElementBounds(_node), 0.5 );\r
+ node.setTransform(transform);\r
+ node.setZIndex(-1000);\r
+ node.setFill(true);\r
+ node.setColor(Color.LIGHT_GRAY);\r
+ node.setStroke(new BasicStroke(0.2f));\r
+ node.setValue("shape", expandedElementBounds);\r
+ } else {\r
+ cleanupStyleForNode(_node);\r
+ }\r
+ }\r
+\r
+ @Override\r
+ protected void cleanupStyleForNode(INode node) {\r
+ ProfileVariables.denyChild(node, "", "simulationPlaybackColour");\r
+ }\r
+\r
+}\r
+
package org.simantics.sysdyn.ui.utils;\r
\r
-import java.text.DateFormat;\r
-import java.text.SimpleDateFormat;\r
-import java.util.Calendar;\r
import java.util.UUID;\r
\r
import org.simantics.databoard.Bindings;\r
import org.simantics.db.exception.DatabaseException;\r
import org.simantics.db.layer0.adapter.Template;\r
import org.simantics.document.DocumentResource;\r
-import org.simantics.issues.ontology.IssueResource;\r
import org.simantics.layer0.Layer0;\r
import org.simantics.layer0.utils.direct.GraphUtils;\r
import org.simantics.modeling.ModelingResources;\r
}\r
}\r
\r
- /*\r
- IssueResource ISSUE = IssueResource.getInstance(g);\r
- Resource sampleNote = g.newResource();\r
- g.claim(sampleNote, l0.InstanceOf, null, ISSUE.TextualIssue);\r
- g.claimLiteral(sampleNote, l0.HasName, "sampleNote");\r
- g.claim(sampleNote, ISSUE.HasSeverity, ISSUE.Severity_Error);\r
- g.claim(sampleNote, ISSUE.HasIssueContext, model);\r
- g.claimLiteral(sampleNote, l0.HasLabel, "Test note", Bindings.STRING);\r
- g.claimLiteral(sampleNote, l0.HasDescription, "= Test =\nThis is a test note.\n", Bindings.STRING);\r
- DateFormat format = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");\r
- String created = format.format(Calendar.getInstance().getTime());\r
- g.claimLiteral(sampleNote, ISSUE.HasCreationTime, created, Bindings.STRING);\r
- g.claim(model, l0.ConsistsOf, sampleNote);\r
- */\r
+ ProfileEntries.createStandardProfiles(g, model);\r
+ \r
\r
} catch (DatabaseException e ) {\r
\r
--- /dev/null
+package org.simantics.sysdyn.ui.utils;\r
+\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.WriteGraph;\r
+import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.diagram.profile.Profiles;\r
+import org.simantics.diagram.stubs.DiagramResource;\r
+import org.simantics.layer0.Layer0;\r
+import org.simantics.sysdyn.SysdynResource;\r
+\r
+public class ProfileEntries {\r
+\r
+ public static Resource createWorkProfile(WriteGraph graph, String name) throws DatabaseException {\r
+\r
+ SysdynResource sr = SysdynResource.getInstance(graph);\r
+ \r
+ return Profiles.createProfile(graph, name,\r
+ sr.Profiles_SimulationPlaybackColours);\r
+\r
+ }\r
+\r
+ public static void createStandardProfiles(WriteGraph graph, final Resource model) throws DatabaseException {\r
+\r
+ Layer0 L0 = Layer0.getInstance(graph);\r
+ DiagramResource DIA = DiagramResource.getInstance(graph);\r
+\r
+ final Resource a = createWorkProfile(graph, "A");\r
+\r
+ Resource plain = Profiles.createProfile(graph, "Plain");\r
+\r
+ graph.claim(model, DIA.HasProfile, plain);\r
+ graph.claim(model, L0.ConsistsOf, a);\r
+ graph.claim(model, L0.ConsistsOf, plain);\r
+\r
+ // FIXME: add virtual graph write back once this is fixed: https://www.simulationsite.net/redmine/issues/3296\r
+// graph.sync(new WriteRequest(graph.getService(VirtualGraphSupport.class).getWorkspacePersistent("profiles")) {\r
+// @Override\r
+// public void perform(WriteGraph graph) throws DatabaseException {\r
+// DiagramResource DIA = DiagramResource.getInstance(graph);\r
+ graph.claim(model, DIA.HasActiveProfile, plain);\r
+// }\r
+// });\r
+\r
+ }\r
+\r
+}\r
Resource issue = graph.newResource();\r
graph.claim(issue, L0.InstanceOf, null, ISSUE.Issue);\r
graph.claim(issue, ISSUE.HasIssueContext, null, variable);\r
- graph.claim(issue, ISSUE.HasSeverity, ISSUE.Severity_Error);\r
+ graph.claim(issue, ISSUE.HasSeverity, ISSUE.Severity_Warning);\r
graph.claimLiteral(issue, L0.HasLabel, label, Bindings.STRING);\r
graph.claimLiteral(issue, L0.HasName, UUID.randomUUID().toString(), Bindings.STRING);\r
DateFormat format = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");\r