From: luukkainen Date: Fri, 13 Feb 2009 12:59:16 +0000 (+0000) Subject: git-svn-id: https://www.simantics.org/svn/simantics/3d/branches/dev@9354 ac1ea38d... X-Git-Tag: simantics-1.19.0~20^2~2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=3f308c5d93146caa14c544c4cc93076c4a38f8bb;p=simantics%2F3d.git git-svn-id: https://www.simantics.org/svn/simantics/3d/branches/dev@9354 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/ScenegraphAdapterImpl.java b/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/ScenegraphAdapterImpl.java index 2760c291..853e7d2c 100644 --- a/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/ScenegraphAdapterImpl.java +++ b/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/ScenegraphAdapterImpl.java @@ -179,7 +179,7 @@ public abstract class ScenegraphAdapterImpl implements ScenegraphAdapter { String name = nameMap.getRight(nodeResource); if (name == null) { //name = UUID.randomUUID().toString(); - name = Long.toString(nodeResource.getResourceId(session)); + name = Long.toString(nodeResource.getResourceId()); nameMap.map(nodeResource, name); } return name; @@ -321,8 +321,8 @@ public abstract class ScenegraphAdapterImpl implements ScenegraphAdapter { return null; } if (parent.equals(r)) { - if (DEBUG) System.out.println("ThreeDimensionalEditorBase.addNodeP(" + r.getResource().getResourceId(session) + ") adding node to itself?!"); - ErrorLogger.defaultLogError("Adding scnegraphnode " + r.getResource().getResourceId(session) + " to itself!", new Exception("ASSERT!")); + if (DEBUG) System.out.println("ThreeDimensionalEditorBase.addNodeP(" + r.getResource().getResourceId() + ") adding node to itself?!"); + ErrorLogger.defaultLogError("Adding scnegraphnode " + r.getResource().getResourceId() + " to itself!", new Exception("ASSERT!")); return abstractGraphicsNodes.get(r); } @@ -335,10 +335,10 @@ public abstract class ScenegraphAdapterImpl implements ScenegraphAdapter { return null; } if (parent.equals(inView.getParent().getResource())) { - if (DEBUG) System.out.println("ThreeDimensionalEditorBase.addNodeP(" + r.getResource().getResourceId(session) + ") already in view"); + if (DEBUG) System.out.println("ThreeDimensionalEditorBase.addNodeP(" + r.getResource().getResourceId() + ") already in view"); return inView; } else { - if (DEBUG) System.out.println("ThreeDimensionalEditorBase.addNodeP(" + r.getResource().getResourceId(session) + ") already in view, but has different parent, current parent is ("+inView.getParent().getResource().getResourceId(session)+") and node is added to ("+parent+") -> removing from old parent and inserting to new"); + if (DEBUG) System.out.println("ThreeDimensionalEditorBase.addNodeP(" + r.getResource().getResourceId() + ") already in view, but has different parent, current parent is ("+inView.getParent().getResource().getResourceId()+") and node is added to ("+parent+") -> removing from old parent and inserting to new"); removeNode(inView.getParent().getResource(),r.getResource()); } } @@ -348,15 +348,15 @@ public abstract class ScenegraphAdapterImpl implements ScenegraphAdapter { IGraphicsNode mo; IGraphicsNode parentNode = abstractGraphicsNodes.get(parent); if (parentNode == null) { - if (DEBUG) System.out.println("No graphicsnode for (" + parent.getResource().getResourceId(session) + ")"); + if (DEBUG) System.out.println("No graphicsnode for (" + parent.getResource().getResourceId() + ")"); return null; } else { mo = instantiateNode(parentNode, node); if (mo == null) { - ErrorLogger.defaultLogError("Could not instantiate scenegraph node for " + r.getResource().getResourceId(session), null); + ErrorLogger.defaultLogError("Could not instantiate scenegraph node for " + r.getResource().getResourceId(), null); return null; } - if (DEBUG) System.out.println("ThreeDimensionalEditorBase.addNodeP(" + r.getResource().getResourceId(session) + ") added to parent (" + parent.getResource().getResourceId(session) + ") " + mo.getClass()); + if (DEBUG) System.out.println("ThreeDimensionalEditorBase.addNodeP(" + r.getResource().getResourceId() + ") added to parent (" + parent.getResource().getResourceId() + ") " + mo.getClass()); } addSubnodeListener(node); addPropertyListener(node); diff --git a/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/ThreeDimensionalEditorBase.java b/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/ThreeDimensionalEditorBase.java index 32f36c8a..39c73fdd 100644 --- a/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/ThreeDimensionalEditorBase.java +++ b/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/ThreeDimensionalEditorBase.java @@ -344,7 +344,7 @@ public abstract class ThreeDimensionalEditorBase implements Runnable { } public String getMenuID() { - return Long.toString(getInputResource().getResourceId(session)); + return Long.toString(getInputResource().getResourceId()); } protected void makeActions(Graph graph) { diff --git a/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/ModelNode.java b/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/ModelNode.java index c4af61be..ad0780d8 100644 --- a/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/ModelNode.java +++ b/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/ModelNode.java @@ -43,7 +43,7 @@ public class ModelNode extends AbstractGraphicsNode implements Animatable, IGeom G3DModel model = getG3DModel(graph); Collection nodes = model.getChild(); if (nodes.size() == 0) { - ErrorLogger.defaultLogError("ModelNode " + model.getResource().getResourceId(graph.getSession()) + " has no shapes", null); + ErrorLogger.defaultLogError("ModelNode " + model.getResource().getResourceId() + " has no shapes", null); return; } for (G3DNode node: nodes) {