Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to run code in a contributing plugin after a view has been created?
icon3.gif  How to run code in a contributing plugin after a view has been created? [message #489783] Mon, 05 October 2009 22:15
Marian Seitner is currently offline Marian SeitnerFriend
Messages: 4
Registered: October 2009
Junior Member

at first I'd like to outline my project shape to clarify things...

Plugin A (RCP Application running the display and workbench)
Plugin B (contributing perspectives, views etc. to Plugin A)

After one of the perspectives (and the corresponding views) in plugin B gets loaded I want some code to be run. How to do that most elegantly?

Approach 1:
Invoke the code from createPartControl() of the view(s).
- Horrible since that creates hard-coded dependencies I want to avoid

Approach 2:
Register an IPartListener(2) in the plugin activator of B that runs the code after the view(s) of interest have been opened.
- Works great so far, however I'm curious if this is the way to go...

Any comments are greatly appreciated!

Kind regards,
Previous Topic:combining "SWT stuff" with "view/perspective stuff"
Next Topic:how to change/hide the borders for a ViewPart
Goto Forum:

Current Time: Tue Jun 19 07:09:54 GMT 2018

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

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

Back to the top