Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Get reference to parent plugin OR....
Get reference to parent plugin OR.... [message #116745] Tue, 26 August 2003 18:20 Go to next message
Greg Roberts is currently offline Greg RobertsFriend
Messages: 88
Registered: July 2009
Member
I am wondering if there is a way to determine what plugin a class belongs
to. I need to find this out from within the java class.

The alternative to doing this is for me to set the order of the plugins
that implement IStartup. I have a couple that do this and I need one to be
the first one for sure so I can do some activities before any other
plugins launch.

Does anyone know anything about either of these.

Thank you,
Greg Roberts
Re: Get reference to parent plugin OR.... [message #116815 is a reply to message #116745] Tue, 26 August 2003 19:05 Go to previous message
Chris Laffra is currently offline Chris LaffraFriend
Messages: 253
Registered: July 2009
Senior Member
Try this:

IPluginDescriptor findPlugin(Class c) {
ClassLoader target = c.getClassLoader();
IPluginDescriptor plugins[] =
Platform.getPluginRegistry().getPluginDescriptors();
for (int n=0; n<plugins.length; n++) {
if (plugins[n].getPluginClassLoader() == target)
return plugins[n];
}
return null;
}

Chris Laffra

"Greg" <gwrobert@us.ibm.com> wrote in message
news:big8e2$m97$1@eclipse.org...
> I am wondering if there is a way to determine what plugin a class belongs
> to. I need to find this out from within the java class.
>
> The alternative to doing this is for me to set the order of the plugins
> that implement IStartup. I have a couple that do this and I need one to be
> the first one for sure so I can do some activities before any other
> plugins launch.
>
> Does anyone know anything about either of these.
>
> Thank you,
> Greg Roberts
>
Previous Topic:UnsatisifedLinkError on RedHat 8.0 with Eclipse R2.1.1 (Motif)
Next Topic:converting from netbeans
Goto Forum:
  


Current Time: Wed Jul 17 19:23:33 GMT 2024

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

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

Back to the top