eclipse-windowbuilder / windowbuilder

Eclipse Windowbuilder
https://projects.eclipse.org/projects/tools.windowbuilder
Eclipse Public License 1.0
78 stars 30 forks source link

[GEF] Move createCompoundCommand() method out of EditPart class #825

Closed ptziegler closed 1 month ago

ptziegler commented 1 month ago

This method is not part of standard GEF and should therefore not be in the base class. Furthermore, this method always returns a plain CompoundCommand, except for the AbstractComponentEditParts, where it instead returns a CompoundEditCommand.

To keep things compatible, a new IObjectInfoEditPart interface has been created, that is implemented by the AbstractComponentEditPart. By default, the DragEditPartTracker uses a normal CompoundCommand. But if the target edit part happens to implement this new interface, then the CompoundEditCommand is used.

This change will greatly reduce the amount of places where we have to use the WindowBuilder-specific edit parts.