opening a diagram from a resource [message #223830] |
Wed, 01 April 2009 06:32  |
Eclipse User |
|
|
|
Originally posted by: bmoros.um.es
Hi all,
is it possible to open a diagram editor only by knowing a resource? I will
try to explain the problem ...
In my ecore metamodel the Artifact class is linked to an EObject (element
atribute). It is a general EObject because it could be a Class, Property,
Use Case, etc., that is, it could be any of the UML elements, or any element
which belongs to another DSL. So far, when an ArtifactEditPart is selected,
I can open de model (tree editor) which the linked element belongs to as it
is explained in
http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg11197.html,
but I would like to know if it could be possible to open the diagram
editor. Given an EObject I can know the resource it belongs to, but can I
know the editor used to build the model?
Thanks in advance for your time.
Best regards,
Bego
|
|
|
|
|
Re: opening a diagram from a resource [message #224153 is a reply to message #224146] |
Thu, 02 April 2009 12:01  |
Eclipse User |
|
|
|
Hello Begoa,
If you are looking for a diagram containing this EObject then you have to:
1. load all diagrams you have available
2. traverse all diagram elements (Views) starting from diagram to find if
one of them is referncing this EObject
3. open diagram containing this View.
You can simplify this process by relying on particular diagram structure
orby using EMF CrossReferencer
-----------------
Alex Shatalin
|
|
|
Powered by
FUDForum. Page generated in 0.12404 seconds