Bug 501035

Summary: Alignment Action accross different parents
Product: [Tools] GEF Reporter: Flavio Donze <flavio.donze>
Component: GEF-Legacy GEF (MVC)Assignee: gef-inbox <gef-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 3.9.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows NT   
Whiteboard:

Description Flavio Donze CLA 2016-09-08 02:12:54 EDT
The current alignment action only works within the same parent.
In the eclipse BPMN-modeler project it would be a great improvement if it would work across different lanes.

The part responsible is in the getOperationSet():

EditPart parent = ((EditPart) editparts.get(0)).getParent();
for (int i = 1; i < editparts.size(); i++) {
	EditPart part = (EditPart) editparts.get(i);
	if (part.getParent() != parent)
		return Collections.EMPTY_LIST;
}

If it is too troublesome to implement, a solution might be to work with a flag, passed in the constructor e.g.:

public AlignmentAction(IWorkbenchPart part, int align, boolean allowDifferentParent)

The default constructor would pass 'false'.