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?

informatik01
  • 16,038
  • 10
  • 74
  • 104
Ignatius
  • 235
  • 3
  • 10
  • 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 Aug 06 '14 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. – informatik01 Jan 30 '15 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 Jan 30 '15 at 15:54
  • @Kris Nice remark, I've updated my answer. – informatik01 Jan 30 '15 at 16:44

1 Answers1

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

David Newcomb
  • 10,639
  • 3
  • 49
  • 62
informatik01
  • 16,038
  • 10
  • 74
  • 104