|
Re: Confirm view closing. [message #337087 is a reply to message #337057] |
Mon, 27 July 2009 14:45 |
|
On Sat, 25 Jul 2009 10:31:02 +0200, Felix Dorner wrote:
> Forwarding to eclipse.platform.
>
>> A user clicks the small x in a view to close that view. What's the
>> correct way to intercept this, so that I can ask for a confirmation to
>> close the view etc.
>
> I should probably add that the view I'm talking about is provided by my
> plug-in so I'm able to modify the view implementation itself should that
> be neccessary.
>
> Thanks again,
> Felix
When you own the perspective you can mark a view as not closable. But
when your view is brought up in a perspective not owned by you then I'm
not aware of a way to tell Eclipse to mark it not closable.
It is possible to listen for part events like close by implementing
IPartListener and calling getPartService().addPartListener().
|
|
|
|
Re: Confirm view closing. [message #468267 is a reply to message #468102] |
Tue, 04 August 2009 18:36 |
|
On Tue, 04 Aug 2009 09:35:17 +0200, Daniel Megert wrote:
> Felix Dorner wrote:
>> Forwarding to eclipse.platform.
>>
>>> A user clicks the small x in a view to close that view. What's the
>>> correct way to intercept this, so that I can ask for a confirmation to
>>> close the view etc.
> See org.eclipse.ui.ISaveablePart2.promptToSaveOnClose()
>
> Dani
Good solution, thanks Dani.
|
|
|
Powered by
FUDForum. Page generated in 0.03165 seconds