|
How to prevent an editor from closing -
06-01-2009, 08:40 AM
Hi,
I am writing an Eclipse rcp application that features a FormEditor part. When the editor is dirty and someone tries to close it, he will be trapped in the promptToSaveOnClose() method. If the answer is "cancel" or "no", everything is fine.
If the answer is "yes", the editor's content is going to be validated and saved. The problem arises, if validation encounters an error. Then I open a message window to inform the user. If he clicks "ok", the dialog window and the editor close.
How can I prevent the editor from closing after an error was encountered? Is there any boolean I have overseen like "canClose" or so? Having searched for a solution, I would appreciate any hint.
Thanks
Heiko
|