Community
Participate
Working Groups
Although all created commands must have a label, it's not true in practice. Many commands are wrapped inside other commands and hence only the top command and/or the bottom command actually has a non-empty or non-null label. If only the top command has a label CompositeCommand#reduce() may reduce this command to one of it's child or grandchild, hence the resultant command's label is lost. This is the case for "Arrange All" and "Arrange Selection" actions. 1. Open up any GMF example diagram. 2. Put a few shapes on the diagram. 3. Click on "Arrange All" from the tool bar. 4. Open up diagram right-click (context) menu, go to "Edit" -> "Undo" Problem: menu item for undo should read "Undo Arrange All" (or "Undo Arrange") instead it reads "Undo", because executed command didn't have a label. There may be other commands that are missing labels, for which CompositeCommand#reduce() will destroy the top command label. Hence, the fix should probably go in CompositeCommand#reduce()#reduce() method to copy the label into resultant reduced command if it didn't have a label.
Created attachment 56774 [details] patch Patch planned for 1.0.3
Fixes committed for 1.0.3 and 2.0. Marking as fixed.
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug