Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2006-10-16 11:03:37 -0400
committerashatalin2006-10-16 11:03:37 -0400
commit84e8f0af49c32cfe1a06371933c4d3f39cdc3d65 (patch)
treed315408c46c1eac5ddf02bdb664bffe929705268 /plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal
parentfb18b2469bbbebc3c24bccab787eb2cfee4feb8a (diff)
downloadorg.eclipse.gmf-tooling-84e8f0af49c32cfe1a06371933c4d3f39cdc3d65.tar.gz
org.eclipse.gmf-tooling-84e8f0af49c32cfe1a06371933c4d3f39cdc3d65.tar.xz
org.eclipse.gmf-tooling-84e8f0af49c32cfe1a06371933c4d3f39cdc3d65.zip
[161042] mgolubev - [GMFGraph]: Correct error mesage in case if Compartment has no figure
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/CanvasProcessor.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/CanvasProcessor.java b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/CanvasProcessor.java
index f00f66e95..d8061315f 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/CanvasProcessor.java
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/internal/graphdef/codegen/CanvasProcessor.java
@@ -27,6 +27,7 @@ import org.eclipse.gmf.gmfgraph.DiagramLabel;
import org.eclipse.gmf.gmfgraph.Figure;
import org.eclipse.gmf.gmfgraph.FigureAccessor;
import org.eclipse.gmf.gmfgraph.FigureGallery;
+import org.eclipse.gmf.gmfgraph.FigureHandle;
import org.eclipse.gmf.gmfgraph.GMFGraphFactory;
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
import org.eclipse.gmf.gmfgraph.Node;
@@ -107,8 +108,12 @@ public class CanvasProcessor extends Processor {
private void handleCompartments() throws InterruptedException {
for (Iterator it = myInput.getCompartments().iterator(); it.hasNext();) {
Compartment next = (Compartment) it.next();
- if (next.getFigure() instanceof Figure) {
- handleFigure((Figure) next.getFigure());
+ FigureHandle nextFigure = next.getFigure();
+ if (nextFigure == null){
+ throw new NullPointerException("Compartment without figure : " + next);
+ }
+ if (nextFigure instanceof Figure) {
+ handleFigure((Figure) nextFigure);
} else {
throw new IllegalStateException("Don't support accessors for compartments yet");
}

Back to the top