|
|
Re: dynamic class paths in plugin [message #329033 is a reply to message #329026] |
Tue, 10 June 2008 19:17 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Hi,
This is usually not a very good idea. The user code could crash Eclipse
since it runs under the same Java VM as Eclipse.
You will need to have your own classloader for the project(s). Every
time a class changes you will need to throw away the classloader and
hope everything gets garbage collected, though it will not be if any of
those classes registered listeners with some Eclipse extension and they
weren't given a chance to deregister. Even if it is garbage collected
there is only certain limit PermGen space were Java stores these loaded
classes. I'm not sure that this area is garbage collected.
Do you actually need to run these classes from the user or do you just
need to get information about them? Information like what methods they
have, or what classes are available? The information stuff can be
retrieved through JDT without ever loading the class itself.
Vinay wrote:
> Hello,
>
> As far as I know, an eclipse plugin can load classes from the
> dependencies defined, or the libraries/folders defined to be part of
> classpath im the manifest. But the plugin I intend to develop needs the
> classes that are in the user's projects as these classes may change all
> the time. How can I make the classpath that this plugin uses be dynamic
> so that it always takes the classes currently in the workspace?
>
> Thanks,
> Vinay
>
--
Thanks,
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.02806 seconds