]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Fixed mapping problems with diagramcontainer and added a default gradient to playback...
authorlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 27 Oct 2011 06:38:39 +0000 (06:38 +0000)
committerlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 27 Oct 2011 06:38:39 +0000 (06:38 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@23045 ac1ea38d-2e2b-0410-8846-a27921b304fc

16 files changed:
org.simantics.sysdyn.ontology/graph.tg
org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph
org.simantics.sysdyn.ontology/src/org/simantics/sysdyn/SysdynResource.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/SimulationResultDecorator.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/SimulationResultImager.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/profiles/SimulationPlaybackStyle.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/ImportModelHandler.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewExperimentNodeHandler.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/NewPlaybackExperimentNodeHandler.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/handlers/ToggleResultActivation.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/PlaybackExperimentTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/VariableNameUtils.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/DiagramContainerDummy.java [new file with mode: 0644]
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/SysdynSchema.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/visitors/ElementVisitorVoidAdapter.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/visitors/IElementVisitorVoid.java

index 156c62e506d1b9adabdb1cdeeaf0d6b9b1e0395a..013b650898fcf64feb5baef3671c0195174034e9 100644 (file)
Binary files a/org.simantics.sysdyn.ontology/graph.tg and b/org.simantics.sysdyn.ontology/graph.tg differ
index 1e2942e37745e27e3e560822960ed31c8d688dee..c7ebe6d56e28b49759987561d1f14a0385305560 100644 (file)
@@ -350,16 +350,7 @@ SYSDYN.GameExperiment <T SYSDYN.Experiment
 
 SYSDYN.SimulateOnChangeExperiment <T SYSDYN.Experiment
 
-SYSDYN.defaultGradient : G2D.ColorGradient
-    G2D.HasColorPlacement _ : G2D.ColorPlacement
-        G2D.HasGradientPosition 0.0 : L0.Double
-        G2D.HasColor [0.0, 0.24313726, 0.52156866, 0.0] : L0.FloatArray
-    G2D.HasColorPlacement _ : G2D.ColorPlacement
-        G2D.HasGradientPosition 1.0 : L0.Double
-        G2D.HasColor [1.0, 0.9019608, 0.0, 0.0] : L0.FloatArray
-        
 SYSDYN.PlaybackExperiment <T SYSDYN.Experiment
-    @L0.assert G2D.HasColorGradient SYSDYN.defaultGradient
             
 SYSDYN.HasResult <R L0.IsComposedOf
     L0.HasRange SYSDYN.Result
@@ -369,10 +360,12 @@ SYSDYN.HasResult <R L0.IsComposedOf
 //#####################################################################
 
 SYSDYN.Result <T L0.Entity
-    // ??? SIMU.IsActive
     @L0.singleProperty L0.HasName
     @L0.optionalProperty SYSDYN.HasParameterFile
     @L0.optionalProperty SYSDYN.HasResultFile
+    
+SYSDYN.ShowResult <R L0.IsRelatedTo : L0.Tag
+    @L0.symmetric
 
 SYSDYN.HasParameterFile <R L0.HasProperty
     L0.HasRange L0.String  
index a586773db3c93b90cada72b669f221dcd31fe6cb..c75bc79ed848ab5e9bc94f557de012741695c053 100644 (file)
@@ -181,6 +181,7 @@ public class SysdynResource {
     public final Resource SharedModuleOntolofgy;\r
     public final Resource ShowEnumerationIndexInCharts;\r
     public final Resource ShowEnumerationIndexInCharts_Inverse;\r
+    public final Resource ShowResult;\r
     public final Resource SimulateOnChangeExperiment;\r
     public final Resource SimulationPlaybackProfile;\r
     public final Resource SimulationPlaybackStyle;\r
@@ -218,7 +219,6 @@ public class SysdynResource {
     public final Resource WithLookupExpression;\r
     public final Resource angle;\r
     public final Resource angle_Inverse;\r
-    public final Resource defaultGradient;\r
     public final Resource polarityLocation;\r
         \r
     public static class URIs {\r
@@ -395,6 +395,7 @@ public class SysdynResource {
         public static final String SharedModuleOntolofgy = "http://www.simantics.org/Sysdyn-1.0/SharedModuleOntolofgy";\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 ShowResult = "http://www.simantics.org/Sysdyn-1.0/ShowResult";\r
         public static final String SimulateOnChangeExperiment = "http://www.simantics.org/Sysdyn-1.0/SimulateOnChangeExperiment";\r
         public static final String SimulationPlaybackProfile = "http://www.simantics.org/Sysdyn-1.0/SimulationPlaybackProfile";\r
         public static final String SimulationPlaybackStyle = "http://www.simantics.org/Sysdyn-1.0/SimulationPlaybackStyle";\r
@@ -432,7 +433,6 @@ public class SysdynResource {
         public static final String WithLookupExpression = "http://www.simantics.org/Sysdyn-1.0/WithLookupExpression";\r
         public static final String angle = "http://www.simantics.org/Sysdyn-1.0/angle";\r
         public static final String angle_Inverse = "http://www.simantics.org/Sysdyn-1.0/angle/Inverse";\r
-        public static final String defaultGradient = "http://www.simantics.org/Sysdyn-1.0/defaultGradient";\r
         public static final String polarityLocation = "http://www.simantics.org/Sysdyn-1.0/polarityLocation";\r
     }\r
     \r
@@ -619,6 +619,7 @@ public class SysdynResource {
         SharedModuleOntolofgy = getResourceOrNull(graph, URIs.SharedModuleOntolofgy);\r
         ShowEnumerationIndexInCharts = getResourceOrNull(graph, URIs.ShowEnumerationIndexInCharts);\r
         ShowEnumerationIndexInCharts_Inverse = getResourceOrNull(graph, URIs.ShowEnumerationIndexInCharts_Inverse);\r
+        ShowResult = getResourceOrNull(graph, URIs.ShowResult);\r
         SimulateOnChangeExperiment = getResourceOrNull(graph, URIs.SimulateOnChangeExperiment);\r
         SimulationPlaybackProfile = getResourceOrNull(graph, URIs.SimulationPlaybackProfile);\r
         SimulationPlaybackStyle = getResourceOrNull(graph, URIs.SimulationPlaybackStyle);\r
@@ -656,7 +657,6 @@ public class SysdynResource {
         WithLookupExpression = getResourceOrNull(graph, URIs.WithLookupExpression);\r
         angle = getResourceOrNull(graph, URIs.angle);\r
         angle_Inverse = getResourceOrNull(graph, URIs.angle_Inverse);\r
-        defaultGradient = getResourceOrNull(graph, URIs.defaultGradient);\r
         polarityLocation = getResourceOrNull(graph, URIs.polarityLocation);\r
     }\r
     \r
index e026bd47ab13191e7edbae098a726c94d7c2ea39..c35120a3a48b019b0b5a32a727a3e38b9022c15b 100644 (file)
@@ -17,14 +17,14 @@ import org.simantics.browsing.ui.content.LabelDecorator;
 import org.simantics.browsing.ui.graph.contributor.labeler.LabelDecoratorContributor;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.simulation.ontology.SimulationResource;\r
+import org.simantics.sysdyn.SysdynResource;\r
 import org.simantics.sysdyn.ui.browser.nodes.SimulationResultNode;\r
 \r
 public class SimulationResultDecorator extends LabelDecoratorContributor<SimulationResultNode>{\r
 \r
     @Override\r
     public LabelDecorator getDecorator(ReadGraph graph, SimulationResultNode result) throws DatabaseException {\r
-        if (graph.hasStatement(result.data, SimulationResource.getInstance(graph).IsActive)) {\r
+        if (graph.hasStatement(result.data, SysdynResource.getInstance(graph).ShowResult)) {\r
             return new LabelDecorator.Stub() {\r
 \r
                 @SuppressWarnings("unchecked")\r
index f37b2b7f5231a89b43353bc0a4bddf05b5013327..70e418d87c8d55511fda074585790014e471e78f 100644 (file)
@@ -15,7 +15,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.simantics.browsing.ui.swt.ImagerContributor;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.simulation.ontology.SimulationResource;\r
+import org.simantics.sysdyn.SysdynResource;\r
 import org.simantics.sysdyn.ui.Activator;\r
 import org.simantics.sysdyn.ui.browser.nodes.SimulationResultNode;\r
 \r
@@ -23,7 +23,7 @@ public class SimulationResultImager extends ImagerContributor<SimulationResultNo
 \r
     @Override\r
     public ImageDescriptor getDescriptor(ReadGraph graph, SimulationResultNode result) throws DatabaseException {\r
-        if(graph.hasStatement(result.data, SimulationResource.getInstance(graph).IsActive))\r
+        if(graph.hasStatement(result.data, SysdynResource.getInstance(graph).ShowResult))\r
             return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/chart_bar.png"));\r
         else\r
             return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/chart_bar_blackAndWhite.png"));\r
index 44816700d7d6333bc0e5d8f633bfb7c68b7bb497..66c366222a42e95fe0816435e16cab1b5433eef5 100644 (file)
@@ -22,6 +22,7 @@ import org.simantics.db.Resource;
 import org.simantics.db.common.request.ObjectsWithType;\r
 import org.simantics.db.exception.DatabaseException;\r
 import org.simantics.db.layer0.variable.Variable;\r
+import org.simantics.diagram.G2DUtils;\r
 import org.simantics.diagram.elements.TextNode;\r
 import org.simantics.diagram.profile.StyleBase;\r
 import org.simantics.diagram.stubs.DiagramResource;\r
@@ -130,8 +131,10 @@ public class SimulationPlaybackStyle extends StyleBase<Triple<AffineTransform, D
                 ArrayList<ColorValue> colorValues = new ArrayList<ColorValue>();\r
                 for(Resource placement : graph.syncRequest(new ObjectsWithType(gradient, g2d.HasColorPlacement, g2d.ColorPlacement))) {\r
                     Double position = graph.getPossibleRelatedValue(placement, g2d.HasGradientPosition, Bindings.DOUBLE);\r
-                    float[] rgba = graph.getPossibleRelatedValue(placement, g2d.HasColor, Bindings.FLOAT_ARRAY);\r
-                    colorValues.add(new ColorValue(new Color(new java.awt.Color(rgba[0], rgba[1], rgba[2])), position));\r
+                    Resource rColor = graph.getPossibleObject(placement, g2d.HasColor);\r
+                    if (rColor != null) {\r
+                        colorValues.add(new ColorValue(new Color((java.awt.Color) G2DUtils.getObject(graph, rColor)), position));\r
+                    }\r
                 }\r
                 cg = new ColorGradient(colorValues, ColorGradient.HSV);\r
             } else {\r
index 6676e96524b53e7d76daab0fbcfb32aa069537cd..7d871b4844e4f2a16834a8fcbf918094f7bd8cab 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2010 Association for Decentralized Information Management in\r
+ * Copyright (c) 2010, 2011 Association for Decentralized Information Management in\r
  * Industry THTH ry.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
@@ -136,6 +136,10 @@ public class ImportModelHandler extends AbstractHandler {
                                                });\r
 \r
                                        } else {\r
+                                           \r
+                                   Resource project = SimanticsUI.getProject().get();\r
+                                   graph.claim(root, Layer0X.getInstance(graph).IsActivatedBy, project);\r
+                                           \r
                                                updateOldConfigurationToBaseRealization(graph, root);\r
                                                addDefaultOntologyLinks(graph, root);\r
                                                addURIsToDiagrams(graph, root);\r
index 16bcd5ec83d59255b7327356146b3150bf5f67d5..0d854f022ca840189be78d844cce73ac6534a1eb 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2010 Association for Decentralized Information Management in\r
+ * Copyright (c) 2010, 2011 Association for Decentralized Information Management in\r
  * Industry THTH ry.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
@@ -34,8 +34,6 @@ public class NewExperimentNodeHandler extends AbstractHandler {
 \r
     @Override\r
     public Object execute(ExecutionEvent event) throws ExecutionException {\r
-        System.out.println("New Experiment");\r
-\r
         ISelection sel = HandlerUtil.getCurrentSelection(event);\r
         \r
         ExperimentsFolder node = AdaptionUtils.adaptToSingle(sel, ExperimentsFolder.class);\r
@@ -54,17 +52,25 @@ public class NewExperimentNodeHandler extends AbstractHandler {
 \r
                 String name = NameUtils.findFreshName(g, getNameSuggestion(), model, l0.ConsistsOf, "%s%d");\r
 \r
-                @SuppressWarnings("unused")\r
                 Resource experiment = GraphUtils.create2(g, getExperimentType(g),\r
                         l0.HasName, name,\r
                         l0.HasLabel, name,\r
                         DOC.HasReportFactory, report,\r
                         l0.PartOf, model);\r
+                \r
+                configureExperiment(g, experiment);\r
             }\r
         });\r
         return null;\r
     }\r
     \r
+    /**\r
+     * Override to do experiment-specific alterations\r
+     */\r
+    protected void configureExperiment(WriteGraph graph, Resource experiment) throws DatabaseException {\r
+        \r
+    }\r
+    \r
     protected Resource getExperimentType(ReadGraph g) {\r
         return SysdynResource.getInstance(g).BasicExperiment;\r
     }\r
index 417f3266bc88fc617239614d1db6863c262a0ff9..9eb53798e9955adc7dcfd79b2046c4275a9e9868 100644 (file)
@@ -1,16 +1,49 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2011 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
 package org.simantics.sysdyn.ui.handlers;\r
 \r
+import java.awt.Color;\r
+\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
+import org.simantics.db.WriteGraph;\r
+import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.diagram.stubs.G2DResource;\r
+import org.simantics.layer0.utils.direct.GraphUtils;\r
 import org.simantics.sysdyn.SysdynResource;\r
 \r
 \r
 public class NewPlaybackExperimentNodeHandler  extends NewExperimentNodeHandler  {\r
-    \r
+\r
+    protected void configureExperiment(WriteGraph graph, Resource experiment) throws DatabaseException {\r
+        G2DResource g2d = G2DResource.getInstance(graph);\r
+        Resource defaultGradient = GraphUtils.create2(graph, g2d.ColorGradient);\r
+        graph.claim(experiment, g2d.HasColorGradient, defaultGradient);\r
+\r
+        Resource placement = GraphUtils.create2(graph, g2d.ColorPlacement, \r
+                g2d.HasGradientPosition, 0.0);\r
+        graph.claimLiteral(placement, g2d.HasColor, g2d.Color, new Color(0, 62, 133).getColorComponents(new float[4]));\r
+        graph.claim(defaultGradient, g2d.HasColorPlacement, placement);\r
+        \r
+        placement = GraphUtils.create2(graph, g2d.ColorPlacement, \r
+                g2d.HasGradientPosition, 1.0);\r
+        graph.claimLiteral(placement, g2d.HasColor, g2d.Color, new Color(255, 230, 0).getColorComponents(new float[4]));\r
+        graph.claim(defaultGradient, g2d.HasColorPlacement, placement);\r
+    }\r
+\r
     protected Resource getExperimentType(ReadGraph g) {\r
         return SysdynResource.getInstance(g).PlaybackExperiment;\r
     }\r
-    \r
+\r
     protected String getNameSuggestion() {\r
         return "Playback Experiment";\r
     }\r
index 18616353fd81bc6e337ba959dfd104986b444042..5eaa2d7366b170a50cf48f42f9ac32b5f86c280c 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2010 Association for Decentralized Information Management in\r
+ * Copyright (c) 2010, 2011 Association for Decentralized Information Management in\r
  * Industry THTH ry.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
@@ -20,7 +20,6 @@ import org.simantics.db.Resource;
 import org.simantics.db.WriteGraph;\r
 import org.simantics.db.common.request.WriteRequest;\r
 import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.simulation.ontology.SimulationResource;\r
 import org.simantics.sysdyn.SysdynResource;\r
 import org.simantics.ui.SimanticsUI;\r
 import org.simantics.ui.utils.ResourceAdaptionUtils;\r
@@ -46,13 +45,12 @@ public class ToggleResultActivation extends AbstractHandler {
                 @Override\r
                 public void perform(WriteGraph graph) throws DatabaseException {\r
                     SysdynResource sr = SysdynResource.getInstance(graph);\r
-                    SimulationResource SIMU = SimulationResource.getInstance(graph);\r
                     for(Resource r : resources) {\r
                         if(graph.isInstanceOf(r, sr.Result)) {\r
-                            if (graph.hasStatement(r, SIMU.IsActive)) {\r
-                                graph.denyStatement(r, SIMU.IsActive, r);\r
+                            if (graph.hasStatement(r, sr.ShowResult)) {\r
+                                graph.denyStatement(r, sr.ShowResult, r);\r
                             } else {\r
-                                graph.claim(r, SIMU.IsActive, r);\r
+                                graph.claim(r, sr.ShowResult, r);\r
                             }\r
                         }\r
                     }\r
index f2eb35e12c9414254fed01de7d3dd4411f978f40..4b7eb906ca4cb3dff248874069b555185da3f049 100644 (file)
@@ -12,6 +12,7 @@
 package org.simantics.sysdyn.ui.properties;\r
 \r
 import java.util.ArrayList;\r
+import java.util.Collection;\r
 \r
 import org.eclipse.jface.layout.GridDataFactory;\r
 import org.eclipse.jface.layout.GridLayoutFactory;\r
@@ -141,7 +142,7 @@ public class PlaybackExperimentTab extends LabelPropertyTabContributor {
             for(ColorValue cv : colorValues) {\r
                 Resource placement = GraphUtils.create2(graph, g2d.ColorPlacement, \r
                         g2d.HasGradientPosition, cv.getValue());\r
-                graph.claimLiteral(placement, g2d.HasColor, cv.getColor().getAWTColor().getColorComponents(new float[4]), Bindings.FLOAT_ARRAY);\r
+                graph.claimLiteral(placement, g2d.HasColor, g2d.Color, cv.getColor().getAWTColor().getColorComponents(new float[4]));\r
                 graph.claim(gradient, g2d.HasColorPlacement, placement);\r
             }\r
         }\r
@@ -169,8 +170,11 @@ public class PlaybackExperimentTab extends LabelPropertyTabContributor {
             if(gradient == null) {\r
                 return Boolean.FALSE;\r
             }\r
+            Collection<Resource> placements =  graph.syncRequest(new ObjectsWithType(gradient, g2d.HasColorPlacement, g2d.ColorPlacement));\r
+            if(placements.isEmpty())\r
+                return Boolean.FALSE;\r
             \r
-            for(Resource placement : graph.syncRequest(new ObjectsWithType(gradient, g2d.HasColorPlacement, g2d.ColorPlacement))) {\r
+            for(Resource placement : placements) {\r
                 Double position = graph.getPossibleRelatedValue(placement, g2d.HasGradientPosition);\r
                 if(position == null) \r
                     return Boolean.FALSE;\r
index de42301334d347195377ce179fb699d69178d2be..422f9e9ae42c85bde6857a8f0c2725fdaf787dad 100644 (file)
@@ -95,6 +95,8 @@ public class VariableNameUtils {
                if(model == null)\r
                        return true;\r
                Configuration configuration = model.getConfiguration();\r
+               if(configuration == null)\r
+                   return true;\r
                IElement current = model.getElement(variable);\r
                for(IElement e : configuration.getElements()) {\r
                        if(e instanceof Variable) {\r
diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/DiagramContainerDummy.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/DiagramContainerDummy.java
new file mode 100644 (file)
index 0000000..2e16d6c
--- /dev/null
@@ -0,0 +1,25 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2011 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.sysdyn.representation;\r
+\r
+import org.simantics.objmap.annotations.GraphType;\r
+import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
+\r
+@GraphType("http://www.simantics.org/Diagram-2.0/DiagramContainer")\r
+public class DiagramContainerDummy implements IElement {\r
+    \r
+    @Override\r
+    public void accept(IElementVisitorVoid v) {\r
+        v.visit(this);        \r
+    }\r
+\r
+}
\ No newline at end of file
index 5b95bc9137f001622ea8f29eeb2c1975fe9a55c8..3c6a6eede7aedbfcbb856941edbe40fc7e3020a9 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2010 Association for Decentralized Information Management in\r
+ * Copyright (c) 2010, 2011 Association for Decentralized Information Management in\r
  * Industry THTH ry.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
@@ -53,6 +53,7 @@ public class SysdynSchema extends SimpleSchema {
             addLinkType(MappingSchemas.fromAnnotations(g, LibraryDummy.class));\r
             addLinkType(MappingSchemas.fromAnnotations(g, Book.class));\r
             addLinkType(MappingSchemas.fromAnnotations(g, Sheet.class));\r
+            addLinkType(MappingSchemas.fromAnnotations(g, DiagramContainerDummy.class));\r
         } catch (DatabaseException e) {\r
             e.printStackTrace();\r
         } catch (InstantiationException e) {\r
index 4ee889c11ac0bdc3e194e34c22a73e5490b2cc43..64c7d287ff8aef1ffb358f633dde541fdad9f7b7 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2010 Association for Decentralized Information Management in\r
+ * Copyright (c) 2010, 2011 Association for Decentralized Information Management in\r
  * Industry THTH ry.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
@@ -15,6 +15,7 @@ import org.simantics.sysdyn.representation.Auxiliary;
 import org.simantics.sysdyn.representation.Cloud;\r
 import org.simantics.sysdyn.representation.Configuration;\r
 import org.simantics.sysdyn.representation.Dependency;\r
+import org.simantics.sysdyn.representation.DiagramContainerDummy;\r
 import org.simantics.sysdyn.representation.Enumeration;\r
 import org.simantics.sysdyn.representation.Flow;\r
 import org.simantics.sysdyn.representation.Input;\r
@@ -73,4 +74,8 @@ public class ElementVisitorVoidAdapter implements IElementVisitorVoid {
     @Override\r
     public void visit(Book sheet) {\r
     }\r
+    \r
+    @Override\r
+    public void visit(DiagramContainerDummy container) {\r
+    }\r
 }\r
index 89899f15987f74f4ea3f25fa57d1700d8f6b1c13..3c78343bf13eb9f10363296dedbbe6096adf7093 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2010 Association for Decentralized Information Management in\r
+ * Copyright (c) 2010, 2011 Association for Decentralized Information Management in\r
  * Industry THTH ry.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
@@ -15,6 +15,7 @@ import org.simantics.sysdyn.representation.Auxiliary;
 import org.simantics.sysdyn.representation.Cloud;\r
 import org.simantics.sysdyn.representation.Configuration;\r
 import org.simantics.sysdyn.representation.Dependency;\r
+import org.simantics.sysdyn.representation.DiagramContainerDummy;\r
 import org.simantics.sysdyn.representation.Enumeration;\r
 import org.simantics.sysdyn.representation.Flow;\r
 import org.simantics.sysdyn.representation.Input;\r
@@ -38,4 +39,5 @@ public interface IElementVisitorVoid {
     void visit(Enumeration enumeration);\r
     void visit(LibraryDummy libraryDummy);\r
     void visit(Book sheet);\r
+    void visit(DiagramContainerDummy container);\r
 }\r