Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » I need to execute some code when workbench exists
I need to execute some code when workbench exists [message #449131] Tue, 18 January 2005 16:08 Go to next message
Eclipse UserFriend
Originally posted by: fane.classys.net

Hi.

I want to close all open editors of a certain type when the user closes
the platform. For that, I'd use something like:

IEditorReferences refs =
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().getEditorReferences();

to get the list of open editors, then check them and close the ones that
are instanceof MyEditorType. Where can I put this code? I thought about
doing it in the stop() method of the class that implements
AbstractUIPlugin but it's too late then.

Thanx,
Mike
Re: I need to execute some code when workbench exists [message #449556 is a reply to message #449131] Wed, 26 January 2005 14:08 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Mike,

You may get more response if you ask on the eclipse.platform newsgroup,
since this is not an swt question.

Grant

"Mike Wazowski" <fane@classys.net> wrote in message
news:csjcai$b1f$1@www.eclipse.org...
> Hi.
>
> I want to close all open editors of a certain type when the user closes
> the platform. For that, I'd use something like:
>
> IEditorReferences refs =
>
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().getEdit
orReferences();
>
> to get the list of open editors, then check them and close the ones that
> are instanceof MyEditorType. Where can I put this code? I thought about
> doing it in the stop() method of the class that implements
> AbstractUIPlugin but it's too late then.
>
> Thanx,
> Mike
Previous Topic:Tooltip on specific entry in TableItem
Next Topic:Create my own TableViewer
Goto Forum:
  


Current Time: Thu Mar 28 20:54:39 GMT 2024

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

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

Back to the top