How to get classpath? [message #92911] |
Mon, 14 July 2003 06:15  |
Eclipse User |
|
|
|
Originally posted by: m.bauer.signsoft.com
Hi,
my question is as following: I need a classpath, containing all entries of
the .classpath-files of all open projects (open project means, that the
project is displayed in the left upper view, right?). So the best way would
be to get all the projects
(ResourcesPlugin.getWorkspace().getRoot().getProjects()) and to ask each
project for its own classpath (which contains all pathes for e.g. jar
archives whicha re needed to compile it). Sadly there is no such method, or
am I wrong?.
So I have to parse the .classpath files for the <classpathentry> tag. So how
do i determine the path of this file to open it?
Thanks in advance
Michael Bauer
|
|
|
Re: How to get classpath? [message #93815 is a reply to message #92911] |
Tue, 15 July 2003 05:34  |
Eclipse User |
|
|
|
Michael,
You can use
JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()).ge tJavaProjects()
and ask each Java project its classpath using
IJavaProject.getResolvedClasspath(true).
Jerome
"Michael Bauer" <m.bauer@signsoft.com> wrote in message
news:betvjo$grt$1@eclipse.org...
> Hi,
>
> my question is as following: I need a classpath, containing all entries of
> the .classpath-files of all open projects (open project means, that the
> project is displayed in the left upper view, right?). So the best way
would
> be to get all the projects
> (ResourcesPlugin.getWorkspace().getRoot().getProjects()) and to ask each
> project for its own classpath (which contains all pathes for e.g. jar
> archives whicha re needed to compile it). Sadly there is no such method,
or
> am I wrong?.
> So I have to parse the .classpath files for the <classpathentry> tag. So
how
> do i determine the path of this file to open it?
>
> Thanks in advance
>
> Michael Bauer
>
>
|
|
|
Powered by
FUDForum. Page generated in 1.30024 seconds