Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 497775

Summary: ClassCastException while moving curosrs in JS file
Product: [WebTools] JSDT Reporter: Alex Boyko <aboyko>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: RESOLVED DUPLICATE QA Contact: Victor Rubezhny <vrubezhny>
Severity: normal    
Priority: P3    
Version: 3.8.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Alex Boyko CLA 2016-07-12 14:06:37 EDT
Opened a JS file (defines a JS module in Require JS format)
Moved the cursor in it a bit and got

An internal error occurred during: "Requesting JavaScript AST from selection".

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.VariableDeclarationFragment.accept0(VariableDeclarationFragment.java:228)
	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.VariableDeclarationStatement.accept0(VariableDeclarationStatement.java:320)
	at org.eclipse.wst.jsdt.core.dom.ASTNode.accept(ASTNode.java:2426)
Comment 1 Victor Rubezhny CLA 2016-07-13 18:37:26 EDT

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