Results 1 to 2 of 2
- 11-19-2008, 06:01 PM #1
Member
- Join Date
- Nov 2008
- Posts
- 2
- Rep Power
- 0
Why is my Plugin Activator not being started?
Hi All,
I have an rcp. It has 2 plugins. One core and one ui. The activator for the ui is not getting called. The activator is:
And in the MANIFEST.MF it has:Java Code:Plugin extends AbstractUIPlugin ... public void start(BundleContext context) throws Exception { super.start(context); plugin = this; }
When I am in on of my Views I call Plugin.getDefault(); and it returns null so clearly the start method has not been called.Java Code:Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Ui Plug-in Bundle-SymbolicName: com.myco.omni.adminsuite.ui; singleton:=true Bundle-Version: 1.0.0 [B]Bundle-Activator: com.myco.omni.adminsuite.ui.Plugin[/B] Bundle-Vendor: myco Require-Bundle: org.eclipse.ui, org.eclipse.ui.intro;bundle-version="3.2.201", org.eclipse.ui.console;bundle-version="3.3.0", org.eclipse.ui.forms;bundle-version="3.3.101", org.eclipse.ui.browser;bundle-version="3.2.201", org.eclipse.core.resources, org.eclipse.core.runtime, com.myco.omni.adminsuite;bundle-version="1.0.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Does anyone see what I'm not doing that I should be?
Thanks in advance,
Andrew
- 11-19-2008, 08:07 PM #2
Member
- Join Date
- Nov 2008
- Posts
- 2
- Rep Power
- 0
Talk about the weirdest thing. I still don't know why it wasn't calling/activating my plug-in so I decided to do it myself
So that got it to load my plug-in. Hurray!!Java Code:Plugin plugin = Plugin.getDefault(); if(null == plugin){ plugin = [B]activatePlugin[/B](Plugin.PLUGIN_ID); } ...snip... private Plugin [B]activatePlugin[/B](String pluginID) { Bundle bundle = Platform.getBundle(pluginID); try { bundle.start(); } catch (BundleException e) { // Auto-generated catch block e.printStackTrace(); } Application.writeToConsole("The Plug-in "+pluginID+" : "+bundle.getState()); return Plugin.getDefault(); }
So I think I'll move that method somewhere that others can use it and while I'm trying it in the debugger from a fresh re-start of the application it does not get called but the start method on the plug-in is getting called like it should of from the start.
So it seems like the plug-in registry has learned that it is supposed to load that plug-in now.
Hope this helps someone else one day,
Andrew
Similar Threads
-
JSP Getting Started.
By sukatoa in forum JavaServer Pages (JSP) and JSTLReplies: 7Last Post: 07-21-2008, 02:08 AM -
How do I get started?
By programmer-in-training in forum New To JavaReplies: 4Last Post: 01-11-2008, 07:45 AM -
Getting Started
By Doorsmaniac in forum Java AppletsReplies: 0Last Post: 11-24-2007, 03:40 AM -
I need help getting started
By Android in forum New To JavaReplies: 2Last Post: 10-30-2007, 04:46 PM -
AnyEdit Plugin For Eclipse Plugin
By JavaForums in forum EclipseReplies: 0Last Post: 05-18-2007, 12:28 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks