How to dynamically update the classpath [message #329285] |
Wed, 18 June 2008 08:09  |
Eclipse User |
|
|
|
Originally posted by: cguibert.axway.com
Hello
Does anyone knows how to dynamically update the classpath of a project ?
We have a plug-in, and when we select an action of this plugin, we want
the classpath project to be updated.
We tried by modifying the classpath file, but it seems that the
modification is not taken into account.
Any help on either the classpath modification or our refresh problem would
be appreciated
Regards
CG
|
|
|
Re: How to dynamically update the classpath [message #329306 is a reply to message #329285] |
Wed, 18 June 2008 11:51  |
Eclipse User |
|
|
|
"CG" <cguibert@axway.com> wrote in message
news:c691b15661a2c5b55aa4244bf5b2aed4$1@www.eclipse.org...
> Hello
>
> Does anyone knows how to dynamically update the classpath of a project ?
> We have a plug-in, and when we select an action of this plugin, we want
> the classpath project to be updated.
> We tried by modifying the classpath file, but it seems that the
> modification is not taken into account.
> Any help on either the classpath modification or our refresh problem would
> be appreciated
You'd use the IJavaProject.SetRawClasspath() method.
Be careful: you have to get the classpath, add your entry, and then set it,
so if two threads try to do that at the same time, one will be silently
ignored :-(
|
|
|
Powered by
FUDForum. Page generated in 0.03334 seconds