Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the background color for changed files in eclipse project explorer?

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.

like image 938
kostja Avatar asked Jan 27 '13 09:01

kostja


2 Answers

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

like image 123
E-Riz Avatar answered Sep 17 '22 00:09

E-Riz


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

like image 40
adubey Avatar answered Sep 19 '22 00:09

adubey