Bug 15430

Summary: hang up eclipse
Product: [Eclipse Project] JDT Reporter: Javier Sanz <jsanza>
Component: CoreAssignee: David Audel <david_audel>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P1    
Version: 2.0   
Target Milestone: 2.0 M6   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
window message capture none

Description Javier Sanz CLA 2002-05-07 11:02:40 EDT
Hello !

I got the following code. When i put mouse over the text "super.main"
an internal error ocurre.

The source code is:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
public class a
{
	public static void main(String[] args)
	{
	}
}


public class b extends a
{
	public static String x = super.main("");
	public static void main(String[] args)
	{
	}
}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
And the eclipse ui message :


java.lang.ClassCastException: 
org.eclipse.jdt.internal.codeassist.select.SelectionOnSuperReference
	at 
org.eclipse.jdt.internal.compiler.parser.Parser.consumeExitVariableWithInitializ
ation(Parser.java:1969)
	at 
org.eclipse.jdt.internal.codeassist.select.SelectionParser.consumeExitVariableWi
thInitialization(SelectionParser.java:228)
	at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule
(Parser.java:2925)
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse
(Parser.java:6796)
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse
(Parser.java:6974)
	at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse
(Parser.java:4642)
	at org.eclipse.jdt.internal.codeassist.select.SelectionParser.dietParse
(SelectionParser.java:448)
	at org.eclipse.jdt.internal.codeassist.SelectionEngine.select
(SelectionEngine.java:398)
	at org.eclipse.jdt.internal.core.Openable.codeSelect(Openable.java:142)
	at org.eclipse.jdt.internal.core.Openable.codeSelect(Openable.java:121)
	at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect
(CompilationUnit.java:90)
	at 
org.eclipse.jdt.internal.ui.text.java.hover.JavaTypeHover.getHoverInfo
(JavaTypeHover.java:93)
	at 
org.eclipse.jdt.internal.ui.text.java.hover.JavaTextHover.getHoverInfo
(JavaTextHover.java:300)
	at org.eclipse.jface.text.TextViewerHoverManager.computeInformation
(TextViewerHoverManager.java:56)
	at 
org.eclipse.jface.text.AbstractInformationControlManager.showInformation
(AbstractInformationControlManager.java:536)
	at 
org.eclipse.jface.text.AbstractHoverInformationControlManager$MouseTracker.mouse
Hover(AbstractHoverInformationControlManager.java:233)
	at org.eclipse.swt.widgets.TypedListener.handleEvent
(TypedListener.java:207)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1420)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1208)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:722)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:705)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:777)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:196)
	at org.eclipse.core.launcher.Main.run(Main.java:555)
	at org.eclipse.core.launcher.Main.main(Main.java:396)
Comment 1 Javier Sanz CLA 2002-05-07 11:04:06 EDT
Created attachment 770 [details]
window message capture
Comment 2 Adam Kiezun CLA 2002-05-07 11:08:37 EDT
works in 0502
which build are you using?

btw. it will never compile - cannot use super in a static context
Comment 3 Erich Gamma CLA 2002-05-11 07:58:24 EDT
The class cast exception occurs in code resolve.

What do you mean by the title "hang up eclipse" was the UI dead afterwards?

moving to JDT CORE
Comment 4 David Audel CLA 2002-05-13 09:17:35 EDT
Fixed