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

Bug 493733

Summary: Endless pop-up dialog: org.eclipse.wst.jsdt.internal.core.dom.binding.VariableBinding cannot be cast to org.eclipse.wst.jsdt.core.dom.IFunctionBinding
Product: [WebTools] JSDT Reporter: Robert Munteanu <robert.munteanu>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: RESOLVED DUPLICATE QA Contact: Victor Rubezhny <vrubezhny>
Severity: major    
Priority: P3 CC: sombriks
Version: 3.7.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Error log entry
none
screen showing the problem none

Description Robert Munteanu CLA 2016-05-16 09:08:45 EDT
Created attachment 261761 [details]
Error log entry

Running

Eclipse Java EE IDE for Web Developers.

Version: Neon Milestone 7 (4.6.0M7)
Build id: 20160505-1310

with JavaScript Development Tools 2.0.0.v201604300029. I have the following issue:

I started editing a JS file which has snipet similar to:

  newThing.prop1 = prop1;
  newThing.prop2 = prop2;

  return newThing;

Before newThing.prop2 I started typing

  new

intending to add another prop to newThing. However, I was greeted by an error dialog which said 

  An error has occurred. See error log for more details.
org.eclipse.wst.jsdt.internal.core.dom.binding.VariableBinding cannot be cast to org.eclipse.wst.jsdt.core.dom.IFunctionBinding

The problem is that everytime I press OK the dialog immediately comes back again. I also noticed that this starts happening if I open the file and just wait a couple of seconds...

The general form of the file ( can't share it ) is

Namespace.Obj = Namespace.Obj ||
  function(param) {
    "use strict";

    var myVal = {};

    function abc() {
       return myVal;
    } 
    // code here

    var retVal = generateRetVal();
    retVal.abc = abc;

    return retVal;
  };
Comment 1 sombriks CLA 2016-07-11 12:59:55 EDT
Created attachment 263021 [details]
screen showing the problem

i can confirm this bug too

just downloaded and installed javascript-neon a few days.

sadly the editor gets blocked untill i click somewhere else in order to clear any kind of selection made.

is there any workaround rather than this?
Comment 2 Victor Rubezhny CLA 2016-07-13 18:40:30 EDT

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