Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » dynamic class paths in plugin
dynamic class paths in plugin [message #329026] Tue, 10 June 2008 18:09 Go to next message
Vinay is currently offline VinayFriend
Messages: 8
Registered: July 2009
Junior Member
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
Re: dynamic class paths in plugin [message #329031 is a reply to message #329026] Tue, 10 June 2008 18:59 Go to previous messageGo to next message
Wayne Beaton is currently offline Wayne BeatonFriend
Messages: 555
Registered: December 2017
Senior Member
I think this question might get better answers on the
eclipse.technology.equinox newsgroup.

Wayne

On Tue, 2008-06-10 at 18:09 +0000, 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
>
Re: dynamic class paths in plugin [message #329033 is a reply to message #329026] Tue, 10 June 2008 19:17 Go to previous message
Eclipse UserFriend
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
Previous Topic:Links are not working in 3.4. RC3
Next Topic:custom markers never appear in "Problems" view
Goto Forum:
  


Current Time: Thu Dec 26 11:29:08 GMT 2024

Powered by FUDForum. Page generated in 0.02336 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top