问题
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.
- Go to "Windows -> Show View -> Coverage" Select it. Click on "Open".
- Open the "Coverage" view.
- 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.
- 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