Setting editor tab dirty in EMF generated Editor [message #483198] |
Mon, 31 August 2009 14:23 |
Eclipse User |
|
|
|
Originally posted by: formatzeh.gmx.de
I generated a MultiPageEditor with EMF. As I wanted being able to
investigate the source of a model I added the default XML editor from
the WTP project as a tab with the following code:
StructuredTextEditor editor = new StructuredTextEditor();
editor.setEditorPart(this);
int xmlEditorIndex = addPage(editor, getEditorInput());
setPageText(xmlEditorIndex, "Source");
But if I modify something in the StructuredTextEditor tab the resource
doesn't get dirty, means that if I change something in the source tab
the * won't appear next to the resource name in the editor. How can I
achieve this? Now I have to open the resouce with right click-->open
with-->Text Editor and there the file is dirty and I can save it. But
that's annoying as you understand :) And for example if I modify
something in the source tab then the labels and all in the model tabs
should update as well. Any hints?
|
|
|
|
|
Re: Setting editor tab dirty in EMF generated Editor [message #483467 is a reply to message #483423] |
Tue, 01 September 2009 17:01 |
Eclipse User |
|
|
|
Originally posted by: formatzeh.gmx.de
Ok...does someone has an idea how to achieve this?
Ed Merks wrote:
> Gilbert,
>
> The EMF editor itself determines dirtiness by virtue of the state of the
> command stack. To get this all working properly, something needs to be
> done to integrate the command stack of the text editor and the one being
> used by the overall EMF generated editor. I have no experience with how
> to do that though...
|
|
|
|
Powered by
FUDForum. Page generated in 0.03353 seconds