Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/NewLayoutDataGenerator.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/new/LayoutData.javajet2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/NewLayoutDataGenerator.java b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/NewLayoutDataGenerator.java
index 2abce94e3..0ca13bba2 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/NewLayoutDataGenerator.java
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/NewLayoutDataGenerator.java
@@ -33,7 +33,7 @@ final Figure figureInstance = argsBundle.getFigure();
// merely makes sure layoutData present
// and parent figure got chance to have layout initialized
-if (gmfLayoutData != null && figureInstance.getParent() != null && figureInstance.getParent().getLayout() != null) {
+if (gmfLayoutData != null && figureInstance.eContainer() instanceof Figure && ((Figure) figureInstance.eContainer()).getLayout() != null) {
stringBuffer.append(TEXT_1);
stringBuffer.append(dispatcher.dispatch(gmfLayoutData, argsBundle));
stringBuffer.append(TEXT_2);
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/new/LayoutData.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/new/LayoutData.javajet
index efe9f349f..b96640d3f 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/new/LayoutData.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/new/LayoutData.javajet
@@ -11,6 +11,6 @@ final Figure figureInstance = argsBundle.getFigure();
// merely makes sure layoutData present
// and parent figure got chance to have layout initialized
-if (gmfLayoutData != null && figureInstance.getParent() != null && figureInstance.getParent().getLayout() != null) {%>
+if (gmfLayoutData != null && figureInstance.eContainer() instanceof Figure && ((Figure) figureInstance.eContainer()).getLayout() != null) {%>
<%=dispatcher.dispatch(gmfLayoutData, argsBundle)%>
<%}%>

Back to the top