Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Intercepting the ProjectExplorer's Open action
Intercepting the ProjectExplorer's Open action [message #536924] Mon, 31 May 2010 10:05 Go to next message
Johnny Mongiat is currently offline Johnny Mongiat
Messages: 7
Registered: December 2009
Junior Member
Hello,

Is there some sort of mechanism for hooking into or intercepting the lifecycle of an Open action (via the context menu and double clicking on a selected resource) launched from the Project Explorer's view (i.e. a "pre-open" event...)?

Eclipse provides an IExecutionListener interface for intercepting commands (e.g. save command), but this is not applicable for the Open action. I know the common navigator framework has a notion of a common action provider (configured within an "org.eclipse.ui.navigator.navigatorContent" extension), to provide contributions, but is this really the only way...

Thanks.
Re: Intercepting the ProjectExplorer's Open action [message #536967 is a reply to message #536924] Mon, 31 May 2010 13:33 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

There are post events: IPartListener2#partOpened(*)

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: Intercepting the ProjectExplorer's Open action [message #536973 is a reply to message #536967] Mon, 31 May 2010 14:09 Go to previous messageGo to next message
Johnny Mongiat is currently offline Johnny Mongiat
Messages: 7
Registered: December 2009
Junior Member
I already looked at IPartListener2, which does come in handy for "post" events (as you mentioned). But for my specific use case flow, the "pre" event (logic to be executed before the Open action is even executed) is what I really need to hook into. Thanks for the suggestion anyways...
Re: Intercepting the ProjectExplorer's Open action [message #645985 is a reply to message #536973] Tue, 21 December 2010 08:30 Go to previous message
Tati  is currently offline Tati
Messages: 3
Registered: July 2010
Junior Member
Hi!
I met the same problem, have you already find any nice solution for this?
Previous Topic:Key Bindings in Eclipse FormEditor
Next Topic:how bind commands to buttons with enabled state
Goto Forum:
  


Current Time: Thu Aug 28 23:42:36 EDT 2014

Powered by FUDForum. Page generated in 0.02499 seconds