Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 500295 - Multiple errors compiling the AST of a JS file
Summary: Multiple errors compiling the AST of a JS file
Status: RESOLVED DUPLICATE of bug 496749
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.8.0   Edit
Hardware: PC Windows 10
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Victor Rubezhny CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-25 13:07 EDT by Olivier Lefevre CLA
Modified: 2017-01-19 06:50 EST (History)
1 user (show)

See Also:


Attachments
The offending JS file (8.30 KB, application/x-javascript)
2016-08-25 13:07 EDT, Olivier Lefevre CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Lefevre CLA 2016-08-25 13:07:09 EDT
Created attachment 263784 [details]
The offending JS file

Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench", specifically when opening the attached file (generated by GWT) in the editor. The stack trace was:

java.lang.ClassCastException: org.eclipse.wst.jsdt.internal.core.dom.binding.VariableBinding cannot be cast to org.eclipse.wst.jsdt.core.dom.IFunctionBinding
	at org.eclipse.wst.jsdt.core.dom.BindingResolverDom.resolveMethod(BindingResolverDom.java:235)
	at org.eclipse.wst.jsdt.core.dom.FunctionInvocation.resolveMethodBinding(FunctionInvocation.java:378)
	at org.eclipse.wst.jsdt.internal.ui.search.MethodExitsFinder.visit(MethodExitsFinder.java:187)
	at org.eclipse.wst.jsdt.core.dom.FunctionInvocation.accept0(FunctionInvocation.java:240)
	at org.eclipse.wst.jsdt.core.dom.ASTNode.accept(ASTNode.java:2426)
	at org.eclipse.wst.jsdt.core.dom.ASTNode.acceptChild(ASTNode.java:2473)
	at org.eclipse.wst.jsdt.core.dom.InfixExpression.accept0(InfixExpression.java:379)
	at org.eclipse.wst.jsdt.core.dom.ASTNode.accept(ASTNode.java:2426)
	at org.eclipse.wst.jsdt.core.dom.ASTNode.acceptChild(ASTNode.java:2473)
	at org.eclipse.wst.jsdt.core.dom.ExpressionStatement.accept0(ExpressionStatement.java:146)
	at org.eclipse.wst.jsdt.core.dom.ASTNode.accept(ASTNode.java:2426)
	at org.eclipse.wst.jsdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2499)
	at org.eclipse.wst.jsdt.core.dom.Block.accept0(Block.java:136)
	at org.eclipse.wst.jsdt.core.dom.ASTNode.accept(ASTNode.java:2426)
	at org.eclipse.wst.jsdt.core.dom.ASTNode.acceptChild(ASTNode.java:2473)
	at org.eclipse.wst.jsdt.core.dom.FunctionDeclaration.accept0(FunctionDeclaration.java:542)
	at org.eclipse.wst.jsdt.core.dom.ASTNode.accept(ASTNode.java:2426)
	at org.eclipse.wst.jsdt.internal.ui.search.MethodExitsFinder.markReferences(MethodExitsFinder.java:109)
	at org.eclipse.wst.jsdt.internal.ui.search.MethodExitsFinder.perform(MethodExitsFinder.java:92)
	at org.eclipse.wst.jsdt.internal.ui.javaeditor.JavaEditor.updateOccurrenceAnnotations(JavaEditor.java:2840)
	at org.eclipse.wst.jsdt.internal.ui.javaeditor.JavaEditor$ActivationListener.windowActivated(JavaEditor.java:1220)
	at org.eclipse.ui.internal.Workbench$11.run(Workbench.java:1078)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.Workbench.fireWindowActivated(Workbench.java:1075)
	at org.eclipse.ui.internal.WorkbenchWindow$15.shellActivated(WorkbenchWindow.java:2304)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1088)
	at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations.java:1697)
	at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:2277)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4788)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359)
	at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1656)
	at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2199)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5102)
	at org.eclipse.swt.internal.win32.OS.DestroyWindow(Native Method)
	at org.eclipse.swt.widgets.Control.destroyWidget(Control.java:795)
	at org.eclipse.swt.widgets.Shell.destroyWidget(Shell.java:719)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:846)
	at org.eclipse.swt.widgets.Widget.dispose(Widget.java:460)
	at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:459)
	at org.eclipse.swt.widgets.Shell.dispose(Shell.java:737)
	at org.eclipse.jface.window.Window.close(Window.java:330)
	at org.eclipse.jface.dialogs.Dialog.close(Dialog.java:989)
	at org.eclipse.ui.internal.statushandlers.InternalDialog.close(InternalDialog.java:700)
	at org.eclipse.jface.dialogs.Dialog.okPressed(Dialog.java:949)
	at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:466)
	at org.eclipse.ui.internal.statushandlers.InternalDialog.buttonPressed(InternalDialog.java:193)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:618)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4228)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3816)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:687)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:604)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
Comment 1 Victor Rubezhny CLA 2017-01-19 06:50:23 EST

*** This bug has been marked as a duplicate of bug 496749 ***