From: luukkainen Date: Thu, 8 Jan 2009 14:57:15 +0000 (+0000) Subject: git-svn-id: https://www.simantics.org/svn/simantics/3d/branches/dev@8535 ac1ea38d... X-Git-Tag: simantics-1.19.0~20^2~18 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=7b23bd59260035f6f4b5958b0148e06883ee5a5f;p=simantics%2F3d.git git-svn-id: https://www.simantics.org/svn/simantics/3d/branches/dev@8535 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.proconf.g3d/schema/geometry.exsd b/org.simantics.proconf.g3d/schema/geometry.exsd index f6af1286..2447088b 100644 --- a/org.simantics.proconf.g3d/schema/geometry.exsd +++ b/org.simantics.proconf.g3d/schema/geometry.exsd @@ -1,16 +1,21 @@ - + - + - + [Enter description of this extension point.] + + + + + @@ -34,9 +39,9 @@ - + - + @@ -56,57 +61,49 @@ - - - + + + - + - + [Enter the first release in which this extension point appears.] - + - + [Enter extension point usage example here.] - + - + [Enter API information here.] - + - + [Enter information about supplied implementation of this extension point.] - - - - - - - - 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 c7ba95db..d90b9dd0 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 @@ -317,7 +317,7 @@ public abstract class ScenegraphAdapterImpl implements ScenegraphAdapter { */ protected IGraphicsNode addNode(IEntity parent, IEntity r) { if (!r.isInstanceOf(Resources.g3dResource.G3DNode)) { - ErrorLogger.defaultLogError("Trying to add node into scenegraph that is not instance of graphicsnode " + r,new Exception("ASSERT!")); + ErrorLogger.defaultLogError("Trying to add node into scenegraph that is not instance of G3DNode " + r,new Exception("ASSERT!")); return null; } if (parent.equals(r)) { @@ -473,6 +473,7 @@ public abstract class ScenegraphAdapterImpl implements ScenegraphAdapter { protected Resource nodeResource; private boolean disposed = false; + private IQueryListener listener = null; public NodeQuery(Resource r) { this.nodeResource = r; @@ -541,6 +542,25 @@ public abstract class ScenegraphAdapterImpl implements ScenegraphAdapter { public boolean isDisposed() { return disposed; } + + // without separate listener, this query would work only once + @Override + public IQueryListener getListener() { + if (listener == null) { + listener = new IQueryListener() { + @Override + public boolean isDisposed() { + return NodeQuery.this.disposed; + } + + @Override + public void resultChangedRaw(Object oldResult, Object newResult) { + NodeQuery.this.resultChangedRaw(oldResult, newResult); + } + }; + } + return listener; + } } /** 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 844393aa..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() + " has no shapes", null); + ErrorLogger.defaultLogError("ModelNode " + model.getResource().getResourceId() + " has no shapes", null); return; } for (G3DNode node: nodes) {