Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » sharing objects in an RCP application
sharing objects in an RCP application [message #447779] Sat, 15 April 2006 20:47
Eclipse UserFriend
Originally posted by: admin.chatelp.org

Hi there !

I'm looking for a "best practice" to share objects between different
parts of my RCP application. For instance, i would like to:

1) hook to the startup of the application (should i use the lifecyle
methods provided by the workbench advisor, i read somewhere that it's
not a good idea)
2) When notified of the application startup, initialize some instances
that need to be accessed by different parts of my application
3) Be able to access the 'shared' instances anywhere in my code.

I see to 2 different possibilities, none of which seams acceptable to me:

The first would be to create the shared objects in the workbench
advisor and then propagate them using method calls from advisors to
advisors, then to my code.

The second, I'm currently using, is by initializing them in a viewer,
and accessing them with ....getActivePage().findView(MyViewer.ID) and
black magic in order to access the view and then the field
corresponding to my shared instance.

Any suggestions ?

Thanks,
Pierre
Previous Topic:Icons in Preferences Dialog
Next Topic:Menu - ActionBarAdvisor
Goto Forum:
  


Current Time: Fri Dec 06 11:14:22 GMT 2024

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

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

Back to the top