How to make Intellij Idea Coverage display full colored lines?

前端 未结 4 1957
时光取名叫无心
时光取名叫无心 2021-02-03 19:11

In Eclipse, most of the coverage plugins, display covered/partially covered/uncovered lines with different colors (i.e. the whole line painted with a color)

相关标签:
4条回答
  • 2021-02-03 19:29

    I found the solution to this problem here but I thought it would be better to create a specific, well-phrased question so that people having exactly the same problem as me can find it better in Google / StackOverflow.

    In a nutshell, through Editor -> Colors & Fonts -> General (or, at least from IntelliJ 2017.3 onwards, Editor -> Colors Scheme -> General)

    you can customize the Colors & Fonts used for covered/partially covered/uncovered lines, modifying the background of the following entries:

    • Full line coverage
    • Partial line coverage
    • Uncovered line

    For example, I wanted to use the same default colors already provided but not only on the margin but on the whole line (similar to how Eclipse does it), so I disabled "Foreground" and enabled "Background". Voilà!

    0 讨论(0)
  • 2021-02-03 19:29

    I think the UI has been updated the the way to get to this option has changed. While it is already mentioned by others, I'd like to elaborate with a more detailed image to make it easier to see.

    Intellij > Preferences > Editor > Color Scheme > General > Line Coverage >
    

    There you will have three options.

    • Full
    • Partial
    • Uncovered

    Here is the menu option:

    And here is what the question is specifically looking for:

    0 讨论(0)
  • 2021-02-03 19:31

    Thanks for the update I fixed by uncovered lines in Intellij attached the screenshot for reference.

    0 讨论(0)
  • 2021-02-03 19:49

    On the current apple version of IntelliJ you can find this under:

    ItelliJIde > System Preferences > editor > Color Scheme > General
    

    Then expand the arrow labeled Line Coverage

    0 讨论(0)
提交回复
热议问题