From: luukkainen Date: Fri, 13 Feb 2009 12:59:18 +0000 (+0000) Subject: git-svn-id: https://www.simantics.org/svn/simantics/3d/branches/dev@9355 ac1ea38d... X-Git-Tag: simantics-1.19.0~20^2~1 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=8c1acb920361f006af8d795b0ce53196fd7d0b86;p=simantics%2F3d.git git-svn-id: https://www.simantics.org/svn/simantics/3d/branches/dev@9355 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/animations/PipeFlowAnimation.java b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/animations/PipeFlowAnimation.java index b1f4281e..7c9bc424 100644 --- a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/animations/PipeFlowAnimation.java +++ b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/animations/PipeFlowAnimation.java @@ -76,7 +76,7 @@ public class PipeFlowAnimation implements Animatable{ if (numParticles < 2) numParticles = 2; - particle = ParticleFactory.buildParticles("Animation of " + s.getResource().getResourceId(s.getGraph().getSession()),numParticles, ParticleGeometry.PT_QUAD);//new ParticleMesh("Animation of " + r.getId(),40); + particle = ParticleFactory.buildParticles("Animation of " + s.getResource().getResourceId(),numParticles, ParticleGeometry.PT_QUAD);//new ParticleMesh("Animation of " + r.getId(),40); particle.setEmissionDirection(VecmathJmeTools.get(dir).normalize()); particle.setLocalTranslation(VecmathJmeTools.get(p1)); particle.setEmitType(ParticleGeometry.ET_POINT); diff --git a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/common/ControlPointTools.java b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/common/ControlPointTools.java index 7584374f..1b71432f 100644 --- a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/common/ControlPointTools.java +++ b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/common/ControlPointTools.java @@ -1040,23 +1040,23 @@ public class ControlPointTools { } static boolean isControlPointChanged(PipeControlPoint node) { - Session session = node.getGraph().getSession(); - long id = node.getResource().getResourceId(session); + + long id = node.getResource().getResourceId(); boolean changed = updatePosition(node); //if (!changed) { if (node.isInstanceOf(ProcessResource.plant3Dresource.PathLegEndControlPoint)) { if (node.isInstanceOf(ProcessResource.plant3Dresource.TurnControlPoint)) { - Pair connected = (Pair)getProperty(node.getResource().getResourceId(session)); + Pair connected = (Pair)getProperty(node.getResource().getResourceId()); PipeControlPoint next = node.getNext(); PipeControlPoint prev = node.getPrevious(); if ((next != null && prev != null) && ( connected == null || (connected.first == null && prev != null) || (connected.second == null && next != null) || - !connected.first.equals(prev.getResource().getResourceId(session)) || - !connected.second.equals(next.getResource().getResourceId(session)))) { - storeProperty(id, new Pair(prev.getResource().getResourceId(session),next.getResource().getResourceId(session))); + !connected.first.equals(prev.getResource().getResourceId()) || + !connected.second.equals(next.getResource().getResourceId()))) { + storeProperty(id, new Pair(prev.getResource().getResourceId(),next.getResource().getResourceId())); changed = true; } if (node.isInstanceOf(ProcessResource.plant3Dresource.VariableAngleTurnControlPoint)) { diff --git a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/ConfigureAnimationDialog.java b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/ConfigureAnimationDialog.java index 421bdd55..4ef225bb 100644 --- a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/ConfigureAnimationDialog.java +++ b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/ConfigureAnimationDialog.java @@ -189,7 +189,7 @@ public class ConfigureAnimationDialog extends Dialog { IEntity t = EntityFactory.create(g,type); if (t.getRelatedObjects(ProcessResource.plant3Dresource.HasGraphics).size() > 0) { String key = t.getName(); - if (key.equals("")) key = "ERROR (" + type.getResourceId(g.getSession()) + ")"; + if (key.equals("")) key = "ERROR (" + type.getResourceId() + ")"; sorter.put(key, type); } } @@ -366,7 +366,7 @@ public class ConfigureAnimationDialog extends Dialog { Collection animations = model.getAnimation(); for (Animation a : animations) { String key = a.getName(); - if (key.equals("")) key = "ERROR (" + a.getResource().getResourceId(model.getGraph().getSession()) + ")"; + if (key.equals("")) key = "ERROR (" + a.getResource().getResourceId() + ")"; sorter.put(key, a); } diff --git a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/ConfigureMonitorDialog.java b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/ConfigureMonitorDialog.java index c778c0e8..b1147f4a 100644 --- a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/ConfigureMonitorDialog.java +++ b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/ConfigureMonitorDialog.java @@ -126,7 +126,7 @@ public class ConfigureMonitorDialog extends Dialog { for (Resource type : types) { IEntity t = EntityFactory.create(g, type); String key = t.getName(); - if (key.equals("")) key = "ERROR (" + type.getResourceId(g.getSession()) + ")"; + if (key.equals("")) key = "ERROR (" + type.getResourceId() + ")"; sorter.put(key, type); } @@ -198,7 +198,7 @@ public class ConfigureMonitorDialog extends Dialog { for (IEntity model : models) { String key = model.getName(); - if (key.equals("")) key = "ERROR (" + model.getResource().getResourceId(resource.getGraph().getSession()) + ")"; + if (key.equals("")) key = "ERROR (" + model.getResource().getResourceId() + ")"; sorter.put(key, new G3DModel(model)); }