Hello.

I wonder what would be the best way to contribute third party AE's via plugins 
to an Eclipse RCP application.
The main app runs a CPE and should add AE's from other third party plugins.
To distinguish what plugins provide AE's I would use a custom extension point.
I can then get access to the XML descriptor of the AE through Platform.find() 
(if I understand the Eclipse documentation right) from the plugin the CPE runs 
from..
The problem is that the Annotator specified in the XML descriptor must be on 
the 
classpath of the CPE, otherwise the CPE won't find it.
But as the plugin where the CPE runs and the third party plugin where the AE 
stuff is located doesn't share the classpath (every Eclipse plugin has it's own 
classpath), the Annotator is never found and the whole thing fails.

I can think of two solutions to circumvent that problem.
1.) The third party "plugin" must be a fragment instead of a normal Eclipse 
plugin, 
with the plugin that contains the CPE as target plugin. This way both should 
now share the same classpath.

2.) Instead of using plugins for the AE's, the AE's are added to a specific 
directory and loaded dynamically with URLClassLoader.

Both are not the best design solutions (my opinion).

This is still a theoretical problem. I didn't try to implement it yet. But it 
would have a strong influence of the further design of our app, thats why I 
want to clarify this beforehand.

Are there any other solutions? Solutions where AE's can be packed in real 
plugins (not fragments)? Or do I have an error in reasoning.

Best regards,
Kai

Reply via email to