Pet slept on keyboard, weird colors in IDE [duplic

2020-08-09 11:34发布

问题:

Please stop laughing. My cat slept on my keyboard. When I came back I wonder what these colors are:

I like to get rid of them but I don't know how to remove them.

  1. Close and reopen of the file does not work.
  2. Close and reopen of the project does not work.

Any idea?

回答1:

Upvote for the cutest question ever.

Regarding the colors: Reminds me of visualization of test coverage with EclEmma, which shows its results with coloured markers for fully (green), partly (yellow) or not (red) covered source code.

You can get rid of the coloured markers by deleting the coverage results by clicking the single or double grey "x" in the coverage view like shown at the bottom of the following screenshot.



回答2:

I'll put this here for reference purposes from the Eclipse code coverage FAQs.

How can I remove the coverage coloring from the Java editors again?
If you remove the coverage session, also the coverage coloring will disappear. For this, hit Remove Session or Remove All Sessions in the Coverage view's toolbar.

From Using the coverage view

The Coverage view automatically appears when a new coverage session is added or can manually opened from the Window → Show View menu in the Java category. It shows coverage summaries for the active session.