Community
Participate
Working Groups
Inspired by the news-group thread started at the news:e374cq$pbd$1@utils.eclipse.org. Complete steps to reproduce are at the news:e37v36$3tv$1@utils.eclipse.org Actually if gmgraph node points to the figure with some layout other than XYlayout, and the corresponding GenNode has listLayout = false, generated code installs XYLayoutEditpolicy to the parent edit part. In this case, attempt to create child in this node fails with following exception: java.lang.ClassCastException: org.eclipse.draw2d.ToolbarLayout at org.eclipse.gef.editpolicies.XYLayoutEditPolicy.getXYLayout(XYLayoutEditPolicy.java:131) at org.eclipse.gef.editpolicies.XYLayoutEditPolicy.getLayoutOrigin(XYLayoutEditPolicy.java:110) at org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy.getConstraintFor(ConstrainedLayoutEditPolicy.java:209) at org.eclipse.gmf.runtime.diagram.ui.editpolicies.XYLayoutEditPolicy.getConstraintFor(XYLayoutEditPolicy.java:336) at org.eclipse.gmf.runtime.diagram.ui.editpolicies.XYLayoutEditPolicy.getCreateCommand(XYLayoutEditPolicy.java:256) at org.eclipse.gmf.runtime.diagram.ui.editpolicies.XYLayoutEditPolicy.getCommand(XYLayoutEditPolicy.java:321) at org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:470) Expected: It should be possible to create child node. To achive this, do not install XYLayoutEditPolicy for such cases.
Created attachment 41616 [details] Fixes the subj Property isListLayout now is applicable only to GenCompartment's. For GenNode's the editpolicies, applicable notation styles, etc is determined from gnfgraph layout for node figure. To achive this without adding dependency gmfgen -> gmfgraph, the kind of used figure's (that is, viewmap's) layout is provided to gmfgen as Viewmap#layoutType property.
Reviewed and committed
[GMF Restructure] Bug 319140 : product GMF and component Generation was the original product and component for this bug