27

Changed files under version control are displayed with a dark brown background in the project explorer, making the file names unreadable. I would like to change it.

the brown

I have switched between several color themes, but they don't affect the colors in the project explorer. I have not found any useful options neither in the General->Appearance->Colors&Fonts menu nor in the Team->Git menu.

The right-click on the colored filename does not offer an option to change color, as it does when used inside the editor.

I am using eclipse 3.7 SR2 with EGit.

EDIT: I can confirm that it is the git decorator providing the colors - once I switch it off (General->Appearance->Label decorators), the brown color is gone.

kostja
  • 60,521
  • 48
  • 179
  • 224

2 Answers2

49

The settings you want are under Preferences > General > Appearance > Colors and Fonts, look for the section "Git" in the list and under there, "Uncommitted Change (Background)" and "Uncommitted Change (Foreground)." enter image description here

I edited those settings to be a light blue background with white foreground and this is what a changed file looks like in my Project/Package Explorers:

enter image description here

E-Riz
  • 31,431
  • 9
  • 97
  • 134
  • 1
    Thanks, E-Riz. The settings had no impact initially, the bg color was set to white and I still was seeing brown. A different setting must have been overriding the colors. I started uninstalling plugins to find out, and after uninstalling Aptana and EGit, eclipse started to crash on each start. This was enough, so I installed the 4.2 and the colors work as expected now. Thanks for the detailed info anyways :) – kostja Jan 28 '13 at 07:44
  • 1
    Ugh, Aptana. In my experience it's just a headache that bogs down Eclipse. The "color themes" plugin could also be to blame. – E-Riz Jan 28 '13 at 15:58
  • Git menu does not exits there, (as mettioned in the questin), any idea why it is missing? – Petr May 02 '22 at 16:38
9

Another similar feature not in project explorer but right inside file is QuickDiff. This is the feature that tells us all the time which line you have changed, added and deleted by always comparing to what's commmited. To enable this do this Window -> Preferences -> Quick Diff -> Enable Quick Diff Window -> Preferences -> Quick Diff -> Use this reference source -> Git Have Revision

Change the color you want to indicate what's changed, added and deleted. I use yellow, green and red respectively. Then, at any time, you are in file it'll always be visible which line you have edited and can hover over the line numbers (which will be colored pink, blue or any color you have selected) to see exactly what you've changed vs Git. Here how it looks like in eclipse

adubey
  • 492
  • 5
  • 8