10

I am running STS (Kepler/3.5.1.RELEASE) and experiencing an annoying issue in which Java editors will highlight occurrences of a variable/method/etc. only after a ten-second delay.

This behavior seems to happen regardless of the following:

  • number of validation types selected in the Mark Occurrences settings
  • the number of project validators selected
  • or the number of occurrence types I have selected

A similarly sized Eclipse Juno installation on the same machine marks the occurrences almost instantaneously. Other editor types (e.g. Python) seem to highlight much more quickly, as I'd expect.

Has anyone else seen this behavior?

4
  • Sounds like some kind of bug. So you should probably submit a bugreport on STS. Before you do, however, try starting the same STS with brand new workspace. Just in case something gone screwy in your workspace is causing this.
    – Kris
    Commented Aug 6, 2014 at 20:49
  • @Kris Actually you can first try to clean the existing workspace (using -clean command line argument), but thank you for pointing to the right direction. Commented Jan 30, 2015 at 11:46
  • 1
    Ah yes, the '-clean' arguments is also a good thing to try. Note that this doesn't clean the workspace but is related to OSGI cached state. So if the problem is 'screwy workspace state' the -clean argument won't fix that.
    – Kris
    Commented Jan 30, 2015 at 15:54
  • @Kris Nice remark, I've updated my answer. Commented Jan 30, 2015 at 16:44

1 Answer 1

15

I've just encountered this issue and I have the latest (as of now) version of Spring Tool Suite (Version: 3.6.3.SR1). The solution was inspired by the comment of Kris, but instead of using a brand new workspace, you first can do a "clean up".


Solution

Start STS (or any other Eclipse based IDE) with the -clean argument (which is equivalent to setting osgi.clean to "true") in the command line. The result is (quote):

any cached data used by the OSGi framework and Eclipse runtime will be wiped clean. This will clean the caches used to store bundle dependency resolution and Eclipse extension registry data. Using this option will force Eclipse to reinitialize these caches.

Example for Windows: C:\sts-3.6.0.RELEASE\sts.exe -clean

Example for OSX: /Applications/STS.app/Contents/MacOS/STS -clean

It worked flawlessly!


Alternative solutions

If the above solution didn't help, here are the main alternatives:

  • creating a new workspace (as suggested by Kris)
  • clean reinstall of Eclipse

More detailed instructions can be found here: Keeping Eclipse running clean

1
  • 2
    worked on my eclipse oxygen. I had Sonar lint and collaborator installed and I suspect they slowed it down. Commented May 24, 2018 at 14:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.