Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2006-04-10 11:15:21 +0000
committeratikhomirov2006-04-10 11:15:21 +0000
commitdc2456f75f65198eeac9c1fb0dbd87c89b47bf04 (patch)
tree3a2aff77e6e241cb19e3ce989581fece5e6a0dbd /plugins/org.eclipse.gmf.graphdef.codegen/src
parent0c271e4649b798b9d200887f9fe9199ddae886b2 (diff)
downloadorg.eclipse.gmf-tooling-dc2456f75f65198eeac9c1fb0dbd87c89b47bf04.tar.gz
org.eclipse.gmf-tooling-dc2456f75f65198eeac9c1fb0dbd87c89b47bf04.tar.xz
org.eclipse.gmf-tooling-dc2456f75f65198eeac9c1fb0dbd87c89b47bf04.zip
[mgolubev] #135016 Background colour is not used to fill polygons
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/src')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/ShapeAttrGenerator.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/ShapeAttrGenerator.java b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/ShapeAttrGenerator.java
index 2f798ae7a..d838b68ad 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/ShapeAttrGenerator.java
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/ShapeAttrGenerator.java
@@ -47,9 +47,11 @@ final GraphDefDispatcher dispatcher = args.getDispatcher();
final ImportAssistant importManager = dispatcher.getImportManager();
-// PERHAPS, do this with reflection?
+// Most of the properties are set only if corresponding eProperty isSet.
+// The difference is in the default values. If default value of eProperty matches d2d one, the setter may be omitted.
+// d2d.Shape#fill == true (matches default of gmfgraph.Shape#fill), while d2d.Polyline#fill == false, thus we need additional check
- if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getShape_Fill())) {
+ if (figureInstance instanceof Polyline ^ figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getShape_Fill())) {
stringBuffer.append(TEXT_1);
stringBuffer.append(figureVarName);
stringBuffer.append(TEXT_2);

Back to the top