Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » deprecated Activator(deprecated Activator.getdefault())
deprecated Activator [message #1122596] Tue, 01 October 2013 14:56 Go to next message
synhedionn Mising name is currently offline synhedionn Mising name
Messages: 15
Registered: March 2010
Junior Member
Hi,
Former, in sampleAction, I used package.Activator.getDefault().method();
but now getDefault() seems to have disappeared, so do you know how to do now?
Re: deprecated Activator [message #1123067 is a reply to message #1122596] Wed, 02 October 2013 02:51 Go to previous message
Thorsten Schlathölter is currently offline Thorsten Schlathölter
Messages: 208
Registered: February 2012
Location: Düsseldorf
Senior Member
Are you talking about your own bundle? If so note that the bundle Activator is only instantiated once. So you can always implement the singleton pattern and use a "getDefault" method to retrieve the one singleton instance. The method getDefault is not part of an API because it has to be implemented in a static manner. If you create a new Plugin-Project with an Activator the Singleton Pattern along with the getDefault method is up to my knowledge always created for you by the new ProjectWizard. On the other hand if you create an Activator after the project has been created you will get an empty class that extends from AbstractUIPlugin (nevertheless you can implement the required Singleton pattern).

HTH
Thorsten
Previous Topic:menu visibleWhen
Next Topic:Broker Nagivator location URI
Goto Forum:
  


Current Time: Mon Jul 28 02:21:30 EDT 2014

Powered by FUDForum. Page generated in 0.01434 seconds