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

Bug 441946

Summary: Reorganize VSM context menus to put most common actions/items first
Product: [Modeling] Sirius Reporter: Pierre-Charles David <pierre-charles.david>
Component: CoreAssignee: Benjamin Grouhan <benjamin.grouhan>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: cedric.brun, laurent.redor
Version: 1.0.0Keywords: triaged
Target Milestone: 3.0.0   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/47320
https://git.eclipse.org/r/47321
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=1ac4ac9dbd7c64b754b6dc5478a86bb4bddef96c
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=1fbed5da54c01c9279bf2e4ff358aa0574613f9f
https://git.eclipse.org/r/48290
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=375829e6316493659fdcf770f1fedd5f19d6128f
https://git.eclipse.org/r/48797
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=7fc40e9e70cb4cdb00a16b2616df845aa3065aa2
Whiteboard:

Description Pierre-Charles David CLA 2014-08-18 05:23:40 EDT
As part of bug #436643, the VSM context menus (the "New XXX >" sub-menus and their items) were reorganized to make sure all elements are present with no duplicates. The sub-menus are their items are now sorted by name, but this means some of the most commonly used elements appear after others which are rarely used.

The usability of the tool could be improved by putting the most common/useful items first.

This is not trivial for two reasons:
* there is an element of subjectivity regarding what is the most common/useful;
* the modularity of the system means the core code does not know about all the actions that dialects will provide, so we need some "priority" system to allow dialects to tell the core where they want their actions to be inserted. Experience with this kind of systems (GMF extensions priorities, property sections after/before attributes, etc.) show it is often difficult to get (and maintain!) a specific result.
Comment 1 Cedric Brun CLA 2014-08-18 09:18:49 EDT
Indeed there is some subjectivity the goal is mostly to fix cases which are getting into the way when one starts and discover the tooling. Right now the tool drives you toward mistakes. From a quick survey :

on a Group : 
Palette,Viewpoint => we are expected to create a Viewpoint first, the palette is quite optional.
on a Viewpoint : Extension, Import, Representation, Template, Validation whereas we should have : Representation, Template, Validation, Import, Extension

on a DiagramDescription : "Additional Layers, Default Layer" should be the other way around.

on a Layer : Customization, Diagram Element , Import , Tool whereas  Diagram Element, Tool, Customization, Import would be more suitable.

on a Diagram Mapping : Conditional Style/ Diagram Element / Import / Style whereas Style/ Diagram Element / Conditional Style/  Import would be more consistent with the frequency we tend to use these tools.

on a TableDescription :  Navigation, Representation Creation, Table Element, Tool whereas the Table Element should be first, and then Tools, and then the other menus.

All in all,  ordering the submenus would probably be enough for a first change.

AbstractMenuBuilder could be a good spot to do such a modification and allow subclasses to specify a prefered position which could be used to sort the menus accordingly.
Comment 2 Laurent Redor CLA 2014-08-19 05:03:35 EDT
The initial bugzilla referenced by Pierre-Charles is bug #436343 (and not bug #436643).
Comment 3 Pierre-Charles David CLA 2014-10-06 04:43:34 EDT
This will have to wait for the next version.
Comment 4 Eclipse Genie CLA 2015-05-06 11:12:33 EDT
New Gerrit change created: https://git.eclipse.org/r/47320
Comment 5 Eclipse Genie CLA 2015-05-06 11:12:36 EDT
New Gerrit change created: https://git.eclipse.org/r/47321
Comment 8 Pierre-Charles David CLA 2015-05-19 05:57:32 EDT
The infrastructure is now in place, the only thing left is to actually define the relative order of the menu items. It should not be difficult (though maybe a little cumbersome) if we use Obeo Designer 6.2 as a reference.
Comment 9 Eclipse Genie CLA 2015-05-20 11:16:10 EDT
New Gerrit change created: https://git.eclipse.org/r/48290
Comment 11 Eclipse Genie CLA 2015-05-27 11:42:32 EDT
New Gerrit change created: https://git.eclipse.org/r/48797
Comment 13 Pierre-Charles David CLA 2015-05-28 11:38:15 EDT
I'm closing this even though there may be some improvements/adjustments needed on the concrete ordering, but the majority of the new values have been commited and the new state is much better than what we had before.
Comment 14 Pierre-Charles David CLA 2015-06-24 11:15:42 EDT
Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0.