Bug 123679 - [search] missing icon or bad hit in search results
Summary: [search] missing icon or bad hit in search results
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.2.1   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-12 17:07 EST by Karice McIntyre CLA
Modified: 2006-09-11 12:43 EDT (History)
0 users

See Also:


Attachments
screen shot of problem (61.65 KB, image/jpeg)
2006-01-12 17:46 EST, Karice McIntyre CLA
no flags Details
Patch to fix this problem (1.17 KB, patch)
2006-04-26 11:23 EDT, Frederic Fusier CLA
no flags Details | Diff
Complete patch (fix+tests) for bugs 95152, 123679 and 140156 (14.31 KB, application/octet-stream)
2006-05-12 03:49 EDT, Frederic Fusier CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karice McIntyre CLA 2006-01-12 17:07:56 EST
Using I20060110-1026
Search for References of org.eclipse.swt.events.MouseAdapter.

The first hit in the list is the org.eclipse.jface.contentassist package, expand it.  Notice there is a hit named 'new Anonymous' that has no icon next to it.  Either an icon is missing for this type or this hit should not be in the list. 

Another odd thing about this hit is, when I double click on it to open the file, I get a .class file editor but the file has no name (just .class) and a message that says:
Source not found
The JAR of this class file belongs to the container 'Plug-in Dependencies'/
To configure the source attachment, go directly to the corresponding configuration page.  (For example for JREs go to 'Installed JREs' page in preferences).
Comment 1 Karice McIntyre CLA 2006-01-12 17:46:47 EST
Created attachment 32940 [details]
screen shot of problem
Comment 2 Martin Aeschlimann CLA 2006-01-16 09:18:05 EST
Reproduced with 20060110-1026 binaries:

The problematic element is a type from a binary where jdt.core can't build a element info for (see screenshot). Each access to it throws a JavaModelException

e.g.

Java Model Exception: Java Model Status ['' is not a valid Java identifier]
	at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:492)
	at org.eclipse.jdt.internal.core.ClassFile.buildStructure(ClassFile.java:86)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:235)
	at org.eclipse.jdt.internal.core.BinaryMember.generateInfos(BinaryMember.java:47)
	at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:503)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:247)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:233)
	at org.eclipse.jdt.internal.core.BinaryType.isInterface(BinaryType.java:707)

Comment 3 Frederic Fusier CLA 2006-04-26 11:23:02 EDT
Created attachment 39540 [details]
Patch to fix this problem

No test case added in this fix, just verified that it solves the problem and passes all JDT/Core Model tests...
Comment 4 Frederic Fusier CLA 2006-04-26 11:23:58 EDT
Not critical, defer patch release for next release
Comment 5 Frederic Fusier CLA 2006-04-26 11:24:31 EDT
Will be reopened for 3.3...
Comment 6 Frederic Fusier CLA 2006-05-12 03:43:34 EDT
I've now some tests to verify this fix, ready to be released when 3.3 stream will be available...
Comment 7 Frederic Fusier CLA 2006-05-12 03:49:01 EDT
Created attachment 41284 [details]
Complete patch (fix+tests) for bugs 95152, 123679 and 140156

The attached zip file includes patches for bug 95152, bug 123679 and bug 140156.
It also includes some jar files for binary test cases...
Comment 8 Frederic Fusier CLA 2006-05-16 08:57:48 EDT
Candidate for 3.2.1
Released in TARGET_321 stream.
Comment 9 Frederic Fusier CLA 2006-06-12 05:14:00 EDT
Released for 3.2.1
Released for 3.3 M1 while merging TARGET_321 with HEAD
Comment 10 Maxime Daniel CLA 2006-08-04 09:31:49 EDT
Verified for 3.3 M1 using build I20060804-0010.
(Based upon the test case behavior with 3.2 vs current version of org.eclipse.jdt.core.)
Comment 11 Olivier Thomann CLA 2006-09-11 12:07:14 EDT
Verified for 3.2.1 using build M20060908-1655.