问题
I have imported a project for an assignment and eclipse has decided to auto highlight parts which make them unreadable. I have looked in the text editor settings and found nothing matching this.
回答1:
You are seeing that output because you (probably accidentally) selected Coverage As > Java Application instead of Run As > Java Application from the context menu for your project node in Project Explorer.
Note that Coverage As is immediately above Run As in the context menu.
The colors in the output of your screen shot are meaningful:
- A green background means that the code was executed when your application ran.
- A red background means that the code was not executed when your application ran.
- You can also see a yellow background which means that the code was executed but not all possible paths were executed. You might see this on an if statement or a switch statement.
This article gives a brief summary of code coverage in Eclipse.
来源:https://stackoverflow.com/questions/50580809/eclipse-auto-highlight-unreadable