How to pop-up a message before closing the editor [message #259985] |
Thu, 08 July 2004 23:27  |
Eclipse User |
|
|
|
Originally posted by: ellis.yu.transfield.com
Dear all,
How do I validate the data when the user close the editor. I found
the editor will only check whether it's dirty or not. If I want to cancel
the "close" operation when the system found there's invalid data in the
editor, how can I do in Eclipse? I'm greatly appreciated on any help. Thanks
Rdgs
Ellis
|
|
|
|
|
|
|
Re: How to pop-up a message before closing the editor [message #313125 is a reply to message #260591] |
Fri, 02 March 2007 08:49  |
Eclipse User |
|
|
|
Originally posted by: Markus.Bon.qgrp.com
Daniel Megert schrieb:
> Ellis wrote:
>
>> Dear all,
>>
>> How do I validate the data when the user close the editor. I found
>> the editor will only check whether it's dirty or not. If I want to cancel
>> the "close" operation when the system found there's invalid data in the
>> editor, how can I do in Eclipse? I'm greatly appreciated on any help.
>> Thanks
>>
>>
> I assume you wrote your own editor. See ISaveablePart.doSave for details.
>
> Dani
>
>> Rdgs
>> Ellis
If you don't want to be restricted to a special editor, you can also
register a PartListener implementing org.eclipse.ui.IPartListener. Doing
so, you can react whenever a part is activated, deactivated,
broughtToTop, opened or closed.
regards
Markus
|
|
|
Powered by
FUDForum. Page generated in 0.02278 seconds