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

3

28

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.

Advocacy answered 27/1, 2013 at 9:11 Comment(1)
SOLUTION:The best option is to commit the code in git. Problem solved!Selinaselinda
S
52

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

Spaghetti answered 27/1, 2013 at 15:37 Comment(3)
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 :)Advocacy
Ugh, Aptana. In my experience it's just a headache that bogs down Eclipse. The "color themes" plugin could also be to blame.Spaghetti
Git menu does not exits there, (as mettioned in the questin), any idea why it is missing?Parma
C
10

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

Cary answered 27/4, 2014 at 4:54 Comment(0)
H
0

In Spring Tool Suite (STS), its under the menu : General > Editors > Text Editors > Quick Diff

Better to search in Preference with Quick Diff enter image description here

Horror answered 22/7, 2024 at 6:58 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.