[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.rcp] Re: View close event ?
|
You can have your view implement the ISaveablePart2 interface. Have the
isDirty() and isSaveOnCloseNeeded() methods answer true, and the
promptToSaveOnClose() method answer ISaveablePart2.CANCEL to stop the
view from closing. Read the comments for more information (note that
your view will have a '*' in the tab title).
HTH,
Wayne
On Tue, 2008-04-22 at 07:00 +0000, KiMoon wrote:
> HI.
>
> trying to give some action on x button when it's being pressed
> Just like asking whether to save or not when we close editor after giving
> some changes
> we are trying to use this similar function on a view. (when view asked to
> be closed, pop up yes/no dialog
> and if it's 'yes', close the view and if it's 'no', fail to close it.)
>
> Thanks.
>