| [news.eclipse.tools.emf] Re: Access EcoreModel instance |
Karkon,
Comments below.
Each workbench page provides access to all the open editors, so I guess you could scan them all...Hi Ed!
Yes, my intention is to make a m2m transformation on Ecore models and to see the changes on the fly.
Okay, all editors implement the interface you mentioned below but now:
The user chooses which model is the source and which one is the destiantion. This decision is made via a workspace browser and the files are selected.
After that decision the model shall be opened with the default editor (e.g. Ecore Model Editor).
Maybe one model is already opened.
How to find now the corresponding editor?
And above all how to automatically open a file in an editor from another plugin?
The generated wizard's performFinish shows how to do that.
Hmm, weird ;)
Cheers harkon
Ed Merks wrote:
Harkon,
Comments below.
harkon wrote:You haven't talked about making modifications yet, so I'm missing the connection or a step as to why the display needs refreshing.Hi everybody...
I encountered a problem in accessing an instance of a Ecore modell residing in my workspace of Eclipse.
Situation: I want to access an Ecore Modell from a newly created Plugin existing in the current Eclipse instance. This can be done via an URL file based. if I now open die URL I can access the content and everything is fine.
Now if an Ecore Model editor is open in the same time the model won't be updated immediately. I have to refresh the display.All generated editors implement IEditingDomainProvider so you can cast the editor to that, get the editing domain, and from that you have access to the resource set in which all the resources being edited are kept.
Question: The Ecore Model Editor owns a Ecore Model reference itself (EObject root node). How can I access this root node of the opened Ecore Model Editor?The background is: I want to alter the content of an Ecore model via EMF techniques and whenever a change was registered the EMF fires various events about this update and the Ecore Model Editor changes its display "on the fly".Be sure to use the command stack of the editing domain to make all your changes so that the editor can undo the changes and knows that it's dirty and needs to save.Now if I change the model from another Eclipse Plugin via this root node instance of the opened Ecore Model Editor I can "see" the changes in the moment they happen...
I hope I made myself clear enough that some one could help me ;)
Cheers harkon