Accepted answer

click the "remove all sessions" button in the toolbar of the "coverage" view.

enter image description here


close the ide and open it again. this works if you did not use any code coverage tools and have just clicked the basic "coverage" icon in the ide.


i have used the open clover tool for the code coverage, i have also been searching this for a long time. its pretty straightforward, in the coverage explorer tab, you can find three square buttons which says the code lines you wanted to display, click on hide the coverage square box and its gone. last button in the image below: enter image description here


if you would like to remove active session/project/folder then you can follow

click the "remove active session" button in the toolbar of the "coverage" view.


added shortcut ctrl+shift+x c to keybindings (window -> preferences -> filter for keys) when 'editing java source' for 'remove active session'.


for those using cobertura and only have the coverage session view like i do,just try closing eclipse and starting it up again. this got rid of the highlighting for me.


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.


i found a workaround over on github:

for those who don't want to click the link, here's the text of the comment:

good workaround: create a run configuration with a filter, that excludes everything ("*") and let it run just a single test. name it "undo coverage".

i did this and it worked quite well in eclipse juno.

credit for this goes to usulsk.


for people who are not able to find the coverage view , follow these steps :

go to windows menu bar > show view > other > type coverage and open it.

enter image description here

click on coverage.

to clear highlightings, click on x or xx icon as per convenience.

enter image description here


on 4.2 eclipse it seems to be impossible to remove the ecobertura highlights. sadly ecobertura plugins seems to be not maintained anymore. however if you start writing into the class, its gone. so type a space, and then undo, and its gone.

Related Query

More Query from same tag