Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2006-01-10 16:16:49 +0000
committerashatalin2006-01-10 16:16:49 +0000
commite05f13c0962c0b216c5523c33196c526c311fba3 (patch)
treeb8775be1b6dd34e95cd922f1b14578a524c62d9e /plugins/org.eclipse.gmf.graphdef.codegen
parentae4e2ba638944201f4cfea59a453b09758781c17 (diff)
downloadorg.eclipse.gmf-tooling-e05f13c0962c0b216c5523c33196c526c311fba3.tar.gz
org.eclipse.gmf-tooling-e05f13c0962c0b216c5523c33196c526c311fba3.tar.xz
org.eclipse.gmf-tooling-e05f13c0962c0b216c5523c33196c526c311fba3.zip
As a part of implementstion
#114178,114179 "Shortcutting" diagram elements.
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/ConnectionGenerator.java197
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/DecorationFigureGenerator.java133
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/PolylineConnection.javajet2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/decoration.jetinc1
4 files changed, 171 insertions, 162 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/ConnectionGenerator.java b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/ConnectionGenerator.java
index 90100f309..7dad890eb 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/ConnectionGenerator.java
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/ConnectionGenerator.java
@@ -18,54 +18,54 @@ public class ConnectionGenerator
protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
protected final String TEXT_1 = "";
protected final String TEXT_2 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
- protected final String TEXT_3 = " extends ";
- protected final String TEXT_4 = " {" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_5 = "() {";
- protected final String TEXT_6 = NL;
- protected final String TEXT_7 = NL + "\t\t";
- protected final String TEXT_8 = ".setFill(";
- protected final String TEXT_9 = ");";
- protected final String TEXT_10 = NL + "\t\t";
- protected final String TEXT_11 = ".setOutline(";
- protected final String TEXT_12 = ");";
- protected final String TEXT_13 = NL + "\t\t";
- protected final String TEXT_14 = ".setLineWidth(";
- protected final String TEXT_15 = ");";
- protected final String TEXT_16 = NL + "\t\t";
- protected final String TEXT_17 = ".setLineStyle(org.eclipse.draw2d.Graphics.";
- protected final String TEXT_18 = ");";
- protected final String TEXT_19 = NL + "\t\t";
- protected final String TEXT_20 = ".setFillXOR(";
- protected final String TEXT_21 = ");";
- protected final String TEXT_22 = NL + "\t\t";
- protected final String TEXT_23 = ".setOutlineXOR(";
- protected final String TEXT_24 = ");";
- protected final String TEXT_25 = NL + "\t\t";
- protected final String TEXT_26 = ".addPoint(new org.eclipse.draw2d.geometry.Point(";
- protected final String TEXT_27 = ", ";
- protected final String TEXT_28 = "));";
- protected final String TEXT_29 = NL + "\t\t";
- protected final String TEXT_30 = ".setCornerDimensions(new org.eclipse.draw2d.geometry.Dimension(";
- protected final String TEXT_31 = ", ";
- protected final String TEXT_32 = "));";
- protected final String TEXT_33 = NL + "\t\tsetSourceDecoration(createSourceDecoration());";
- protected final String TEXT_34 = NL + "\t\tsetTargetDecoration(createTargetDecoration());";
- protected final String TEXT_35 = NL + "\t}" + NL;
- protected final String TEXT_36 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
- protected final String TEXT_37 = " createSourceDecoration() {";
- protected final String TEXT_38 = NL;
- protected final String TEXT_39 = "\t\t";
- protected final String TEXT_40 = " ";
- protected final String TEXT_41 = " = new ";
- protected final String TEXT_42 = "();";
- protected final String TEXT_43 = NL;
- protected final String TEXT_44 = NL + "\t\torg.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();";
- protected final String TEXT_45 = NL + "\t\tpl.addPoint(";
- protected final String TEXT_46 = ", ";
- protected final String TEXT_47 = ");";
- protected final String TEXT_48 = NL + "\t\t";
- protected final String TEXT_49 = ".setTemplate(pl);";
- protected final String TEXT_50 = NL + "\t\treturn ";
+ protected final String TEXT_3 = " extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_4 = "() {";
+ protected final String TEXT_5 = NL;
+ protected final String TEXT_6 = NL + "\t\t";
+ protected final String TEXT_7 = ".setFill(";
+ protected final String TEXT_8 = ");";
+ protected final String TEXT_9 = NL + "\t\t";
+ protected final String TEXT_10 = ".setOutline(";
+ protected final String TEXT_11 = ");";
+ protected final String TEXT_12 = NL + "\t\t";
+ protected final String TEXT_13 = ".setLineWidth(";
+ protected final String TEXT_14 = ");";
+ protected final String TEXT_15 = NL + "\t\t";
+ protected final String TEXT_16 = ".setLineStyle(org.eclipse.draw2d.Graphics.";
+ protected final String TEXT_17 = ");";
+ protected final String TEXT_18 = NL + "\t\t";
+ protected final String TEXT_19 = ".setFillXOR(";
+ protected final String TEXT_20 = ");";
+ protected final String TEXT_21 = NL + "\t\t";
+ protected final String TEXT_22 = ".setOutlineXOR(";
+ protected final String TEXT_23 = ");";
+ protected final String TEXT_24 = NL + "\t\t";
+ protected final String TEXT_25 = ".addPoint(new org.eclipse.draw2d.geometry.Point(";
+ protected final String TEXT_26 = ", ";
+ protected final String TEXT_27 = "));";
+ protected final String TEXT_28 = NL + "\t\t";
+ protected final String TEXT_29 = ".setCornerDimensions(new org.eclipse.draw2d.geometry.Dimension(";
+ protected final String TEXT_30 = ", ";
+ protected final String TEXT_31 = "));";
+ protected final String TEXT_32 = NL + "\t\tsetSourceDecoration(createSourceDecoration());";
+ protected final String TEXT_33 = NL + "\t\tsetTargetDecoration(createTargetDecoration());";
+ protected final String TEXT_34 = NL + "\t}" + NL;
+ protected final String TEXT_35 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
+ protected final String TEXT_36 = " createSourceDecoration() {";
+ protected final String TEXT_37 = NL;
+ protected final String TEXT_38 = "\t\t";
+ protected final String TEXT_39 = " ";
+ protected final String TEXT_40 = " = new ";
+ protected final String TEXT_41 = "();";
+ protected final String TEXT_42 = NL;
+ protected final String TEXT_43 = NL + "\t\torg.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();";
+ protected final String TEXT_44 = NL + "\t\tpl.addPoint(";
+ protected final String TEXT_45 = ", ";
+ protected final String TEXT_46 = ");";
+ protected final String TEXT_47 = NL + "\t\t";
+ protected final String TEXT_48 = ".setTemplate(pl);";
+ protected final String TEXT_49 = NL + "\t\t";
+ protected final String TEXT_50 = ".setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));" + NL + "\t\treturn ";
protected final String TEXT_51 = ";" + NL + "\t}";
protected final String TEXT_52 = NL;
protected final String TEXT_53 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
@@ -82,10 +82,11 @@ public class ConnectionGenerator
protected final String TEXT_64 = ");";
protected final String TEXT_65 = NL + "\t\t";
protected final String TEXT_66 = ".setTemplate(pl);";
- protected final String TEXT_67 = NL + "\t\treturn ";
- protected final String TEXT_68 = ";" + NL + "\t}";
- protected final String TEXT_69 = NL + "}";
- protected final String TEXT_70 = NL;
+ protected final String TEXT_67 = NL + "\t\t";
+ protected final String TEXT_68 = ".setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));" + NL + "\t\treturn ";
+ protected final String TEXT_69 = ";" + NL + "\t}";
+ protected final String TEXT_70 = NL + "}";
+ protected final String TEXT_71 = NL;
public String generate(Object argument)
{
@@ -98,110 +99,110 @@ final GMFGraphSwitch fqnSwitch = new FigureQualifiedNameSwitch();
stringBuffer.append(TEXT_2);
stringBuffer.append(figure.getName());
stringBuffer.append(TEXT_3);
- stringBuffer.append(fqnSwitch.doSwitch(figure));
- stringBuffer.append(TEXT_4);
stringBuffer.append(figure.getName());
- stringBuffer.append(TEXT_5);
+ stringBuffer.append(TEXT_4);
Shape shapeFigure = figure;
String shapeVarName = "this";
- stringBuffer.append(TEXT_6);
+ stringBuffer.append(TEXT_5);
// PERHAPS, do this with reflection?
if (shapeFigure.eIsSet(GMFGraphPackage.eINSTANCE.getShape_Fill())) {
- stringBuffer.append(TEXT_7);
+ stringBuffer.append(TEXT_6);
stringBuffer.append(shapeVarName);
- stringBuffer.append(TEXT_8);
+ stringBuffer.append(TEXT_7);
stringBuffer.append(shapeFigure.isFill());
- stringBuffer.append(TEXT_9);
+ stringBuffer.append(TEXT_8);
} if (shapeFigure.eIsSet(GMFGraphPackage.eINSTANCE.getShape_Outline())) {
- stringBuffer.append(TEXT_10);
+ stringBuffer.append(TEXT_9);
stringBuffer.append(shapeVarName);
- stringBuffer.append(TEXT_11);
+ stringBuffer.append(TEXT_10);
stringBuffer.append(shapeFigure.isOutline());
- stringBuffer.append(TEXT_12);
+ stringBuffer.append(TEXT_11);
} if (shapeFigure.eIsSet(GMFGraphPackage.eINSTANCE.getShape_LineWidth())) {
- stringBuffer.append(TEXT_13);
+ stringBuffer.append(TEXT_12);
stringBuffer.append(shapeVarName);
- stringBuffer.append(TEXT_14);
+ stringBuffer.append(TEXT_13);
stringBuffer.append(shapeFigure.getLineWidth());
- stringBuffer.append(TEXT_15);
+ stringBuffer.append(TEXT_14);
} if (shapeFigure.eIsSet(GMFGraphPackage.eINSTANCE.getShape_LineKind())) {
- stringBuffer.append(TEXT_16);
+ stringBuffer.append(TEXT_15);
stringBuffer.append(shapeVarName);
- stringBuffer.append(TEXT_17);
+ stringBuffer.append(TEXT_16);
stringBuffer.append(shapeFigure.getLineKind().getName());
- stringBuffer.append(TEXT_18);
+ stringBuffer.append(TEXT_17);
} if (shapeFigure.eIsSet(GMFGraphPackage.eINSTANCE.getShape_XorFill())) {
- stringBuffer.append(TEXT_19);
+ stringBuffer.append(TEXT_18);
stringBuffer.append(shapeVarName);
- stringBuffer.append(TEXT_20);
+ stringBuffer.append(TEXT_19);
stringBuffer.append(shapeFigure.isXorFill());
- stringBuffer.append(TEXT_21);
+ stringBuffer.append(TEXT_20);
} if (shapeFigure.eIsSet(GMFGraphPackage.eINSTANCE.getShape_XorOutline())) {
- stringBuffer.append(TEXT_22);
+ stringBuffer.append(TEXT_21);
stringBuffer.append(shapeVarName);
- stringBuffer.append(TEXT_23);
+ stringBuffer.append(TEXT_22);
stringBuffer.append(shapeFigure.isXorOutline());
- stringBuffer.append(TEXT_24);
+ stringBuffer.append(TEXT_23);
} if (shapeFigure instanceof Polyline && !((Polyline) shapeFigure).getTemplate().isEmpty()) {
for (Iterator pointIt = ((Polyline) shapeFigure).getTemplate().iterator(); pointIt.hasNext(); ) {
Point p = (Point) pointIt.next();
- stringBuffer.append(TEXT_25);
+ stringBuffer.append(TEXT_24);
stringBuffer.append(shapeVarName);
- stringBuffer.append(TEXT_26);
+ stringBuffer.append(TEXT_25);
stringBuffer.append(p.getX());
- stringBuffer.append(TEXT_27);
+ stringBuffer.append(TEXT_26);
stringBuffer.append(p.getY());
- stringBuffer.append(TEXT_28);
+ stringBuffer.append(TEXT_27);
}
} else if (shapeFigure instanceof RoundedRectangle) {
RoundedRectangle rrFigure = (RoundedRectangle) shapeFigure;
- stringBuffer.append(TEXT_29);
+ stringBuffer.append(TEXT_28);
stringBuffer.append(shapeVarName);
- stringBuffer.append(TEXT_30);
+ stringBuffer.append(TEXT_29);
stringBuffer.append(rrFigure.getCornerWidth());
- stringBuffer.append(TEXT_31);
+ stringBuffer.append(TEXT_30);
stringBuffer.append(rrFigure.getCornerHeight());
- stringBuffer.append(TEXT_32);
+ stringBuffer.append(TEXT_31);
}
if (figure.getSourceDecoration() != null) {
- stringBuffer.append(TEXT_33);
+ stringBuffer.append(TEXT_32);
}
if (figure.getTargetDecoration() != null) {
- stringBuffer.append(TEXT_34);
+ stringBuffer.append(TEXT_33);
}
- stringBuffer.append(TEXT_35);
+ stringBuffer.append(TEXT_34);
String decFigVarName = "df";
if (figure.getSourceDecoration() != null) {
DecorationFigure df = figure.getSourceDecoration();
- stringBuffer.append(TEXT_36);
+ stringBuffer.append(TEXT_35);
stringBuffer.append(fqnSwitch.doSwitch(df));
+ stringBuffer.append(TEXT_36);
stringBuffer.append(TEXT_37);
stringBuffer.append(TEXT_38);
- stringBuffer.append(TEXT_39);
stringBuffer.append(fqnSwitch.doSwitch(df));
- stringBuffer.append(TEXT_40);
+ stringBuffer.append(TEXT_39);
stringBuffer.append(decFigVarName);
- stringBuffer.append(TEXT_41);
+ stringBuffer.append(TEXT_40);
stringBuffer.append(fqnSwitch.doSwitch(df));
+ stringBuffer.append(TEXT_41);
stringBuffer.append(TEXT_42);
- stringBuffer.append(TEXT_43);
/*include FigureChildren*/
if ((df instanceof PolylineDecoration || df instanceof PolygonDecoration) && !((Polyline) df).getTemplate().isEmpty()) {
- stringBuffer.append(TEXT_44);
+ stringBuffer.append(TEXT_43);
for (Iterator pointIt = ((Polyline) df).getTemplate().iterator(); pointIt.hasNext(); ) {
Point p = (Point) pointIt.next();
- stringBuffer.append(TEXT_45);
+ stringBuffer.append(TEXT_44);
stringBuffer.append(p.getX());
- stringBuffer.append(TEXT_46);
+ stringBuffer.append(TEXT_45);
stringBuffer.append(p.getY());
- stringBuffer.append(TEXT_47);
+ stringBuffer.append(TEXT_46);
} /*for*/
- stringBuffer.append(TEXT_48);
+ stringBuffer.append(TEXT_47);
stringBuffer.append(decFigVarName);
- stringBuffer.append(TEXT_49);
+ stringBuffer.append(TEXT_48);
} /*if instanceof */
+ stringBuffer.append(TEXT_49);
+ stringBuffer.append(decFigVarName);
stringBuffer.append(TEXT_50);
stringBuffer.append(decFigVarName);
stringBuffer.append(TEXT_51);
@@ -239,9 +240,11 @@ DecorationFigure df = figure.getTargetDecoration();
stringBuffer.append(TEXT_67);
stringBuffer.append(decFigVarName);
stringBuffer.append(TEXT_68);
- }
+ stringBuffer.append(decFigVarName);
stringBuffer.append(TEXT_69);
+ }
stringBuffer.append(TEXT_70);
+ stringBuffer.append(TEXT_71);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/DecorationFigureGenerator.java b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/DecorationFigureGenerator.java
index 5cce529f2..1d3a0fe9f 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/DecorationFigureGenerator.java
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/src/org/eclipse/gmf/graphdef/codegen/templates/DecorationFigureGenerator.java
@@ -32,38 +32,40 @@ public class DecorationFigureGenerator
protected final String TEXT_14 = ");";
protected final String TEXT_15 = NL + "\t\t";
protected final String TEXT_16 = ".setTemplate(pl);";
- protected final String TEXT_17 = NL + "\t\tsetScale(";
- protected final String TEXT_18 = ", ";
- protected final String TEXT_19 = ");";
- protected final String TEXT_20 = NL;
- protected final String TEXT_21 = NL + "\t\t";
- protected final String TEXT_22 = ".setFill(";
- protected final String TEXT_23 = ");";
- protected final String TEXT_24 = NL + "\t\t";
- protected final String TEXT_25 = ".setOutline(";
- protected final String TEXT_26 = ");";
- protected final String TEXT_27 = NL + "\t\t";
- protected final String TEXT_28 = ".setLineWidth(";
- protected final String TEXT_29 = ");";
- protected final String TEXT_30 = NL + "\t\t";
- protected final String TEXT_31 = ".setLineStyle(org.eclipse.draw2d.Graphics.";
- protected final String TEXT_32 = ");";
- protected final String TEXT_33 = NL + "\t\t";
- protected final String TEXT_34 = ".setFillXOR(";
- protected final String TEXT_35 = ");";
- protected final String TEXT_36 = NL + "\t\t";
- protected final String TEXT_37 = ".setOutlineXOR(";
- protected final String TEXT_38 = ");";
- protected final String TEXT_39 = NL + "\t\t";
- protected final String TEXT_40 = ".addPoint(new org.eclipse.draw2d.geometry.Point(";
- protected final String TEXT_41 = ", ";
- protected final String TEXT_42 = "));";
- protected final String TEXT_43 = NL + "\t\t";
- protected final String TEXT_44 = ".setCornerDimensions(new org.eclipse.draw2d.geometry.Dimension(";
- protected final String TEXT_45 = ", ";
- protected final String TEXT_46 = "));";
- protected final String TEXT_47 = NL + "\t}" + NL + "}";
- protected final String TEXT_48 = NL;
+ protected final String TEXT_17 = NL + "\t\t";
+ protected final String TEXT_18 = ".setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));";
+ protected final String TEXT_19 = NL + "\t\tsetScale(";
+ protected final String TEXT_20 = ", ";
+ protected final String TEXT_21 = ");";
+ protected final String TEXT_22 = NL;
+ protected final String TEXT_23 = NL + "\t\t";
+ protected final String TEXT_24 = ".setFill(";
+ protected final String TEXT_25 = ");";
+ protected final String TEXT_26 = NL + "\t\t";
+ protected final String TEXT_27 = ".setOutline(";
+ protected final String TEXT_28 = ");";
+ protected final String TEXT_29 = NL + "\t\t";
+ protected final String TEXT_30 = ".setLineWidth(";
+ protected final String TEXT_31 = ");";
+ protected final String TEXT_32 = NL + "\t\t";
+ protected final String TEXT_33 = ".setLineStyle(org.eclipse.draw2d.Graphics.";
+ protected final String TEXT_34 = ");";
+ protected final String TEXT_35 = NL + "\t\t";
+ protected final String TEXT_36 = ".setFillXOR(";
+ protected final String TEXT_37 = ");";
+ protected final String TEXT_38 = NL + "\t\t";
+ protected final String TEXT_39 = ".setOutlineXOR(";
+ protected final String TEXT_40 = ");";
+ protected final String TEXT_41 = NL + "\t\t";
+ protected final String TEXT_42 = ".addPoint(new org.eclipse.draw2d.geometry.Point(";
+ protected final String TEXT_43 = ", ";
+ protected final String TEXT_44 = "));";
+ protected final String TEXT_45 = NL + "\t\t";
+ protected final String TEXT_46 = ".setCornerDimensions(new org.eclipse.draw2d.geometry.Dimension(";
+ protected final String TEXT_47 = ", ";
+ protected final String TEXT_48 = "));";
+ protected final String TEXT_49 = NL + "\t}" + NL + "}";
+ protected final String TEXT_50 = NL;
public String generate(Object argument)
{
@@ -109,80 +111,83 @@ String decFigVarName = "this";
stringBuffer.append(decFigVarName);
stringBuffer.append(TEXT_16);
} /*if instanceof */
- if (scale != null) {
stringBuffer.append(TEXT_17);
- stringBuffer.append(scale.getX());
+ stringBuffer.append(decFigVarName);
stringBuffer.append(TEXT_18);
- stringBuffer.append(scale.getY());
+ if (scale != null) {
stringBuffer.append(TEXT_19);
+ stringBuffer.append(scale.getX());
+ stringBuffer.append(TEXT_20);
+ stringBuffer.append(scale.getY());
+ stringBuffer.append(TEXT_21);
}
Shape shapeFigure = (Shape) figure;
String shapeVarName = "this";
- stringBuffer.append(TEXT_20);
+ stringBuffer.append(TEXT_22);
// PERHAPS, do this with reflection?
if (shapeFigure.eIsSet(GMFGraphPackage.eINSTANCE.getShape_Fill())) {
- stringBuffer.append(TEXT_21);
+ stringBuffer.append(TEXT_23);
stringBuffer.append(shapeVarName);
- stringBuffer.append(TEXT_22);
+ stringBuffer.append(TEXT_24);
stringBuffer.append(shapeFigure.isFill());
- stringBuffer.append(TEXT_23);
+ stringBuffer.append(TEXT_25);
} if (shapeFigure.eIsSet(GMFGraphPackage.eINSTANCE.getShape_Outline())) {
- stringBuffer.append(TEXT_24);
+ stringBuffer.append(TEXT_26);
stringBuffer.append(shapeVarName);
- stringBuffer.append(TEXT_25);
+ stringBuffer.append(TEXT_27);
stringBuffer.append(shapeFigure.isOutline());
- stringBuffer.append(TEXT_26);
+ stringBuffer.append(TEXT_28);
} if (shapeFigure.eIsSet(GMFGraphPackage.eINSTANCE.getShape_LineWidth())) {
- stringBuffer.append(TEXT_27);
+ stringBuffer.append(TEXT_29);
stringBuffer.append(shapeVarName);
- stringBuffer.append(TEXT_28);
+ stringBuffer.append(TEXT_30);
stringBuffer.append(shapeFigure.getLineWidth());
- stringBuffer.append(TEXT_29);
+ stringBuffer.append(TEXT_31);
} if (shapeFigure.eIsSet(GMFGraphPackage.eINSTANCE.getShape_LineKind())) {
- stringBuffer.append(TEXT_30);
+ stringBuffer.append(TEXT_32);
stringBuffer.append(shapeVarName);
- stringBuffer.append(TEXT_31);
+ stringBuffer.append(TEXT_33);
stringBuffer.append(shapeFigure.getLineKind().getName());
- stringBuffer.append(TEXT_32);
+ stringBuffer.append(TEXT_34);
} if (shapeFigure.eIsSet(GMFGraphPackage.eINSTANCE.getShape_XorFill())) {
- stringBuffer.append(TEXT_33);
+ stringBuffer.append(TEXT_35);
stringBuffer.append(shapeVarName);
- stringBuffer.append(TEXT_34);
+ stringBuffer.append(TEXT_36);
stringBuffer.append(shapeFigure.isXorFill());
- stringBuffer.append(TEXT_35);
+ stringBuffer.append(TEXT_37);
} if (shapeFigure.eIsSet(GMFGraphPackage.eINSTANCE.getShape_XorOutline())) {
- stringBuffer.append(TEXT_36);
+ stringBuffer.append(TEXT_38);
stringBuffer.append(shapeVarName);
- stringBuffer.append(TEXT_37);
+ stringBuffer.append(TEXT_39);
stringBuffer.append(shapeFigure.isXorOutline());
- stringBuffer.append(TEXT_38);
+ stringBuffer.append(TEXT_40);
} if (shapeFigure instanceof Polyline && !((Polyline) shapeFigure).getTemplate().isEmpty()) {
for (Iterator pointIt = ((Polyline) shapeFigure).getTemplate().iterator(); pointIt.hasNext(); ) {
Point p = (Point) pointIt.next();
- stringBuffer.append(TEXT_39);
+ stringBuffer.append(TEXT_41);
stringBuffer.append(shapeVarName);
- stringBuffer.append(TEXT_40);
+ stringBuffer.append(TEXT_42);
stringBuffer.append(p.getX());
- stringBuffer.append(TEXT_41);
+ stringBuffer.append(TEXT_43);
stringBuffer.append(p.getY());
- stringBuffer.append(TEXT_42);
+ stringBuffer.append(TEXT_44);
}
} else if (shapeFigure instanceof RoundedRectangle) {
RoundedRectangle rrFigure = (RoundedRectangle) shapeFigure;
- stringBuffer.append(TEXT_43);
- stringBuffer.append(shapeVarName);
- stringBuffer.append(TEXT_44);
- stringBuffer.append(rrFigure.getCornerWidth());
stringBuffer.append(TEXT_45);
- stringBuffer.append(rrFigure.getCornerHeight());
+ stringBuffer.append(shapeVarName);
stringBuffer.append(TEXT_46);
- }
+ stringBuffer.append(rrFigure.getCornerWidth());
stringBuffer.append(TEXT_47);
+ stringBuffer.append(rrFigure.getCornerHeight());
stringBuffer.append(TEXT_48);
+ }
+ stringBuffer.append(TEXT_49);
+ stringBuffer.append(TEXT_50);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/PolylineConnection.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/PolylineConnection.javajet
index cc17acc7b..21a6552b7 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/PolylineConnection.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/PolylineConnection.javajet
@@ -9,7 +9,7 @@ final GMFGraphSwitch fqnSwitch = new FigureQualifiedNameSwitch();
/**
* @generated
*/
-public class <%=figure.getName()%> extends <%=fqnSwitch.doSwitch(figure)%> {
+public class <%=figure.getName()%> extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/decoration.jetinc b/plugins/org.eclipse.gmf.graphdef.codegen/templates/decoration.jetinc
index 447a41e18..a87684ad9 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/decoration.jetinc
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/decoration.jetinc
@@ -9,3 +9,4 @@
<%} /*for*/ %>
<%=decFigVarName%>.setTemplate(pl);
<%} /*if instanceof */ %>
+ <%=decFigVarName%>.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3)); \ No newline at end of file

Back to the top