Bug 533654 - Add capability to define new kind of "Select All" actions
Summary: Add capability to define new kind of "Select All" actions
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 5.1.0   Edit
Hardware: PC Windows 10
: P3 enhancement (vote)
Target Milestone: 5.1.2   Edit
Assignee: Project Inbox CLA
QA Contact: Laurent Redor CLA
URL:
Whiteboard:
Keywords: triaged
Depends on: 529992 533318 534301
Blocks: 534302
  Show dependency tree
 
Reported: 2018-04-17 05:01 EDT by Laurent Redor CLA
Modified: 2018-06-28 12:11 EDT (History)
1 user (show)

See Also:


Attachments
org.eclipse.sirius.sample.selectAll.zip (13.08 KB, application/x-zip-compressed)
2018-04-17 08:16 EDT, Laurent Redor CLA
no flags Details
org.eclipse.sirius.sample.selectAll.zip (13.38 KB, application/x-zip-compressed)
2018-04-17 09:16 EDT, Laurent Redor CLA
no flags Details
org.eclipse.sirius.sample.selectAll.zip (13.42 KB, application/x-zip-compressed)
2018-04-17 09:51 EDT, Laurent Redor CLA
no flags Details
Demo-Bugzilla533654-WithSirius5.1.2.gif (354.34 KB, image/gif)
2018-04-17 10:16 EDT, Laurent Redor CLA
no flags Details
org.eclipse.sirius.sample.selectAll.zip (13.50 KB, application/x-zip-compressed)
2018-04-19 09:21 EDT, Laurent Redor CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Redor CLA 2018-04-17 05:01:58 EDT
The goal of this issue is to allow specifier to define new kind of "Select All" actions such as:
* All elements with same mapping: Select all diagram elements that have the same mapping than the current selected diagram element
* All elements of same type: Select all diagram elements that have a semantic target with the same type than the current selected diagram element
* All elements of type...: Select all diagram elements that have a semantic target with the type chosen by the end-user
* All elements corresponding to expression...: Select all diagram elements returned by an expression written by the end-user
* All "specified elements in odesign" : Select all diagram elements corresponding to a specific request defined by the specifier

These actions need to be available in the contextual menu and in the tabbar.

This enhancement depends on other enhancements:
* bug 529992: Improve Sirius Popup Menu contributions
* bug 533318: Add standard diagram services to avoid duplicated code

It will probably not modify the code but only give an example to exploit what will be done in the other issues.
Comment 1 Laurent Redor CLA 2018-04-17 08:16:42 EDT
Created attachment 273642 [details]
org.eclipse.sirius.sample.selectAll.zip

Steps to test:
* Ensure that your version of Sirius contains the POC of bug 529992 and bug 533318.
* Enable the POC of bug 529992 by adding the VM arg "-Dorg.eclipse.sirius.experimental.popupMenuImprovement=true"
* Launch Eclipse
* Import the 2 projects from org.eclipse.sirius.sample.selectAll.zip in the workspace
    * org.eclipse.sirius.sample.selectAll.design: The Viewpoint Specification Project with the VSM defining a diagram with specific "Select All" actions like in description of this issue
	* org.eclipse.sirius.sample.selectAll: A modeling project to test the "Select All" actions
* Open diagram "myDiagram" from "org.eclipse.sirius.sample.selectAll"
* Launch action "Select/All Abstract Classes" from contextual menu on the diagram
* --> C01, C12 and C23 are selected
* Launch action "Select/All Elements with same mapping" from contextual menu on C11
* --> C01, C02, C11, C12, C21, C22 and C23 are selected
* Launch action "Select/All Elements of same type" from contextual menu on C11
* --> C01, C02, C11, C12, C21, C22, C23, "Container for C01" and "Container for C02" are selected
* Launch action "Select/All Elements of type..." from contextual menu on the diagram
* In the "domain class" field, write "ecore::EReference" and validate with OK
* --> The edge between C01 and C02, and the edge between C11 and C12 are selected
* Launch action "Select/All Elements corresponding to expression..." from contextual menu on the diagram
* In the "expression" field, write "aql:self.ownedDiagramElements->select(dde | dde.name.startsWith('C0'))" and validate with OK
* --> C01 and C02 are selected
Comment 2 Laurent Redor CLA 2018-04-17 09:16:19 EDT
Created attachment 273644 [details]
org.eclipse.sirius.sample.selectAll.zip
Comment 3 Laurent Redor CLA 2018-04-17 09:51:53 EDT
Created attachment 273646 [details]
org.eclipse.sirius.sample.selectAll.zip
Comment 4 Laurent Redor CLA 2018-04-17 10:16:21 EDT
Created attachment 273648 [details]
Demo-Bugzilla533654-WithSirius5.1.2.gif

Demo-Bugzilla533654-WithSirius5.1.2.gif: Animated Gif of the result of the POC
Comment 5 Laurent Redor CLA 2018-04-19 09:21:12 EDT
Created attachment 273685 [details]
org.eclipse.sirius.sample.selectAll.zip
Comment 6 Laurent Redor CLA 2018-04-19 09:23:55 EDT
With the updated test case and the last gerrit of bug 529992. It is now possible to see also the menu in tabbar, following the steps of comment 1, you can add:
* Select the diagram
* Launch action from tabbar "All Abstract Classes" in Select drop-down menu
* --> C01, C12 and C23 are selected
Comment 7 Laurent Redor CLA 2018-05-31 11:32:44 EDT
Another issue will be created to continue the work on this subject. So I close this issue as resolved.
Comment 8 Laurent Redor CLA 2018-05-31 11:33:03 EDT
There is no real validation as it is a POC.
Comment 9 Laurent Redor CLA 2018-06-28 12:11:07 EDT
Available in Sirius 5.1.2, see https://wiki.eclipse.org/Sirius/5.1.2 for details