Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Disabling save of dirty part(Disabling save of dirty part)
Disabling save of dirty part [message #946787] Tue, 16 October 2012 14:03 Go to next message
Greg Babcock is currently offline Greg BabcockFriend
Messages: 24
Registered: October 2012
Junior Member
In 3.x I use the EditorPart.isSaveAllowed method to prevent users from saving invalid data. Is there anyway to accomplish the same thing in e4?
Re: Disabling save of dirty part [message #962164 is a reply to message #946787] Sun, 28 October 2012 22:50 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1049
Registered: July 2009
Senior Member

Yes, just implement the check in your @Persist method. For example you could check the state of your editor and prevent the user from saving. Example for @Pesist.

[Updated on: Sun, 28 October 2012 22:51]

Report message to a moderator

Re: Disabling save of dirty part [message #962255 is a reply to message #962164] Mon, 29 October 2012 00:38 Go to previous message
Greg Babcock is currently offline Greg BabcockFriend
Messages: 24
Registered: October 2012
Junior Member
This is not quite equivalent to 3.x where the isSaveAllowed() method disables the save button. Using @Persist would leave the save button enabled and require displaying an error dialog.

IMHO I think this is a regression that should be resolved with a new annotation.

Previous Topic:Adding a status bar to an E4 RCP application
Next Topic:Double Click Event prob
Goto Forum:
  


Current Time: Tue Dec 23 03:11:56 GMT 2014

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

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