Bug 30274 - Need method to figure out if an IResource is visible through the Java Model
Summary: Need method to figure out if an IResource is visible through the Java Model
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M5   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-27 06:04 EST by Dirk Baeumer CLA
Modified: 2003-02-10 12:32 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.