3

After upgrading from Eclipse Luna to Mars, I found that the Ctrl+Click/F3 drill-down functionality (Open Declaration) does not work anymore, throwing an error:

Problems opening an editor. See error log for more details.

The following entries appear in the eclipse Error Log itself:

Unexpected runtime error while computing a text hover (with a NullPointerException)
error during type inferencing (with a NullPointerException)
Internal Error (with InvocationTargetException caused by NullPointerException)

Some additional observations:

  • The problem occurs on a JavaScript-configured project which had no problems in Luna
  • The problem does not occur on another JavaScript project, whose JS files are much less complicated (70KB in 5 files vs. 5MB in 19 files (excluding ExtJS libraries) in the problematic project)
  • I installed Mars on top of Luna using the recommended update process (https://wiki.eclipse.org/FAQ_How_do_I_upgrade_Eclipse%3F)
    • To ensure it is not due to something wrong during the upgrade, I also downloaded Eclipse Mars for Java EE Developers and installed it fresh.
    • I did the same for the project, setting it up from scratch, to exclude the possibility some old Luna setting messing up with Mars
  • Open Declaration, Open Implementation, etc. work in Java, only Javascript seems to be affected

Does anybody have an idea if there is something I can do to fix this problem or it is an issue with Eclipse? (I couldn't find anything related in Eclipse's Bugzilla)

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Giovanni
  • 332
  • 3
  • 12
  • On my machine it is working perfectly. I have installed fresh copy of Eclipse Mars . Did you checked this http://stackoverflow.com/a/11772843/3628106. – वरुण Jul 22 '15 at 13:46
  • I had tried all of the points in the suggested log, except from running Eclipse with -clean. It did not help either, now that I ran it. I've updated the description - another project, with simpler/smaller JS files, does not have the problem :/ – Giovanni Jul 23 '15 at 10:05

2 Answers2

0

I opened an issue in Eclipse Bugzilla. It had already been fixed internally and the fix is included in Mars SR1.

Giovanni
  • 332
  • 3
  • 12
0

I also faced this problem with Spring Tool Suite (Version: 3.8.3.RELEASE), Eclipse Neon.2 (4.6.2). After I was installed Tern Eclipse IDE plugin , this problem was gone.

Below is how I configure this plugin for someone who got the problem as me

  1. right-click on the project (at project Explorer) > Configure > Convert to Tern Project..
  2. choose modules as you want (for me : I only choosed jquery)

  3. right-click on the project (at project Explorer) > Properties > General > Editors > Text Editors > Hyperlinking and disable as below screenshoots for better performance in HTML/JSP files.

1. Disable built-in JavaScript Hyperlinking
(this will help you to direct to go it's declaration with Ctrl+click)

enter image description here

2. Allow only in JS Editor for Tern plugin

enter image description here

Cataclysm
  • 7,592
  • 21
  • 74
  • 123