Bug 541734 - 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: 6.1.2   Edit
Assignee: Laurent Fasani CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on: 541513
Blocks:
  Show dependency tree
 
Reported: 2018-11-30 04:41 EST by Laurent Fasani CLA
Modified: 2019-02-15 09:02 EST (History)
4 users (show)

See Also:


Attachments
Invalid representation projects (15.63 KB, application/x-zip-compressed)
2018-11-30 04:42 EST, Laurent Fasani CLA
no flags Details
Invalid representation projects (12.66 KB, application/x-zip-compressed)
2018-11-30 05:33 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-30 04:41:45 EST
+++ This bug was initially created as a clone of Bug #541513 +++

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-30 04:42:40 EST
Created attachment 276777 [details]
Invalid representation projects
Comment 2 Eclipse Genie CLA 2018-11-30 05:14:49 EST
New Gerrit change created: https://git.eclipse.org/r/133294
Comment 3 Eclipse Genie CLA 2018-11-30 05:14:52 EST
New Gerrit change created: https://git.eclipse.org/r/133297
Comment 4 Eclipse Genie CLA 2018-11-30 05:14:56 EST
New Gerrit change created: https://git.eclipse.org/r/133296
Comment 5 Eclipse Genie CLA 2018-11-30 05:14:59 EST
New Gerrit change created: https://git.eclipse.org/r/133295
Comment 6 Laurent Fasani CLA 2018-11-30 05:33:11 EST
Created attachment 276779 [details]
Invalid representation projects
Comment 7 Laurent Fasani CLA 2018-11-30 05:36:53 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 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
* 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 12 Eclipse Genie CLA 2018-12-26 10:58:38 EST
New Gerrit change created: https://git.eclipse.org/r/134513
Comment 14 Laurent Fasani CLA 2018-12-26 11:13:56 EST
In addtion to the Description of this bug, there are changes on contextual menu in Model Explorer.
Contextual menus on invalid representations display only the Delete action.

STEPS TO VALIDATE
In addition to Comment 7 there is another scenario to test:
* right click on P0 package that contains many invalid representations
* click "Export representations as images"
-> only valid representation should be exported as images
Comment 15 Pierre Guilet CLA 2019-01-28 10:43:42 EST
Verified with OD CE 11.1.2

On invalid representations we can have additional menu Sow references/ Show EClass information.
Comment 16 Pierre-Charles David CLA 2019-02-15 09:02:11 EST
Available in Sirius 6.1.2, see https://wiki.eclipse.org/Sirius/6.1.2 for details.