Why is Eclipse highlighting my code in red and how do I turn it off? [duplicate]

天涯浪子 提交于 2021-01-22 00:34:10

问题


Why is Eclipse highlighting my code in red and how do I turn it off?

Version: Photon Release (4.8.0)


回答1:


This is activated because of code coverage. If you want to remove it then follow these steps.

  1. Go to "Windows -> Show View -> Coverage" Select it. Click on "Open".
  2. Open the "Coverage" view.
  3. There are "X" and "XX" signs at upper right side. The "X" sign for remove single active session and "XX" for to remove all active sessions.
  4. Click on one of them as per your requirement to remove the coverage session.

Refer the screenshot for more details.




回答2:


Right click on project folder and then select on coverage configuration from configuration and deselect the source folder from configurations. Hope this will help you.




回答3:


I kept on coding and the red-highlight eventually went away. Don't ask me why!



来源:https://stackoverflow.com/questions/54242665/why-is-eclipse-highlighting-my-code-in-red-and-how-do-i-turn-it-off

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!