Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 436343

Summary: Duplicate or badly ordered new child menus in VSM editor
Product: [Modeling] Sirius Reporter: Maxime Porhel <maxime.porhel>
Component: CoreAssignee: Maxime Porhel <maxime.porhel>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: pierre-charles.david
Version: 1.0.0Keywords: triaged
Target Milestone: 1.0.0   
Hardware: PC   
OS: Windows NT   
Whiteboard:
Bug Depends on: 427803    
Bug Blocks:    

Description Maxime Porhel CLA 2014-06-02 05:30:06 EDT
During Bug 427803, Diagram specific code has been moved in Diagram specific plugin. 

The Diagram specific elements can be created from the new child menus in the VSM editor, but several items now appear in the New.. submenu whereas they should appear in on of the categorized menu (New Diagram Element, New Extension, ..)

Furthermore, the menus labels end with '...' which does not correspond to a standard sub-menu label suffix but to a menu item leading to the opening of a dialog/wizard.
Comment 1 Maxime Porhel CLA 2014-06-03 03:58:27 EDT
Proposed fixes: 
 . https://git.eclipse.org/r/27780: Add RepresentationExtensionDescription creation menu item to the New Extension menu (concrete case: DiagramExtensionDescription)
 . https://git.eclipse.org/r/27781: Make AbstractMenuBuilder.getLabel() public
 . https://git.eclipse.org/r/27782: Place refactoring menus after the Edit group
 . https://git.eclipse.org/r/27783: Rename the refactoring menu into Refactor
Comment 2 Maxime Porhel CLA 2014-06-03 05:05:39 EDT
After the split sevral menu builders have been moved to the org.eclipse.sirius.editor.diagram plugin. 

They are nos added at the end of the menusBuilders list (see  the constructor of org.eclipse.sirius.editor.tools.internal.presentation.CustomSiriusActionBarContributor which calls   builders.addAll(MenuBuildersManager.getInstance().getContributedMenuBuilders()); after the add of the core buidlers).

We could:
 . keep the "definition + load" order: core builders, then contributed builders
 . contributed builders (in the load order) and then the core builders
 . sort the builders by label
Comment 3 Maxime Porhel CLA 2014-06-03 12:03:30 EDT
See
 . https://git.eclipse.org/r/27839: add a New Reorder menu for Sequence reorder tools
 . https://git.eclipse.org/r/27840: complete the existing new child categorized menus
 . https://git.eclipse.org/r/27841: Introduce CompositeMenuBuilder to avoid duplicate menus
 . https://git.eclipse.org/r/27842: Sort New child cration menus
Comment 4 Maxime Porhel CLA 2014-06-03 12:04:08 EDT
We have chosen to sort he creation menu by label.
Comment 5 Maxime Porhel CLA 2014-06-03 12:05:07 EDT
We might later introduce some weight capabilities to improve those menus order
Comment 6 Maxime Porhel CLA 2014-06-04 03:22:56 EDT
See also https://git.eclipse.org/r/#/c/27896/: Sort NEw child creation menu items order, sorted by text.
Comment 7 Maxime Porhel CLA 2014-06-04 04:31:50 EDT
Fixed by commits:
 . 090a9338b2187c80be3dd6c5ad36683b75b30b18
 . 436c81c6eab04d675e531b3230ae946625d93ea8
 . c7f847b8714cf30318c61bd5e44beb2710ea5f92
 . e7a4bc533be313a4e24868aa89f7a771039984b4
 . a49ca1eafc515bdd78c494fea6a34963edb5dc75
 . a3e6a2a8f1d7a800ac1c6f73de7f14cafb9061cf
 . 547cf6b32dfe2f7071d859bfdcf3f8ee799a2fb6
 . 12564ce0a3a0ec4322d7ebe4aedda49992aa271b
Comment 8 Pierre-Charles David CLA 2014-06-10 07:09:11 EDT
Verified on 1.0.0rc3.
Comment 9 Pierre-Charles David CLA 2014-06-25 10:15:11 EDT
Available in Sirius 1.0.0.