Enabling Save function through performRequest [message #248011] |
Wed, 01 April 2009 03:14  |
Eclipse User |
|
|
|
Guys,
I'm building RCP application in which I handled mouse double click through
a edit part which extend AbstractGraphicalEditPart and implements
PropertyChangeListener, NodeEditPartperformRequest and changed the picture
of the edit part,in my Figure class I have also marked the rectangle dirty
via getUpdateManager().addDirtyRegion(this, getBounds()).
Now I want to ensure that my editor is informed about the change and Save
menu is enabled by the workbench. I have used PropertyChange mechanism and
added PropertyChange listed to my editor from where I set Dirty flag,
however I have found that Save menu is not enabled, after debugging I
realize that setEnabled function is not found true as there is not
activePart found dirty, can any one help here, that how should I set
dirtyFlag?
Regards,
Manpreet
|
|
|
Re: Enabling Save function through performRequest [message #248022 is a reply to message #248011] |
Wed, 01 April 2009 17:47   |
Eclipse User |
|
|
|
Ensure that you are implementing EditorPart#isDirty.
Ensure that you are calling firePropertyChange(IEditorPart.PROP_DIRTY).
I think that's it?
-Ben
Manpreet wrote:
> Guys,
> I'm building RCP application in which I handled mouse double click
> through a edit part which extend AbstractGraphicalEditPart and
> implements PropertyChangeListener, NodeEditPartperformRequest and
> changed the picture of the edit part,in my Figure class I have also
> marked the rectangle dirty via getUpdateManager().addDirtyRegion(this,
> getBounds()).
>
> Now I want to ensure that my editor is informed about the change and
> Save menu is enabled by the workbench. I have used PropertyChange
> mechanism and added PropertyChange listed to my editor from where I set
> Dirty flag, however I have found that Save menu is not enabled, after
> debugging I realize that setEnabled function is not found true as there
> is not activePart found dirty, can any one help here, that how should I
> set dirtyFlag?
>
> Regards,
> Manpreet
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.02636 seconds