getting resource from model element [message #1070070] |
Wed, 17 July 2013 03:36  |
Eclipse User |
|
|
|
Hi,
I am opening a EMF model with a generated editor.
When I am selecting (by clicking) an element of this model, I would like to know which resource it comes from.
Using eContainer(), I can go up to the DocumentRoot but I have seen that when closing and opening back the editor, the DocumentRoot object's id changes so I cannot rely on this object to know which resource I am working on (I have a table mapping resources to DocumentRoot s).
So I'd like to get the resource's URI, which should not change, but I don't know how to get it from the model element.
Can someone give me a track ?
Thanks
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09046 seconds