Community
Participate
Working Groups
JavaDoc from IJavaProject.getPackageFragmentRoots states: * Returns all of the package fragment roots contained in this * project, identified on this project's resolved classpath. The result * does not include package fragment roots in other projects referenced * on this project's classpath. Currently, JAR optained from required projects are returned as well. They should only be returned in getAllPackageFragmentRoots
Need to revise current implementation
Agreed, note that internal JARs of other projects where also answered amongst the package fragment roots. I am planning on only answering roots located inside the same project + external ones (which are referenced directly one the immediate classpath). Would this be fine ?
I think it should still return internal jars located in other projects. The roots returned are the ones shown in the package view: Problem with not showing internal jars located in other projects is that you would not see them in the package view at all, if they are not also on the containing project's classpath. What the JavaDoc says is ideal for the package view: all package fragment roots, except those optained from other projects (through a project-classpath entry). As an addition: Could , as an additional specification, the roots be returned in the order how they appear in the classpath?
Agreed, we will do so, the point on internal JARs is real.
Fixed. Handles to exported roots are made in context of originating projects.