Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2006-04-05 15:07:40 +0000
committerdstadnik2006-04-05 15:07:40 +0000
commitb4f092e6637a8b76bbc577831aa670ddaf2bcf67 (patch)
tree96d874904a9c8b525006f4295096781c21a2cce3 /plugins/org.eclipse.gmf.codegen/templates
parent2a8a7a2f6f2bbaacb616ddac3d7d6ea4307e27ec (diff)
downloadorg.eclipse.gmf-tooling-b4f092e6637a8b76bbc577831aa670ddaf2bcf67.tar.gz
org.eclipse.gmf-tooling-b4f092e6637a8b76bbc577831aa670ddaf2bcf67.tar.xz
org.eclipse.gmf-tooling-b4f092e6637a8b76bbc577831aa670ddaf2bcf67.zip
#133328 Refactor code that calculates external node label location
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parts/DiagramExternalNodeLabelEditPart.javajet11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/parts/DiagramExternalNodeLabelEditPart.javajet b/plugins/org.eclipse.gmf.codegen/templates/parts/DiagramExternalNodeLabelEditPart.javajet
index 68c25beb0..4f998efc6 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/parts/DiagramExternalNodeLabelEditPart.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/parts/DiagramExternalNodeLabelEditPart.javajet
@@ -52,7 +52,7 @@ public class <%=genDiagram.getBaseExternalNodeLabelEditPartClassName()%> extends
}
protected Point getReferencePoint() {
- return parent.getBounds().getBottom().getTranslated(0, BOTTOM_GAP);
+ return getLabelLocation(parent);
}
});
}
@@ -61,7 +61,14 @@ public class <%=genDiagram.getBaseExternalNodeLabelEditPartClassName()%> extends
* @generated
*/
public Point getReferencePoint() {
- return ((GraphicalEditPart) getParent()).getFigure().getBounds().getBottom().getTranslated(0, BOTTOM_GAP);
+ return getLabelLocation(((GraphicalEditPart) getParent()).getFigure());
+ }
+
+ /**
+ * @generated
+ */
+ protected Point getLabelLocation(IFigure parent) {
+ return parent.getBounds().getBottom().getTranslated(0, BOTTOM_GAP);
}
}
<%importManager.emitSortedImports();%>

Back to the top