Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312119 - [Layout] Arrange slection is enabled for selected shape compartment
Summary: [Layout] Arrange slection is enabled for selected shape compartment
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 2.3   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: 2.3   Edit
Assignee: Alex Boyko CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-07 15:37 EDT by Alex Boyko CLA
Modified: 2010-07-19 12:26 EDT (History)
4 users (show)

See Also:


Attachments
proposed patch (6.12 KB, patch)
2010-05-07 15:37 EDT, Alex Boyko CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Boyko CLA 2010-05-07 15:37:07 EDT
Created attachment 167553 [details]
proposed patch

If a shape compartment is selected that has ContainerEditPolicy installed on it then the "Arrange Selection" action is enabled, while it should be disabled as in GMF 2.2

The problem is that AarrangeCommand shouldn't have the container editpart contents of which are to be arranged in the list of nodes to be laid out. This is currently possible.

Given that ContainerEditPolicy is installed on all shapes instead of just the container shapes e.g diagrams and shape compartments the fix would be:
1) Ensure that arrange command doesn't add the container editpart to the list of nodes to be laid out
2) Provide the support in ContainerEditPolicy and ShapeContainerEditPolicy to return the correct target editpart, namely the container editpart for the arrange request.

Tested the patch manually as well as ran JUnits. Romain buddy tested the fix as well. Seems to work ok.

Anthony, can you please code review this fix?
Thanks in advance!
Comment 1 Alex Boyko CLA 2010-05-13 10:05:21 EDT
Hi Lidija,

Can you please code review this patch?
Thanks!
Comment 2 Anthony Hunter CLA 2010-05-13 12:25:37 EDT
Hi Alex, the patch is invalid

/cvsroot/modeling/org.eclipse.gmf/plugins/ does not exist anymore, the code is in

/cvsroot/modeling/org.eclipse.gmp/org.eclipse.gmf.runtime/plugins/
Comment 3 Lidija Grahek CLA 2010-05-13 17:34:55 EDT
Alex, I checked out the patch in my old workspace, changes seem good. I assume you will remove System.out.println from ArrangeCommand and create a valid patch (in new workspace).
Comment 4 Alex Boyko CLA 2010-05-13 17:40:01 EDT
:-) right, I did reove it, just keep forgetting that the uploaded patch still has it.
Comment 5 Alex Boyko CLA 2010-05-13 17:44:05 EDT
Delivered for 2.3
Comment 6 Eclipse Webmaster CLA 2010-07-16 23:38:20 EDT
[target cleanup] 2.3 RC was the original target milestone for this
bug
Comment 7 Eclipse Webmaster CLA 2010-07-19 12:26:43 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Diagram was the original product and component for this bug