Java Reflection Classloading Extensionpoint Defined Classes [message #334302] |
Mon, 02 February 2009 11:25  |
Eclipse User |
|
|
|
Hello,
I've an extensionpoint that at one point need an classpath and name.
Later, on extensionpoint processing, this classname is used to create an
instance of this class using Java reflections.
Everything is fine as long I'm only using classes that are defined in the
extensionpoint defining plugin or a plugin that is known by it.
When ever I'm adding classes from else where the Classloader does not know
the class. Its quite obviouse why. If I could use the bundle classloader
of the plugin consuming to the extensionpoint I'll would probaly be done.
But unfortunately IExtensionPoint.getDeclaringPluginDescriptor() is
deprecated :(
So my question is, how can I use the bundle classloader, or how else could
my problem be solved?
Thanks!
|
|
|
|
|
|
Re: Java Reflection Classloading Extensionpoint Defined Classes [message #334355 is a reply to message #334343] |
Wed, 04 February 2009 09:48  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Hi,
Maybe you should change the extension point to be for a factory class
for the InputController instead. The factory could use the default ctor
to be constructed and then call a method on the factory with parent and
style to create the InputController.
That way you won't be digging into weird places to do what
createExecutableExtension is supposed to do anyway.
Jan Kohnert wrote:
> Paul,
>
> InputController is a Control. Therefor it needs be get instantiated on
> creationtime of an part/editor/dialog. Also it needs constructors like a
> parent Composite and a style.
>
> Paul Webster wrote:
>
>> And you cannot use
>> element.createExecutableExtension("InputController")? That's what it
>> is designed for.
>
>> PW
>
>
>
>
--
Thanks,
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.06382 seconds