Author: akazakov
Date: 2008-07-24 15:31:52 -0400 (Thu, 24 Jul 2008)
New Revision: 9296
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesModelImpl.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2566 A temporary solution.
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesModelImpl.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesModelImpl.java 2008-07-24
19:16:56 UTC (rev 9295)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesModelImpl.java 2008-07-24
19:31:52 UTC (rev 9296)
@@ -292,6 +292,12 @@
if(getData() == null) return;
XModelObject diagramXML = (XModelObject)getData();
String newPath = event.getModelObject().getPath();
+ if(diagramXML.getPath() == null) {
+ //FIXME Should not be, this a problem. Listener should be removed earlier
+ diagramXML.getModel().removeModelTreeListener(this);
+
+ return;
+ }
if(!newPath.startsWith(diagramXML.getPath())) {
return;
}
@@ -329,7 +335,14 @@
if(getData() == null) return;
XModelObject diagramXML = (XModelObject)getData();
XModelObject target = event.getModelObject();
+ if(diagramXML.getPath() == null) {
+ //FIXME Should not be, this a problem. Listener should be removed earlier
+ diagramXML.getModel().removeModelTreeListener(this);
+ return;
+ }
if(!target.getPath().startsWith(diagramXML.getPath())) {
+ //FIXME Should not be, this a problem. Listener should be removed earlier
+ diagramXML.getModel().removeModelTreeListener(this);
return;
}
if(event.kind() == XModelTreeEvent.CHILD_ADDED) {