How can I use self-defined model as EMF generated editors' input? How to handle the resource synchro [message #220350] |
Mon, 02 March 2009 07:03  |
Eclipse User |
|
|
|
Hi,
I managed to build a multi-page editor following TopicMap example. Now I
need to use self-defined model (not GMFResource) as my EMF generated
editor input, how can I achieve this?
Let me explain this by code, in TopicMap example, we use
editingDomain.getResourceSet() as the EMF editor's input:
selectionEditorPart.setInput(editingDomain.getResourceSet()) ;
And now, I want to use TopicMap class as the input of the EMF editor in
order to let TopicMap as the root element of each editor viewer:
TopicMap topicMap =
(TopicMap)editingDomain.getResourceSet().getResources().get( 0).getContents().get(0);
selectionEditorPart.setInput(topicMap);
So I did this. At the beginning, this worked fine. But after you saved
the resource, you could not do any modifications in EMF editor or any
modifications can not be recorded. I guess that the resource is updated
after save and is not synchronized with the input of each EMF editor,
but I don't know the best practice how to resolve this problem.
Any suggestions? Thanks!
--
Hexise
|
|
|
|
Powered by
FUDForum. Page generated in 0.27515 seconds