MutilPageEditor & save [message #145863] |
Sun, 01 August 2004 09:41  |
Eclipse User |
|
|
|
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 06:47   |
Eclipse User |
|
|
|
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 #146109 is a reply to message #145940] |
Tue, 03 August 2004 02:13  |
Eclipse User |
|
|
|
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.
> >
|
|
|
Powered by
FUDForum. Page generated in 0.03156 seconds