Clearing coverage highlighting in Eclipse

2019-03-07 10:39发布

After running coverage reports in Eclipse (using cobertura or an EMMA plugin), my source code files get highlighted in green, red and yellow depending on which lines of code were covered by tests.

How can I clear this highlighting after I'm done?

9条回答
劳资没心,怎么记你
2楼-- · 2019-03-07 11:13

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.

查看更多
我只想做你的唯一
3楼-- · 2019-03-07 11:16

Click the "Remove all Sessions" button in the toolbar of the "Coverage" view.

enter image description here

查看更多
冷血范
4楼-- · 2019-03-07 11:16

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.

http://eclemma.org/faq.html

查看更多
时光不老,我们不散
5楼-- · 2019-03-07 11:25

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

查看更多
不美不萌又怎样
6楼-- · 2019-03-07 11:26

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.

查看更多
ら.Afraid
7楼-- · 2019-03-07 11:32

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.

查看更多
登录 后发表回答