Bug 109346

Summary: Search for constructor references occasionally wrongly reports type constructors when type has other matching methods
Product: [Eclipse Project] JDT Reporter: Brian de Alwis <bsd>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.2 M2   
Hardware: PC   
OS: All   
Whiteboard:

Description Brian de Alwis CLA 2005-09-12 21:35:38 EDT
This is with Eclipse SDK R3.1 on Linux/GTK using Sun JDK 1.5.  I've tried this
from a brand spanking new workspace too.

Add org.eclipse.jdt.*, org.eclipse.platform.*, org.eclipse.runtime.*,
org.eclipse.ui.* to your Java search path.

Search for references to constructors of org.eclipse.ui.part.FileEditorInput(*).
 Put the search results into Flat Layout mode.

Note that the search results include constructors for 
* org.eclipse.ui.actions.OpenFileAction
* org.eclipse.ui.actions.OpenSystemEditorAction
* org.eclipse.ui.actions.OpenWithMenu
* org.eclipse.jdt.ui.ProblemsLabelDecorator
* org.eclipse.search.internal.ui.text.ReplaceDialog2
* org.eclipse.jdt.iternal.corext.textmanipulation.TextBufferFactory
* org.eclipse.ui.editors.text.TextFileDocumentProvider

But none of these constructors create an instance of FileEditorInput.  Nor do
they inherit from FileEditorInput.

I had wondered whether the search results included all constructors for the
declaring types of the methods matched, but it doesn't appear so.
Comment 1 Frederic Fusier CLA 2005-09-13 04:29:23 EDT
Unfortunately, there's nothing search engine can do in this case.

The reported invalid matches are super references which can be filtered by
search engine as there's no binding on compilation unit of Java search path plugins
(see bug 83716 comment 7 and  bug 83716 comment 9 for details).

We currently prefer reporting those invalid matches than miss some real
potential ones...
Comment 2 Frederic Fusier CLA 2005-09-13 04:31:58 EDT
Of course, in previous comment you should read:
The reported invalid matches are super references which CANNOT be filtered by
search engine...