]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
git-svn-id: https://www.simantics.org/svn/simantics/3d/branches/dev@9355 ac1ea38d...
authorluukkainen <luukkainen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 13 Feb 2009 12:59:18 +0000 (12:59 +0000)
committerluukkainen <luukkainen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 13 Feb 2009 12:59:18 +0000 (12:59 +0000)
org.simantics.proconf.processeditor/src/org/simantics/processeditor/animations/PipeFlowAnimation.java
org.simantics.proconf.processeditor/src/org/simantics/processeditor/common/ControlPointTools.java
org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/ConfigureAnimationDialog.java
org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/ConfigureMonitorDialog.java

index b1f4281eac9287258aa877892f5261ab58778b9b..7c9bc424ba424102d607b8d9e0bc08bb219a4efc 100644 (file)
@@ -76,7 +76,7 @@ public class PipeFlowAnimation implements Animatable{
        if (numParticles < 2)\r
                numParticles = 2;\r
        \r
-       particle = ParticleFactory.buildParticles("Animation of " + s.getResource().getResourceId(s.getGraph().getSession()),numParticles, ParticleGeometry.PT_QUAD);//new ParticleMesh("Animation of " + r.getId(),40);\r
+       particle = ParticleFactory.buildParticles("Animation of " + s.getResource().getResourceId(),numParticles, ParticleGeometry.PT_QUAD);//new ParticleMesh("Animation of " + r.getId(),40);\r
        particle.setEmissionDirection(VecmathJmeTools.get(dir).normalize());\r
        particle.setLocalTranslation(VecmathJmeTools.get(p1));\r
        particle.setEmitType(ParticleGeometry.ET_POINT);\r
index 7584374f333e86468540c714c02de1b639b8c11d..1b71432f488a564892c95200d5319f6f44ede162 100644 (file)
@@ -1040,23 +1040,23 @@ public class ControlPointTools {
     }\r
     \r
     static boolean isControlPointChanged(PipeControlPoint node) {\r
-       Session session = node.getGraph().getSession();\r
-       long id = node.getResource().getResourceId(session);\r
+\r
+       long id = node.getResource().getResourceId();\r
        \r
        boolean changed = updatePosition(node);\r
         //if (!changed) {\r
                if (node.isInstanceOf(ProcessResource.plant3Dresource.PathLegEndControlPoint)) {\r
                        if (node.isInstanceOf(ProcessResource.plant3Dresource.TurnControlPoint)) {\r
-                               Pair<Long,Long> connected = (Pair<Long,Long>)getProperty(node.getResource().getResourceId(session));\r
+                               Pair<Long,Long> connected = (Pair<Long,Long>)getProperty(node.getResource().getResourceId());\r
                     PipeControlPoint next = node.getNext();\r
                     PipeControlPoint prev = node.getPrevious();\r
                     if ((next != null && prev != null) && (\r
                         connected == null || \r
                        (connected.first == null && prev != null) ||\r
                        (connected.second == null && next != null) ||\r
-                        !connected.first.equals(prev.getResource().getResourceId(session)) ||\r
-                        !connected.second.equals(next.getResource().getResourceId(session)))) {\r
-                       storeProperty(id, new Pair<Long,Long>(prev.getResource().getResourceId(session),next.getResource().getResourceId(session)));\r
+                        !connected.first.equals(prev.getResource().getResourceId()) ||\r
+                        !connected.second.equals(next.getResource().getResourceId()))) {\r
+                       storeProperty(id, new Pair<Long,Long>(prev.getResource().getResourceId(),next.getResource().getResourceId()));\r
                         changed = true;  \r
                     }\r
                     if (node.isInstanceOf(ProcessResource.plant3Dresource.VariableAngleTurnControlPoint)) {\r
index 421bdd55405a508eef891862f0a293e9c8c9de36..4ef225bbfb396e60e38102f81b01bed4885165c5 100644 (file)
@@ -189,7 +189,7 @@ public class ConfigureAnimationDialog extends Dialog {
                                IEntity t = EntityFactory.create(g,type);\r
                                if (t.getRelatedObjects(ProcessResource.plant3Dresource.HasGraphics).size() > 0) {\r
                                        String key = t.getName();\r
-                               if (key.equals("")) key = "ERROR (" + type.getResourceId(g.getSession()) + ")";\r
+                               if (key.equals("")) key = "ERROR (" + type.getResourceId() + ")";\r
                                sorter.put(key, type);\r
                                }\r
                        }\r
@@ -366,7 +366,7 @@ public class ConfigureAnimationDialog extends Dialog {
                Collection<Animation> animations = model.getAnimation();\r
                for (Animation a : animations) {\r
                        String key = a.getName();\r
-               if (key.equals("")) key = "ERROR (" + a.getResource().getResourceId(model.getGraph().getSession()) + ")";\r
+               if (key.equals("")) key = "ERROR (" + a.getResource().getResourceId() + ")";\r
                sorter.put(key, a);\r
                }\r
                \r
index c778c0e8c4260d8c3a3f080494e1fbebc7864253..b1147f4abb45f27c219c0de1c882e2895b2e2759 100644 (file)
@@ -126,7 +126,7 @@ public class ConfigureMonitorDialog extends Dialog {
                 for (Resource type : types) {\r
                        IEntity t = EntityFactory.create(g, type);\r
                     String key = t.getName();\r
-                    if (key.equals("")) key = "ERROR (" + type.getResourceId(g.getSession()) + ")";\r
+                    if (key.equals("")) key = "ERROR (" + type.getResourceId() + ")";\r
                     sorter.put(key, type);\r
                 }\r
                 \r
@@ -198,7 +198,7 @@ public class ConfigureMonitorDialog extends Dialog {
         for (IEntity model : models) {\r
                \r
                        String key = model.getName();\r
-               if (key.equals("")) key = "ERROR (" + model.getResource().getResourceId(resource.getGraph().getSession()) + ")";\r
+               if (key.equals("")) key = "ERROR (" + model.getResource().getResourceId() + ")";\r
                sorter.put(key, new G3DModel(model));\r
         }\r
         \r