You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Kai Schlamp <sc...@gmx.de> on 2009/02/09 02:01:21 UTC

AE as third party plugin in a RCP application

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


Re: AE as third party plugin in a RCP application

Posted by Kai Schlamp <sc...@gmx.de>.
> We set up the manifest for the Eclipse UIMA runtime to include:
> 
> Eclipse-BuddyPolicy: registered
> 
> This allows it to load things from other bundles, if those bundles
> "register" themselves to the Eclipse UIMA runtime plugin.  Search for
> "buddy" in the Eclipse help for more info.
> 
> Would this help?
> 
> -Marshall

Hello Marshall.

It sounds like this is the solution.
Thanks a lot for your help.

Best regards,
Kai


Re: AE as third party plugin in a RCP application

Posted by Marshall Schor <ms...@schor.com>.
Hi Kai -

We set up the manifest for the Eclipse UIMA runtime to include:

Eclipse-BuddyPolicy: registered

This allows it to load things from other bundles, if those bundles
"register" themselves to the Eclipse UIMA runtime plugin.  Search for
"buddy" in the Eclipse help for more info.

Would this help?

-Marshall


Kai Schlamp wrote:
> 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
>
>
>
>