Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Enabling Save function through performRequest
Enabling Save function through performRequest [message #248011] Wed, 01 April 2009 07:14 Go to next message
Manpreet is currently offline ManpreetFriend
Messages: 7
Registered: July 2009
Junior Member
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 21:47 Go to previous messageGo to next message
Ben Vitale is currently offline Ben VitaleFriend
Messages: 247
Registered: July 2009
Senior Member
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
>
Re: Enabling Save function through performRequest [message #248267 is a reply to message #248022] Mon, 13 April 2009 11:40 Go to previous message
Manpreet is currently offline ManpreetFriend
Messages: 7
Registered: July 2009
Junior Member
Perfect, it works. Thanks.
Previous Topic:[Announce] GEF 3.5.0 I200903311850 is available
Next Topic:[ZEST] Disable node replacing
Goto Forum:
  


Current Time: Thu Apr 25 07:23:08 GMT 2024

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

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

Back to the top