Visibility of file in plug-in to a plug-in it is dependent on? [message #447691] |
Wed, 12 April 2006 16:19  |
Eclipse User |
|
|
|
Originally posted by: msullivan.nmss.com
OK, I have a client server application that's 'normal' Java.
I want to make an RCP class out of plug-ins.
I have a few libraries that I want to reuse, so in order to automatically
pick up source code changes, I created a plug-in for each library that uses
"include additional source code" to include the library java files. There's
probably a more 'correct' way to do this but I couldn't find it - dumping
the .jar into a plug-in of .class files is too restrictive, because I have
to redo the plug-in every time I change a shared object.
Now I have a plug-in (A) dependent on the above library plug-in (B).
Plug-in A has two XML files. The name of the first is passed from plug-in A
to plug-in B which should then try to get a URL to it using getResource().
This seems to fail as plug-in B doesnt' have visibility to plug-in A.
I also tried changing my libraries so I could find the URL and open a
datastream from it in plug-in A and pass that through the libraries. That
works, but then plug-in B needs to load the second file, which it finds by
name in the first - again, no visibility to it.
Is there a way to make files visible to 'library' plug-ins?
Thanks,
mike
|
|
|
Re: Visibility of file in plug-in to a plug-in it is dependent on? [message #447694 is a reply to message #447691] |
Wed, 12 April 2006 20:03  |
Eclipse User |
|
|
|
The simplest solution to this pattern is eclipse buddy classloading.
Basically, the library plugin B declares a classloading policy in it's
MANIFEST (the different policies are listed in the Help), like registered.
Eclipse-BuddyPolicy: registered
Then each dependent plugin A registers that it wants plugin B to have
access to its classpath.
Eclipse-RegisterBuddy: B
Later,
PW
|
|
|
Powered by
FUDForum. Page generated in 0.27188 seconds