Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Programatically know if a plugin exists and can be loaded on the platform ?
Programatically know if a plugin exists and can be loaded on the platform ? [message #277041] Fri, 03 December 2004 08:44 Go to next message
Eclipse UserFriend
Hi,
I would like to know if there is a way to know if a plugins exists and if
it can be loaded on the current platform. Indeed, I want to make a menu
item enabled/disabled depending on a plugin existence. This plugin can be
on the platform or not if it was not installed.

Thanks for your help.
Re: Programatically know if a plugin exists and can be loaded on the platform ? [message #277203 is a reply to message #277041] Mon, 06 December 2004 13:54 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

If the menu item is contributed through plugin xml, then there is a way
to test if a plugin is installed and/or active.

Look up in help->Platform Plugin Developer's
Guide->Refererence->Extension Point Reference->org.eclipse.ui.popupmenus,

lookup the enablement element, and lookup the pluginState attribute on it.

However, if your menu item must be programatically contributed, then you
can use:

Platform.getBundle(bundleID) and if it returns null the bundle is not
installed.

strus wrote:
> Hi,
> I would like to know if there is a way to know if a plugins exists and
> if it can be loaded on the current platform. Indeed, I want to make a
> menu item enabled/disabled depending on a plugin existence. This plugin
> can be on the platform or not if it was not installed.
>
> Thanks for your help.
>

--
Thanks,
Rich Kulp
Previous Topic:Classpath, plugin dependencies, etc.
Next Topic:How to refresh automatically when resources are out of synch
Goto Forum:
  


Current Time: Wed Nov 05 18:22:39 EST 2025

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

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

Back to the top