|ATTN: Konstantin - FlexibleProjectContainer.java changes from 1.34 to 1.36 [message #229894]
||Tue, 31 March 2009 19:19
| Yen Lu
Registered: July 2009
This is a continuation of the discussion between Konstantin and myself in |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=269360. We have a scenario
where we need to obtain the classpath of a project and filter out certain
entries to improve performance of a third party library that we call.
Here's the code:
IJavaProject project = ...;
IClasspathEntry entries = project.getRawClasspath();
When the project is a dynamic Web project, there could be entries of type
WebAppLibrariesContainer or J2EEComponentClasspathContainer. For such
entries, we do:
IPackageFragmentRoot pkgFragmentRoots =
Looping through pkgFragmentRoots, some of the entries we encounter might
be jar libraries in WEB-INF/lib of the dynamic Web module.
With WTP 3.0.4, the getPath() method for a pkgFragmentRoot for a jar
library under WEB-INF/lib returns a path relative to the workspace (e.g.
/project/WebContent/WEB-INF/lib/foo.jar). With the recent changes, 1.36,
now produces a path that is absolute to the filesystem (e.g.
After the discussion, I continued to investigate and found that
pkgFragmentRoot's isExternal() method is now returning true for jars under
WEB-INF/lib now too. This seems incorrect since the files are in the
Konstantin, you mentioned some new features coming in - classpath tags.
One would expect these classpath entries to be picked up by the call to
getRawClasspath(). Could you confirm or point me to more information about
this feature? Also, please comment on the change in behavior of
Powered by FUDForum
. Page generated in 0.04000 seconds