Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » closing editor when isDirty() == true
closing editor when isDirty() == true [message #449376] Thu, 11 May 2006 11:47 Go to next message
Eclipse UserFriend
Originally posted by: public.bojerco.REMOVE.com

When I close app with dirty editors I'll get prompted if I want to save
dirty editor(s). I also overrode IEditorPart.doSave() method.

My problem is if user clicks on "Yes" (for save) I perform data
validation and if data is not validated I want to stop editor from
closing. How can I do this in doSave method? Is there a better way?
Re: closing editor when isDirty() == true [message #449385 is a reply to message #449376] Thu, 11 May 2006 13:51 Go to previous messageGo to next message
Eclipse UserFriend
You get a IProgressMonitor in your doSave() method.
Calling the method
monitor.setCanceled(true)
will cancel the closing process.

Hope that helps,
Stefan

Ivan B schrieb:
> When I close app with dirty editors I'll get prompted if I want to save
> dirty editor(s). I also overrode IEditorPart.doSave() method.
>
> My problem is if user clicks on "Yes" (for save) I perform data
> validation and if data is not validated I want to stop editor from
> closing. How can I do this in doSave method? Is there a better way?
Re: closing editor when isDirty() == true [message #449388 is a reply to message #449385] Thu, 11 May 2006 14:12 Go to previous message
Eclipse UserFriend
Originally posted by: public.bojerco.REMOVE.com

Yes, that does it. Thank you very much!

Stefan Zugal wrote:
> You get a IProgressMonitor in your doSave() method.
> Calling the method
> monitor.setCanceled(true)
> will cancel the closing process.
>
> Hope that helps,
> Stefan
>
> Ivan B schrieb:
>> When I close app with dirty editors I'll get prompted if I want to
>> save dirty editor(s). I also overrode IEditorPart.doSave() method.
>>
>> My problem is if user clicks on "Yes" (for save) I perform data
>> validation and if data is not validated I want to stop editor from
>> closing. How can I do this in doSave method? Is there a better way?
Previous Topic:Library plugin - config files
Next Topic:How to detect if a View has been selected?
Goto Forum:
  


Current Time: Sat Aug 30 23:09:59 EDT 2025

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

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

Back to the top