Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2006-03-31 13:08:33 -0500
committerashatalin2006-03-31 13:08:33 -0500
commit0c217c01b62afc57beafb89e86358b977100028d (patch)
tree2f59954b9b6e61973938d0a1eece23b23731bae4 /plugins/org.eclipse.gmf.graphdef.codegen/templates/attr
parentcd81033f47108425d056371513707afc186c108f (diff)
downloadorg.eclipse.gmf-tooling-0c217c01b62afc57beafb89e86358b977100028d.tar.gz
org.eclipse.gmf-tooling-0c217c01b62afc57beafb89e86358b977100028d.tar.xz
org.eclipse.gmf-tooling-0c217c01b62afc57beafb89e86358b977100028d.zip
[mgolubev] 134249 Generate all Figure/Shape properties
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/templates/attr')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/Figure.javajet12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/Figure.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/Figure.javajet
index 68195f895..3062fbbde 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/Figure.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/Figure.javajet
@@ -20,8 +20,20 @@ if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getFigure_ForegroundColor())
<%} if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getFigure_Size())) {
Point p = figureInstance.getSize();%>
<%=figureVarName%>.setSize(<%=dispatcher.DPtoLP(p.getX())%>, <%=dispatcher.DPtoLP(p.getY())%>);
+<%} if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getFigure_MaximumSize())) {
+ Dimension d = figureInstance.getMaximumSize();%>
+ <%=figureVarName%>.setMaximumSize(new <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension")%>(<%=dispatcher.DPtoLP(d.getDx())%>, <%=dispatcher.DPtoLP(d.getDy())%>));
+<%} if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getFigure_MinimumSize())) {
+ Dimension d = figureInstance.getMinimumSize();%>
+ <%=figureVarName%>.setMinimumSize(new <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension")%>(<%=dispatcher.DPtoLP(d.getDx())%>, <%=dispatcher.DPtoLP(d.getDy())%>));
<%} if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getFigure_Font())) {
// XXX possible CCE when fonts other than Basic added to model
BasicFont font = (BasicFont) figureInstance.getFont();%>
<%=figureVarName%>.setFont(new <%=importManager.getImportedName("org.eclipse.swt.graphics.Font")%>(<%=importManager.getImportedName("org.eclipse.swt.widgets.Display")%>.getCurrent(), "<%=font.getFaceName()%>", <%=font.getHeight()%>, <%=importManager.getImportedName("org.eclipse.swt.SWT")%>.<%=font.getStyle().getLiteral()%>));
+<%} if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getFigure_Insets())) {
+ Insets insets = figureInstance.getInsets();%>
+ <%=figureVarName%>.setBorder(new <%=importManager.getImportedName("org.eclipse.draw2d.MarginBorder")%>(<%=dispatcher.DPtoLP(insets.getTop())%>, <%=dispatcher.DPtoLP(insets.getLeft())%>, <%=dispatcher.DPtoLP(insets.getBottom())%>, <%=dispatcher.DPtoLP(insets.getRight())%>));
+<%} if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getFigure_Border())) {
+ Border border = figureInstance.getBorder();%>
+ <%=figureVarName%>.setBorder(<%=dispatcher.dispatch(border, new Object[] {border, dispatcher})%>);
<%}%> \ No newline at end of file

Back to the top