[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: Optional dependency

Hi,

I'd use Platform.getBundle("y") which will return null if the bundle with this name is not found.

Tom

Steen Larsen schrieb:
My situation is this:

I have made a very important plugin (X), which uses a very unimportant (statistics) plugin (Y).
I want the X-plugin to work, even if Y-plugin is not present.


In X-plugin I have defined an optional dependency to Y-plugin.
The X-plugin is calling the Y-plugin in a seperate thread.

This actually works - but not very nice.
If the Y-plugin is not available I get this error from org.eclipse.ui: Failed to execute runnable (java.lang.NoClassDefFoundError: Y-plugin)
and the thread is terminated.


So... my question is: How can I from X-plugin, check if Y-plugin is available, so that I handle it and omit trying to instantiate Y-plugin?

Regards
Steen Larsen



--
B e s t S o l u t i o n . at
--------------------------------------------------------------------
Tom Schindl                                          JFace-Committer
--------------------------------------------------------------------