Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Required Plugin does not find it's own bundle!?
Required Plugin does not find it's own bundle!? [message #672468] Sat, 21 May 2011 07:08 Go to next message
Marco Lopes is currently offline Marco LopesFriend
Messages: 61
Registered: September 2010
Member
I have this scenario that is driving me nuts:

I have a Plugin A - This plugin has some resources (folders & files) that are used by it.
Then, i have a Plugin B that REQUIRES Plugin A

I RUN plugin A from Eclipse - OK!
I RUN plugin A from Export - OK!
I RUN plugin B from Eclipse - OK!
I RUN plugin B from Export - OK!

SO, i exported plugin A - let's call it EA (exported A)
I then create a new Plugin from existing JAR - using EA - let's call it C
I then configure C (Dependencies, etc) and Plugin B to use Plugin C
I RUN plugin B form Eclipse - ERROR! FileLocator returns NULL from plugin C! (or maybe getBundle, i have to debug).

The point is: What's wrong with this scenario??!

The code i use to locate the bundle is the following:

private static URI locateFile(String bundle, String fullPath) {
try {
URL url = FileLocator.find(Platform.getBundle(bundle), new Path(fullPath), null);
if(url != null)
return FileLocator.resolve(url).toURI();

} catch (Exception e) {}

return null;
}

[Updated on: Sat, 21 May 2011 07:27]

Report message to a moderator

Re: Required Plugin does not find it's own bundle!? [message #674114 is a reply to message #672468] Wed, 25 May 2011 20:56 Go to previous message
Marco Lopes is currently offline Marco LopesFriend
Messages: 61
Registered: September 2010
Member
Resolved.

I must pass the BUNDLE. Does not work if i try to "resolve" its name.

private static URI locateFile(Bundle bundle, String fullPath) {

try {
URL url = FileLocator.find(bundle, new Path(fullPath), null);
if(url != null)
return FileLocator.resolve(url).toURI();

} catch (Exception e) {
e.printStackTrace();
}

return null;

}
Previous Topic:[org.apache.catalina.core.StandardContext] Error in dependencyCheck
Next Topic:How do I display and/or select class list in my plugin
Goto Forum:
  


Current Time: Sat Apr 27 00:30:32 GMT 2024

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

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

Back to the top