Bug 47177 - ClassCastException during hover
Summary: ClassCastException during hover
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL: frederic_fusier@fr.ibm.com
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-20 16:27 EST by Jared Burns CLA
Modified: 2003-12-16 09:46 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 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. ***