Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » MutilPageEditor & save
MutilPageEditor & save [message #145863] Sun, 01 August 2004 13:41 Go to next message
Eclipse UserFriend
Originally posted by: penzhan8451.sina.com

Hi,

I have two questions:

My editor is a MultiPageEditor that include two pages, one is a

GraphicalEditor and another is a text editor. when i open the multi page

editor (active page is graphical editor),then right click , the "Save"
menu

item is enable ! but i do nothing. why ?

Another question is that when i update the text editor, the
editor's

state is not dirty. How could i make the state dirty and save the update
in

text editor ?

Thanks in advance.
Re: MutilPageEditor & save [message #145898 is a reply to message #145863] Mon, 02 August 2004 10:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: word-up.gmx.de

Hi,

I'm not sure if I understood you right......

> when i open the multi page
>
> editor (active page is graphical editor),then right click , the "Save"
> menu
>
> item is enable ! but i do nothing. why ?

Is your problem that if you push the save button nothing happens.....?

If yes, do you have a save and a doSave method in your editor? If yes,
check if they are called and try to debug them. Post more informations
about your problem if you need further help.

Concerning your second problem. The normal way is, that your CommandStack
gets Dirty, if a command has executed after the last save. So in general
your editor should be in a dirty state, if your commandstack is dirty.
There exist CommandStackListeners for this purpose.

regards,

Max

pl fisher wrote:

> Hi,

> I have two questions:

> My editor is a MultiPageEditor that include two pages, one is a

> GraphicalEditor and another is a text editor. when i open the multi page

> editor (active page is graphical editor),then right click , the "Save"
> menu

> item is enable ! but i do nothing. why ?

> Another question is that when i update the text editor, the
> editor's

> state is not dirty. How could i make the state dirty and save the update
> in

> text editor ?

> Thanks in advance.
Re: MutilPageEditor & save [message #145940 is a reply to message #145863] Mon, 02 August 2004 15:44 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
"pl fisher" <penzhan8451@sina.com> wrote in message
news:ceirv5$ff0$1@eclipse.org...
> Hi,
>
> I have two questions:
>
> My editor is a MultiPageEditor that include two pages, one is a
>
> GraphicalEditor and another is a text editor. when i open the multi page
>
> editor (active page is graphical editor),then right click , the "Save"
> menu
>
> item is enable ! but i do nothing. why ?


Do you update this Action? Look at GraphicalEditor#updateActions() as an
example.


>
> Another question is that when i update the text editor, the
> editor's
>
> state is not dirty. How could i make the state dirty and save the update
> in
>
> text editor ?
>
> Thanks in advance.
>
Re: MutilPageEditor & save [message #146109 is a reply to message #145940] Tue, 03 August 2004 06:13 Go to previous message
Eclipse UserFriend
Originally posted by: penzhan8451.sina.com

hi,

Thanks your answers !

Now the problem had been solved.

I added a statement in commandStackChanged() like below :

public void commandStackChanged(EventObject e) {

...........
super.commandStackChanged(e); //added
}

About the second question, in doSave() method of my MultiPageEditor , I
added

like below:
public void doSave() {
...........
<texteditor>.doSave(null); //add
............
}


Thanks again !

Pratik Shah wrote:

> "pl fisher" <penzhan8451@sina.com> wrote in message
> news:ceirv5$ff0$1@eclipse.org...
> > Hi,
> >
> > I have two questions:
> >
> > My editor is a MultiPageEditor that include two pages, one is a
> >
> > GraphicalEditor and another is a text editor. when i open the multi page
> >
> > editor (active page is graphical editor),then right click , the "Save"
> > menu
> >
> > item is enable ! but i do nothing. why ?


> Do you update this Action? Look at GraphicalEditor#updateActions() as an
> example.


> >
> > Another question is that when i update the text editor, the
> > editor's
> >
> > state is not dirty. How could i make the state dirty and save the update
> > in
> >
> > text editor ?
> >
> > Thanks in advance.
> >
Previous Topic:Serializing Color with the model
Next Topic:Palette model and EditPart model?
Goto Forum:
  


Current Time: Thu Apr 18 08:56:45 GMT 2024

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

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

Back to the top