Community
Participate
Working Groups
To not populate the whole Java Model for the GoTo Resource Dialog JDT UI needs a method on the Java Model to figure out if an IResource is visible through the Java Model. For example a class file from the output folder is not visible through the Java Model, but a class file in a normal folder is. Basically the method should return true for all elements that can be reached by iterating of the Java Model using the method getChildren and getNonJavaResources.
Should answer false for resources inside an output folder, or .class file inside source folder. Note that it should avoid asking the resource path if possible.
When and if this method becomes available, JDT should change their GoToResourceAction to: 1 - Use a subclass of ResourceSelectionListDialog. The subclass should override the method select(IResource). This method will allow further filtering of matched resources. 2 - Use the ResourceSelectionListDialog(shell, IContainer, int) constructor to create the dialog in step 1. See ResourceListSelectionDialog for more information.
API should be IJavaModel.contains(IResource). Implementation would return false for resources inside an output folder, or .class files inside source folder, and in case where src=bin for .class files.
New API added and regression test JavaModelTests.testContains* added.
Verified.