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

Bug 329744

Summary: [EMF Validation] Locate validation issues in model explorer
Product: [Modeling] Papyrus Reporter: Yann Tanguy <yann.tanguy>
Component: CoreAssignee: Ansgar Radermacher <ansgar.radermacher>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: Patrick.Tessier, sebastien.gerard
Version: 0.8.0   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 313986    

Description Yann Tanguy CLA 2010-11-09 04:49:03 EST
It should be possible to locate in the model explorer validation issues that are reported in the problem view.

The locate action can possibly be done by double clicking on the validation issus in Problem view, or with a 'locate in Papyrus' action added to the Problem view (when Papyrus is the active editor).

It should result in the model explorer expanded to show the element related to a given issue. The selection should be set on that precise element in the model explorer.
Comment 1 Ansgar Radermacher CLA 2010-11-14 17:23:23 EST
(In reply to comment #0)
> It should be possible to locate in the model explorer validation issues that
> are reported in the problem view.
> 
> The locate action can possibly be done by double clicking on the validation
> issus in Problem view, or with a 'locate in Papyrus' action added to the
> Problem view (when Papyrus is the active editor).
> 
> It should result in the model explorer expanded to show the element related to
> a given issue. The selection should be set on that precise element in the model
> explorer.

Should be fixed by a new editor matching strategy (in org.eclipse.papyrus.editor).
Comment 2 Ansgar Radermacher CLA 2010-11-15 03:38:52 EST
(In reply to comment #1)
> (In reply to comment #0)
> > It should be possible to locate in the model explorer validation issues that
> > are reported in the problem view.
> > 
> > The locate action can possibly be done by double clicking on the validation
> > issus in Problem view, or with a 'locate in Papyrus' action added to the
> > Problem view (when Papyrus is the active editor).
> > 
> > It should result in the model explorer expanded to show the element related to
> > a given issue. The selection should be set on that precise element in the model
> > explorer.
> 
> Should be fixed by a new editor matching strategy (in
> org.eclipse.papyrus.editor).

Precision: the check-in fixes change the strategy for activating an existing editor instead of opening a new one. Thus, an already opened Papyrus editor will be activated an select the element referenced by the marker in the model explorer. If the editor is not already open, the UML tree editor will be opened.
Comment 3 Yann Tanguy CLA 2011-02-02 12:38:48 EST
The model explorer is not correctly expanded in case the marked element appears as a children of "LinkItem"

ex: 

Class
 |_ ownedAttribute		<- the overlay does not seem to be set here
         |_ Port					<- the tree is not expanded to that element
Comment 4 Yann Tanguy CLA 2011-02-03 05:40:41 EST
(In reply to comment #3)
> The model explorer is not correctly expanded in case the marked element appears
> as a children of "LinkItem"
> 
> ex:
> 
> Class
> |_ ownedAttribute		<- the overlay does not seem to be set here
> |_ Port					<- the tree is not expanded to that element

May be related to this bug:
335835: [Model Explorer] ModelExplorerView#revealSemanticElement() does not always reveal element
https://bugs.eclipse.org/bugs/show_bug.cgi?id=335835
Comment 5 Ansgar Radermacher CLA 2012-10-21 18:09:09 EDT
This bug has been fixed in revision 8526 of Papyrus 0.9.x (PageBookView calls reveal operation that is also to show the the associated element in the model explore when an element in a diagram is selected).

See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=386756
(however, bug had been fixed before 386756 was reported).