Spring Tool Suite marks occurrences only after ten second delay
Asked Answered
F

1

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?

Fuscous answered 6/8, 2014 at 12:4 Comment(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.Jackinthebox
@Jackinthebox Actually you can first try to clean the existing workspace (using -clean command line argument), but thank you for pointing to the right direction.Sopher
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.Jackinthebox
@Jackinthebox Nice remark, I've updated my answer.Sopher
S
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

Sopher answered 30/1, 2015 at 11:44 Comment(1)
worked on my eclipse oxygen. I had Sonar lint and collaborator installed and I suspect they slowed it down.Twelfth

© 2022 - 2024 — McMap. All rights reserved.