Community
Participate
Working Groups
Build 20021016 The spec claims that non-existing elements cannot be opened, however the implementation doesn't enforce it for package fragment roots. Using IJavaProject.getPackageFragmentRoot(IResource) it is easy to create such non-existing roots, which can be openend. The issue behind is that the element cache will be populated for these elements, and unless the client call #close() on this root, the cache will hold onto some of the children elements.
PackageFragmentRoot.openwhenClosed(...) already ensures that the resource is on the classpath. Added regression test ExistenceTests.testPkgFragmentRootNotInClasspath()