Community
Participate
Working Groups
Created attachment 95230 [details] Provide an additional check on the active state of an EditPart while calculating the Arrange All Command While fixing bug 203520, I am encountering a new bug while deleting an element from the diagram because of the synchronisation between the editor and the outline view. Here is an snippet of the raised exception : ... Caused by: java.lang.IllegalArgumentException: Argument 'nodes' contains objects which have a different parent containment at org.eclipse.gmf.runtime.diagram.ui.services.layout.LayoutService.checkValidLayoutNodes(LayoutService.java:120) at org.eclipse.gmf.runtime.diagram.ui.services.layout.LayoutService.layoutLayoutNodes(LayoutService.java:294) at org.eclipse.gmf.runtime.diagram.ui.editpolicies.ContainerEditPolicy.layoutNodes(ContainerEditPolicy.java:374) at org.eclipse.gmf.runtime.diagram.ui.editpolicies.ContainerEditPolicy.getArrangeCommand(ContainerEditPolicy.java:329) at org.eclipse.gmf.runtime.diagram.ui.editpolicies.ContainerEditPolicy.getCommand(ContainerEditPolicy.java:509) at org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:473) at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.access$1(GraphicalEditPart.java:1) at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart$1.run(GraphicalEditPart.java:463) at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:289) at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.getCommand(GraphicalEditPart.java:458) at org.eclipse.gmf.runtime.diagram.ui.actions.internal.ArrangeAction.getCommand(ArrangeAction.java:90) at org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction.calculateEnabled(DiagramAction.java:124) at org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction.refresh(DiagramAction.java:114) at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.selectionChanged(AbstractActionHandler.java:387) at org.eclipse.emf.ecoretools.diagram.part.EcoreDiagramEditor$4.fireSelectionChanged(EcoreDiagramEditor.java:357) ... The attached patch provide an additional check on the active state of an EditPart while calculating the Arrange All Command and there is no more Exception.
Hi Alex, can you review this patch?
The patch looks ok and harmless. If an editpart is not active it cannot be moved anywhere anyway, so it shouldn't be supplied to the graph layout algorithm. Committed the patch to head.
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug