Bug 541513 - Provide better feedback in Model Explorer for Invalid representation
Summary: Provide better feedback in Model Explorer for Invalid representation
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 5.1.3   Edit
Hardware: PC Windows 10
: P3 enhancement (vote)
Target Milestone: 5.1.4   Edit
Assignee: Project inbox CLA
QA Contact: Florian Barbin CLA
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks: 541734
  Show dependency tree
 
Reported: 2018-11-23 11:17 EST by Laurent Fasani CLA
Modified: 2019-01-24 04:53 EST (History)
4 users (show)

See Also:


Attachments
Invalid representation projects (12.36 KB, application/x-zip-compressed)
2018-11-23 11:23 EST, Laurent Fasani CLA
no flags Details
Invalid representation projects (15.63 KB, application/x-zip-compressed)
2018-11-29 10:17 EST, Laurent Fasani CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Fasani CLA 2018-11-23 11:17:11 EST
Currently, when the DDRepresentationDescriptor.target is null, 
* the representation is grayed in the Model Explorer tree.
* the only avaiblable action on representation is Delete

The aim of this ticket is to extend this behavior to the representation that is not reachable:
* either because the DRepresentationDescriptor repPath is null
* or the DRepresentationDescriptor repPath contains an URI that is not reachable. It is the case for example if the DRepresentation is deleted. These cases happens when:
 - there is a bad fragment in the repPath URI
 - there is a bad segment in the repPath URI
 - the DRepresentation is not existing anymore

In addition, the filter _Representations known as dangling_ would be renamed in _Representations known as invalid_. It would cover the dangling and the non reachable representation
Comment 1 Laurent Fasani CLA 2018-11-23 11:23:59 EST
Created attachment 276677 [details]
Invalid representation projects
Comment 2 Eclipse Genie CLA 2018-11-27 13:04:52 EST
New Gerrit change created: https://git.eclipse.org/r/133143
Comment 3 Eclipse Genie CLA 2018-11-27 13:04:55 EST
New Gerrit change created: https://git.eclipse.org/r/133142
Comment 4 Eclipse Genie CLA 2018-11-27 13:04:59 EST
New Gerrit change created: https://git.eclipse.org/r/133141
Comment 5 Laurent Fasani CLA 2018-11-29 09:09:57 EST
STEPS TO VALIDATE
* open both projects from "Invalid representation projects" attached file
* In "Model Explorer" view, expand both semantic model and "representation per category" node to see the 6 representation
-> In the testEcoreInvalidRep project, only "new ClassesDiagram Correct" representation should be valid(icon and text not grayed)
-> In the testEcoreInvalidRepSplit project, only "new ClassesDiagram Correct" and "P0 package entities with bad repPath fragment" representations should be valid(icon and text not grayed)
* right click on a valid representation
-> Open, Delete, Rename, Copy, "Extract to aird file" and "Export representations  as images" actions should be displayed in the contextual menu
* right click on an INVALID representation
-> Only Delete action should be displayed in the contextual menu
* Click on "Customize view" button and then check "Representations known as invalid"
-> Invalid representations should not be displayed any more in the Model Explorer
Comment 6 Laurent Fasani CLA 2018-11-29 10:17:34 EST
Created attachment 276765 [details]
Invalid representation projects
Comment 7 Laurent Fasani CLA 2018-11-29 12:16:53 EST
VALIDATION

Edition of Comment 5, for the step "right click on an INVALID representation" and "right click on an INVALID representation"


* right click on a valid representation under the semantic model tree
-> Open, Delete, Rename, Copy, "Extract to aird file" and "Export representations  as images" actions should be displayed in the contextual menu
* right click on a valid representation under "representations per category"
-> Open, Delete, Rename, Copy, "Extract to aird file", "Export representations  as images" , Control (and eventually some other actions) actions should be displayed in the contextual menu
* right click on an INVALID representation both under the semantic model tree or under "representations per category"
-> Only Delete action should be displayed in the contextual menu
Comment 8 Eclipse Genie CLA 2018-11-30 03:51:32 EST
New Gerrit change created: https://git.eclipse.org/r/133288
Comment 13 Eclipse Genie CLA 2018-11-30 05:54:27 EST
New Gerrit change created: https://git.eclipse.org/r/133301
Comment 15 Eclipse Genie CLA 2018-11-30 11:26:34 EST
New Gerrit change created: https://git.eclipse.org/r/133317
Comment 17 Jessy Mallet CLA 2018-12-10 12:02:13 EST
By right clicking on an INVALID representation both under the semantic model tree or under "representations per category", there is 2 actions in the contextual menu
"Extract to aird file" and "Export Representation as image" which should not appear.
Comment 18 Laurent Fasani CLA 2018-12-12 03:38:07 EST
There was a mistake in the scenario. Below is the expected
* right click on an INVALID representation both under the semantic model tree or under "representations per category"
-> Only Delete, "Extract to aird file" and "Export Representation as image" actions should be displayed in the contextual menu

"Extract to aird file" and "Export Representation as image" have been kept because otherwise it would have implied some impacting changes in the code that were not in the scope of this ticket.
Comment 19 Laurent Fasani CLA 2018-12-12 03:39:04 EST
validated with DOREMI 11.0.1RC2
Comment 20 Pierre-Charles David CLA 2019-01-24 04:53:51 EST
Available in Sirius 5.1.4, see https://wiki.eclipse.org/Sirius/5.1.4 for details.