Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360092 - [Model Explorer] revealSemanticElement doesn't work with imported package
Summary: [Model Explorer] revealSemanticElement doesn't work with imported package
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Views (show other bugs)
Version: 1.0.0   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: M6   Edit
Assignee: Camille Letavernier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 366029 406234
Blocks:
  Show dependency tree
 
Reported: 2011-10-06 08:47 EDT by Vincent Lorenzo CLA
Modified: 2014-02-26 13:14 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Lorenzo CLA 2011-10-06 08:47:50 EDT
The action Link with Editor doesn't work when we have dropped imported element in a diagram
Steps to reproduce : 
	1/ Create a new Papyrus Project with a class diagram and importing UMLPrimitiveTypes
	2/ Navigate in the ModelExplorer to see the package UMLPrimitiveTypes
	3/ Drop this package in the diagram
	4/ activate the function Link with Editor
	5/ select the package UMLPrimitiveTypes in the diagram
		-> this action doesn't work correctly, because the selection go to the root of the model in the ModelExplorer
		
		Note : the linkage is correct from the ModelExplorer to the Diagram
Comment 1 Toni Siljamäki CLA 2014-02-10 07:08:00 EST
Work on this issue should also cover testing on fragmented models.
For additional details see Bug 421392.
Comment 2 Camille Letavernier CLA 2014-02-10 07:28:00 EST
Fragment models are a slightly different issue, although I guess there are a few corner cases where this might not work (When the in-memory containment tree is not complete, because fragments never know their parent until it has been loaded, unlike standard elements)

The issue with "Import Package" is that the path to the imported model cannot be "guessed": we have to browse everything, until we find an "Import package" or "Import element" element. There may be 0, 1 or N results.

Refactoring the resource management to make libraries available at the root of the Model would greatly simplify the search.

For fragmented models, I don't see any other solution than "loading everything", which is not really compliant with a lazy model loading (But well, we don't really support lazy model loading anyway). So, everything works as long as the (intermediate) fragments are loaded, and they are always loaded. But in theory (i.e. with a proper lazy loading), this might either fail or cause the full model to be loaded.
Comment 3 Camille Letavernier CLA 2014-02-26 13:14:46 EST
Fixed in Bug 366029
The tests have been fixed in e2a2397 (master)