Bug 47177

Summary: ClassCastException during hover
Product: [Eclipse Project] JDT Reporter: Jared Burns <jared_burns>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nikolaymetchev
Version: 3.0   
Target Milestone: 3.0 M5   
Hardware: PC   
OS: Linux-GTK   
URL: frederic_fusier@fr.ibm.com
Whiteboard:

Description Jared Burns CLA 2003-11-20 16:27:13 EST
Build 200311192030

My steps:
1. Open Type on "TreeViewer" in a selfhosting workspace with JFace imported as binary.
2. Go to the method internalRemove(Object[])
3. Hover the word parentItems on the second line of the method. The following is dumped the the 
console. Nothing is written to the log file.

java.lang.ClassCastException
        at org.eclipse.jdt.internal.core.util.HandleFactory$1$Visitor.visit(HandleFactory.java:205)
        at org.eclipse.jdt.internal.compiler.ast.FieldDeclaration.traverse(FieldDeclaration.java:234)
        at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:927)
        at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.
traverse(CompilationUnitDeclaration.java:305)
        at org.eclipse.jdt.internal.core.util.HandleFactory.createElement(HandleFactory.java:296)
        at org.eclipse.jdt.internal.core.SelectionRequestor.acceptLocalVariable(SelectionRequestor.
java:191)
        at org.eclipse.jdt.internal.codeassist.SelectionEngine.selectFrom(SelectionEngine.java:650)
        at org.eclipse.jdt.internal.codeassist.SelectionEngine.select(SelectionEngine.java:520)
        at org.eclipse.jdt.internal.core.Openable.codeSelect(Openable.java:169)
        at org.eclipse.jdt.internal.core.ClassFile.codeSelect(ClassFile.java:135)
        at org.eclipse.jdt.internal.core.ClassFile.codeSelect(ClassFile.java:120)
        at org.eclipse.jdt.internal.ui.text.java.hover.AbstractJavaEditorTextHover.
getHoverInfo(AbstractJavaEditorTextHover.java:95)
        at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo(BestMatchHover.
java:140)
        at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.
getHoverInfo(JavaEditorTextHoverProxy.java:69)
        at org.eclipse.jface.text.TextViewerHoverManager$2.run(TextViewerHoverManager.java:
119)
Comment 1 Frederic Fusier CLA 2003-11-21 07:19:14 EST
Fixed.

Now the hover on the local variable works properly.
Comment 2 Olivier Thomann CLA 2003-11-21 13:43:41 EST
Verified in 200311211210.
Comment 3 Jerome Lanneluc CLA 2003-12-12 06:20:37 EST
Note to reproduce: the class is AbstractTreeViewer (and not TreeViewer)
Comment 4 Frederic Fusier CLA 2003-12-16 09:46:02 EST
*** Bug 47895 has been marked as a duplicate of this bug. ***