Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Setting editor tab dirty in EMF generated Editor
Setting editor tab dirty in EMF generated Editor [message #483198] Mon, 31 August 2009 14:23 Go to next message
Eclipse UserFriend
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 #483380 is a reply to message #483198] Tue, 01 September 2009 12:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

Is there an editor expert? I would like to ask this question in the EMF
group but I think the editor issue is better asked here.
Re: Setting editor tab dirty in EMF generated Editor [message #483423 is a reply to message #483380] Tue, 01 September 2009 14:59 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
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...


Gilbert Mirenque wrote:
> Is there an editor expert? I would like to ask this question in the EMF
> group but I think the editor issue is better asked here.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Setting editor tab dirty in EMF generated Editor [message #483467 is a reply to message #483423] Tue, 01 September 2009 17:01 Go to previous messageGo to next message
Eclipse UserFriend
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...
Re: Setting editor tab dirty in EMF generated Editor [message #484769 is a reply to message #483198] Wed, 09 September 2009 08:04 Go to previous message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

No idea? Can't imagine that no one added another editor tab to the
generated editor before.
Previous Topic:Associate Editor with Perspective
Next Topic:Build RCP product/plugin with command line
Goto Forum:
  


Current Time: Thu Apr 25 19:51:06 GMT 2024

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

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

Back to the top