Bug 30274

Summary: Need method to figure out if an IResource is visible through the Java Model
Product: [Eclipse Project] JDT Reporter: Dirk Baeumer <dirk_baeumer>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: n.a.edgar
Version: 2.1   
Target Milestone: 2.1 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Dirk Baeumer CLA 2003-01-27 06:04:46 EST
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.
Comment 1 Philipe Mulet CLA 2003-01-27 07:31:31 EST
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.
Comment 2 Lynne Kues CLA 2003-01-28 18:32:03 EST
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.
Comment 3 Jerome Lanneluc CLA 2003-01-29 06:55:44 EST
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.
Comment 4 Jerome Lanneluc CLA 2003-01-30 05:52:05 EST
New API added and regression test JavaModelTests.testContains* added.
Comment 5 David Audel CLA 2003-02-10 12:32:52 EST
Verified.