How to enable the "Revert" menu item in the "File" menu? [message #32241] |
Wed, 14 May 2003 13:40  |
Eclipse User |
|
|
|
Originally posted by: heather.hotmail.com
Hi,
If you open some "plugin.xml" file, go to the source page, make some
change there, open the "File" menu and you will notice that the "Save ..."
menu item is enabled but the "Revert" item is not. I understand that
"Revert" is available from the pop-up menu in the editor, but I'm
wondering if the "Revert" menu item from the "File" menu is fixable.
I developed a customized multi-page editor plug-in and whenever there is a
change in the editor, I
do"EditorPart.firePropertyChange(EditorPart.PROP_DIRTY)" to report the
editor change to the workbench. I assume the "Revert" menu item should be
turned on just like the "Save" item, but it isn't.
However the "Revert" menu item does get enabled when there is a change in
a regular editor in Eclipse.
Does anyone have an idea about how to fix this? I'm using Eclipse 2.0.1.
Thanks!
Heather
|
|
|
Re: How to enable the "Revert" menu item in the "File" menu? [message #32276 is a reply to message #32241] |
Wed, 14 May 2003 13:47  |
Eclipse User |
|
|
|
Originally posted by: simon.ibm.oti.lab
You'll have to open a problem report against PDE to find out why the File >
Revert is never enabled in their plugin.xml editor.
File > Revert is a global action, that is a retargetable action. From the
IActionBar.setGlobalActionHandler, you can set an action to handle this menu
item (IWorkbenchActionContants.REVERT). The text editor framework has the
RevertToSavedAction that can be used as the action handler for the retarget
action REVERT.
Simon :-)
"Heather" <heather@hotmail.com> wrote in message
news:b9tv1s$glr$1@rogue.oti.com...
> Hi,
>
> If you open some "plugin.xml" file, go to the source page, make some
> change there, open the "File" menu and you will notice that the "Save ..."
> menu item is enabled but the "Revert" item is not. I understand that
> "Revert" is available from the pop-up menu in the editor, but I'm
> wondering if the "Revert" menu item from the "File" menu is fixable.
>
> I developed a customized multi-page editor plug-in and whenever there is a
> change in the editor, I
> do"EditorPart.firePropertyChange(EditorPart.PROP_DIRTY)" to report the
> editor change to the workbench. I assume the "Revert" menu item should be
> turned on just like the "Save" item, but it isn't.
>
> However the "Revert" menu item does get enabled when there is a change in
> a regular editor in Eclipse.
>
> Does anyone have an idea about how to fix this? I'm using Eclipse 2.0.1.
>
> Thanks!
>
> Heather
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02635 seconds