Community
Participate
Working Groups
The JavaScript tooling allows for a package fragment root to be enclosed by another package fragment root. The JavaSearchScope#indexOf method simply returns the first package fragment root it finds that ecnloses the given path. The problem is there maybe another package fragment root contained within the first applicable root that is more specific to the given path and thus should be used. Fix is to update the method to look through all of the possible container paths to find the most specific root for the given path.
Created attachment 183149 [details] Fix Patch Patch that updates JavaSearchScope#indexOf to find the most specific container path that encloses the given path. Passes all existing JUnits.
Committed to 3.2.3 and HEAD, thanks, Ian.
I just noticed my comment in this patch is wrong: //if have not found answer yet or the new answer is not enclosed by the previous answer and is thus more specific should read //if have not found answer yet or the new answer is does not enclose the previous answer and is thus more specific