Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF Source Page
EMF Source Page [message #902949] Tue, 21 August 2012 11:34 Go to next message
Simon Barnett is currently offline Simon BarnettFriend
Messages: 28
Registered: July 2012
Junior Member
Does anyone know how to create a Source page for a multi-page Eclipse editor (based on EMF) which the user can use to edit the XML of the model directly?

I've got the contents of the XML displayed in an editor page using a TextEditor but it isn't bound to the model so when the user edits it, it doesn't set the file to be dirty and cannot be saved.

Any ideas?
Re: EMF Source Page [message #902951 is a reply to message #902949] Tue, 21 August 2012 11:46 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Simon,

I don't recall anyone has done that. I could imagine doing this at a
course grained level. I.e., a command stack listener could update the
textual view each time a command is executed. The generated editor
already has such a listener to update the properties view. A listener on
the text view could unload the resource and reload it from the textual
source; this is trickier because you'd not want to do that on each
keystroke...


On 21/08/2012 1:34 PM, Simon Barnett wrote:
> Does anyone know how to create a Source page for a multi-page Eclipse
> editor (based on EMF) which the user can use to edit the XML of the
> model directly?
>
> I've got the contents of the XML displayed in an editor page using a
> TextEditor but it isn't bound to the model so when the user edits it,
> it doesn't set the file to be dirty and cannot be saved.
>
> Any ideas?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF Source Page [message #902955 is a reply to message #902951] Tue, 21 August 2012 11:55 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Sure someone has done it ;-) Look at the e4xmi-Editor it shows a form
based UI and one that is based on the XML-Editor sample one can create
using the PDE-Wizard.

Tom

Am 21.08.12 13:46, schrieb Ed Merks:
> Simon,
>
> I don't recall anyone has done that. I could imagine doing this at a
> course grained level. I.e., a command stack listener could update the
> textual view each time a command is executed. The generated editor
> already has such a listener to update the properties view. A listener on
> the text view could unload the resource and reload it from the textual
> source; this is trickier because you'd not want to do that on each
> keystroke...
>
>
> On 21/08/2012 1:34 PM, Simon Barnett wrote:
>> Does anyone know how to create a Source page for a multi-page Eclipse
>> editor (based on EMF) which the user can use to edit the XML of the
>> model directly?
>>
>> I've got the contents of the XML displayed in an editor page using a
>> TextEditor but it isn't bound to the model so when the user edits it,
>> it doesn't set the file to be dirty and cannot be saved.
>>
>> Any ideas?
>
Previous Topic:Problem in the installed CDO Source
Next Topic:Xcore for Indigo
Goto Forum:
  


Current Time: Tue Apr 23 17:57:47 GMT 2024

Powered by FUDForum. Page generated in 0.04231 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top