Eclipse's Package explorer background color follows windows theme. I want to change the color without changing windows' theme. Possible?
Asked Answered
P

8

78

Maybe a way to alter the colors locally (as in application dependant)?

A background color of eclipse is white, the same white of windows' active window background color. If I change the color on the theme, eclipse changes to the color.

I want to change this software's color without changing the whole theme (because then every program gets weird colors). Is this possible? I thought that maybe there was a way to apply different windows themes to different programs, or something.

I'm using windows XP, classic windows theme.

Pepita answered 5/10, 2010 at 18:14 Comment(5)
There must be some plug in that can do this, right?Abattoir
It's even MORE important for mac users: Apple kindly prevents the ability to modify the colors of their windows altogether. Thus there's NO WAY* to change the colors of those windows on a mac. *Yeah, you can "invert" your colors on a mac, but that's a TERRIBLE hack--probably even worse than having a beautiful black source window and being blinded by all the other windows. :(Genagenappe
Have a look at #1933867Bealle
The accepted answer (currently by Matthias Kempka) was probably how it was back then. Currently you can install the Moonrise theme and have it all. See the answer by user3273530!Erythema
SPRBRN, Yeah I know. Technical questions don't age well.Pepita
O
9

Knowing the way the workbench is built, I'm sure your request is not possible on the Eclipse side. You can do this for the editors, because they are StyledText widgets, and you are exposed some preferences to customize these. The other views are various widgets, some are Trees, some are Text, some are composed from various other widgets. All of them are created with the default constructor which just uses the Windows theme.

Orville answered 12/4, 2011 at 9:50 Comment(4)
For something as fully featured as Eclipse, this is simply UNACCEPTABLE!Genagenappe
Eclipse 4 provides a different workbench model. It should be possible there.Orville
@MatthiasKempka could you elaborate please?Dinin
See the answer from user3273530 how to install the Moonrise theme.Erythema
R
25

Install the "Eclipse 4 Chrome Theme" from http://marketplace.eclipse.org/content/eclipse-4-chrome-theme

Then you can customize a lot of the Eclipse UI widgets. But not what you want, at least not out of the box. For that you should go to the CSS tab (in Eclipse 4 Chrome Theme) and paste this:

Tree, List, Table {
  background-color: #202020;
  color: #d0d0d0;
}

You can change almost anything, the problem is finding out what, and the fact that some things are bitmaps that you can't change (so if the bitmap is dark and you set a dark background you will "loose" the bitmap)

This list of widgets might help, http://download.eclipse.org/rt/rap/doc/1.5/help/html/reference/theming/index.html but they give you generic info on the widget names, not the Eclipse info (with IDs and all), so be careful :-)

== Very late addition ==

Everything you need in one place, including links to a custom dark theme: http://mihai-nita.net/2013/09/19/dark-eclipse/

Mac Screen Shot Example as of Sept 2013 (please be sure to restart Eclipse after changing file):

enter image description here

Rally answered 18/1, 2013 at 10:59 Comment(4)
Looks like you can also tinker directly with the .css files in {eclipseFolder}\plugins\org.eclipse.platform_4.2.1.v201209141800\css, no plugins required (of course, your version might be slightly different)Rally
"the problem is finding out what" :: You can also install "E4 CSS Editor" and "E4 CSS Spy". Those tools will help you find out what each widget is (the "Spy" part) and temporarily tinker with the styles (the "Editor" part).Rally
Everything you need in one place, including links to a custom dark theme: mihai-nita.net/2013/09/19/dark-eclipseRally
for some reason I can't see the new user preset "Dark Eclipse" after unpacking it to install_path/configuration and restart.Trautman
Y
14

Just search "Theme" in the Eclipse Market Place. Install Moonrise. (Should be first option). Then go to the General, appearance, Click on appearance, change theme to moonrise, Then there you go.

Yang answered 5/2, 2014 at 3:38 Comment(1)
Wow, that works. The accepted solution is complicated and simply not true. I entered "Moonrise" in the marketplace, selected the first item, and then selected in general appearance Moonrise (Windows 7 is the default), restarted Eclipse Kepler and presto!Strickman
O
9

Knowing the way the workbench is built, I'm sure your request is not possible on the Eclipse side. You can do this for the editors, because they are StyledText widgets, and you are exposed some preferences to customize these. The other views are various widgets, some are Trees, some are Text, some are composed from various other widgets. All of them are created with the default constructor which just uses the Windows theme.

Orville answered 12/4, 2011 at 9:50 Comment(4)
For something as fully featured as Eclipse, this is simply UNACCEPTABLE!Genagenappe
Eclipse 4 provides a different workbench model. It should be possible there.Orville
@MatthiasKempka could you elaborate please?Dinin
See the answer from user3273530 how to install the Moonrise theme.Erythema
K
1

Install the theme from here as per the instruction in the github: https:// github.com/guari/eclipse-ui-theme

If you don't like the editor color theme, there are bunch of 'em here http://eclipsecolorthemes.org/

Combination of both just works like charm for me!

Karlkarla answered 13/11, 2013 at 21:14 Comment(0)
C
1

Work-arround:

Open e4-dark_partstyle.css. Mine is here: "C:\sts-4.20.1.RELEASE\plugins\org.eclipse.ui.themes_1.2.2300.v20230807-1354\css\dark\e4-dark_partstyle.css"

The css part you need to change is "MPart Tree" Overwrite existing .MPart Tree (pick a dark background color that shows both selected unselected tree elements #004640 in my sample) ( Here is the online color viewer : https://www.color-hex.com/color/004640).

Just add the bellow css section in this file, after its default .MPart Tree definition (or simply add it at the end)

.MPart Tree
{ /* Section > DependenciesComposite$... */
    background-color: #004640;
    color: #AAAAAA;
}

In Eclipse Preferences>General>Appearance>Colors And Fonts>Git, add the same background color for "Uncommited Change (Background)" and "Ignored Resource (Background)" in decimal format (Decimal 0 70 64 in this sample case) Tree font size can be changed in "View and Editor Folders" from Eclipse Preferences>General>Appearance>"Colors And Fonts".

Note:

  • If eclipse is updated to a new version, you may see a new added org.eclipse.ui.themes_xxx folder as part of the update.In this case you will need to redo the changes in the new e4-dark_partstyle.css.

Some other useful tips:

  • For older eclipse versions, tree font can be changed here: "C:\sts-3.7.3.RELEASE\plugins\org.eclipse.ui.themes_1.1.1.v20151026-1355\css\e4_default_win7.css"

Add these lines:

#org-eclipse-jdt-ui-PackageExplorer Tree,
#org-eclipse-ui-navigator-ProjectExplorer Tree {
    font-size: 11px; /* <-- Desired font size */
    /* font: Consolas;   <-- Font you want to have */
}

Modify this eclipse workspace file:

"....metadata.plugins\org.eclipse.core.runtime.settings\com.github.eclipsecolortheme.prefs"

(ColorCode was am old eclipse schema that I used from now defunct http://eclipsecolorthemes.org/, its author user name was joutos)

Add your theme in eclipsecolortheme.prefs file:

colorTheme=ColorCode
eclipse.preferences.version=1
importedColorTheme1=<colorTheme author\="Jeff Van Dorn" id\="358" modified\="2011-02-18 23\:28\:02" name\="chill time">\r\n    <searchResultIndication color\="\#616161"/>\r\n    <filteredSearchResultIndication color\="\#616161"/>\r\n    <occurrenceIndication color\="\#616161"/>\r\n    <writeOccurrenceIndication color\="\#616161"/>\r\n    <findScope color\="\#E0E2E4"/>\r\n    <deletionIndication color\="\#E0E2E4"/>\r\n    <sourceHoverBackground color\="\#FFFFFF"/>\r\n    <singleLineComment color\="\#7D8C93"/>\r\n    <multiLineComment color\="\#7D8C93"/>\r\n    <commentTaskTag color\="\#FF8BFF"/>\r\n    <javadoc color\="\#7D8C93"/>\r\n    <javadocLink color\="\#678CB1"/>\r\n    <javadocTag color\="\#E0E2E4"/>\r\n    <javadocKeyword color\="\#A082BD"/>\r\n    <class bold\="false" color\="\#99C0F9" strikethrough\="false" underline\="false"/>\r\n    <interface color\="\#99C0F9"/>\r\n    <method color\="\#99C0F9"/>\r\n    <methodDeclaration color\="\#E8E2B7"/>\r\n    <bracket color\="\#E8E2B7"/>\r\n    <number color\="\#F18511"/>\r\n    <string color\="\#C7D980"/>\r\n    <operator color\="\#E8E2B7"/>\r\n    <keyword bold\="false" color\="\#4DB84D"/>\r\n    <annotation color\="\#A082BD"/>\r\n    <staticMethod color\="\#E0E2E4"/>\r\n    <localVariable color\="\#E0E2E4"/>\r\n    <localVariableDeclaration color\="\#E0E2E4"/>\r\n    <field color\="\#99C0F9"/>\r\n    <staticField color\="\#99C0F9"/>\r\n    <staticFinalField color\="\#E0E2E4"/>\r\n    <deprecatedMember color\="\#E0E2E4" strikethrough\="true" underline\="false"/>\r\n    <enum color\="\#E0E2E4"/>\r\n    <inheritedMethod color\="\#E0E2E4"/>\r\n    <abstractMethod color\="\#E0E2E4"/>\r\n    <parameterVariable color\="\#E0E2E4"/>\r\n    <typeArgument color\="\#E0E2E4"/>\r\n    <typeParameter color\="\#E0E2E4"/>\r\n    <constant color\="\#A082BD"/>\r\n    <background color\="\#273B50"/>\r\n    <currentLine color\="\#4D4E50"/>\r\n    <foreground color\="\#FFFFFF"/>\r\n    <lineNumber color\="\#81969A"/>\r\n    <selectionBackground color\="\#804000"/>\r\n    <selectionForeground color\="\#E0E2E4"/>\r\n</colorTheme>
importedColorTheme2=<colorTheme author\="joutos" id\="1863" modified\="2015-02-09 14\:58\:29" name\="ColorCode">\r\n    <searchResultIndication color\="\#616161"/>\r\n    <filteredSearchResultIndication color\="\#616161"/>\r\n    <occurrenceIndication color\="\#616161"/>\r\n    <writeOccurrenceIndication color\="\#616161"/>\r\n    <findScope color\="\#B9B0B4"/>\r\n    <deletionIndication color\="\#FFFFFF"/>\r\n    <sourceHoverBackground color\="\#FFFFFF"/>\r\n    <singleLineComment color\="\#36AA70"/>\r\n    <multiLineComment color\="\#36AA70"/>\r\n    <commentTaskTag color\="\#7F9FBF" strikethrough\="false" underline\="false"/>\r\n    <javadoc color\="\#AEAED5" strikethrough\="false" underline\="false"/>\r\n    <javadocLink color\="\#8484FF" strikethrough\="false" underline\="false"/>\r\n    <javadocTag bold\="true" color\="\#A6BAF0"/>\r\n    <javadocKeyword color\="\#A082BD"/>\r\n    <class color\="\#FFFFFF"/>\r\n    <interface bold\="false" color\="\#FFFFFF"/>\r\n    <method bold\="false" color\="\#FFFFFF"/>\r\n    <methodDeclaration bold\="false" color\="\#FFFFFF"/>\r\n    <bracket color\="\#FFFFFF"/>\r\n    <number color\="\#FFFF00"/>\r\n    <string color\="\#FFA500"/>\r\n    <operator color\="\#FFFFFF"/>\r\n    <keyword bold\="true" color\="\#73E110"/>\r\n    <annotation color\="\#929292"/>\r\n    <staticMethod bold\="false" color\="\#FFFFFF" italic\="true" strikethrough\="false" underline\="false"/>\r\n    <localVariable color\="\#FFFFFF"/>\r\n    <localVariableDeclaration color\="\#FFFFFF"/>\r\n    <field color\="\#6FD1F2"/>\r\n    <staticField color\="\#6FD1F2" italic\="true"/>\r\n    <staticFinalField color\="\#FFFF9A" italic\="true"/>\r\n    <deprecatedMember color\="\#FFFFFF" strikethrough\="true" underline\="false"/>\r\n    <enum color\="\#FFFFFF"/>\r\n    <inheritedMethod color\="\#FFFFFF"/>\r\n    <abstractMethod color\="\#FFFFFF"/>\r\n    <parameterVariable color\="\#FFFFFF"/>\r\n    <typeArgument color\="\#FFFFFF"/>\r\n    <typeParameter color\="\#FFFFFF"/>\r\n    <constant color\="\#FFFF9A"/>\r\n    <background color\="\#373A3C"/>\r\n    <currentLine color\="\#4D4D4D"/>\r\n    <foreground color\="\#FFFFFF"/>\r\n    <lineNumber color\="\#787878"/>\r\n    <selectionBackground color\="\#949494"/>\r\n    <selectionForeground color\="\#FFFFFF"/>\r\n</colorTheme>

In this way you can also create your own color schemas for java editor.

Note: a schema defined this way should be reapplied each time after you start eclipse (unfortunately eclipse team did not implement editor schemas save for this plugin). But can be reaplied easily from Prefs/General/Appearance/Color Theme settings for eclipse-color-theme plugin.

Happy Coding.

Confiscate answered 26/11, 2023 at 3:55 Comment(0)
T
0

I don't know of a way to change every Eclipse window to your color scheme, but I can get you at least as far as changing some of the editing windows...

Open up "Window -> Preferences", then under "General | Editors | Text Editors" you will find a section that will allow you to set the "Appearance color options", Background color is one of those options.

PS: I'm using Eclipse 3.6 (Helios)

Tier answered 8/4, 2011 at 15:46 Comment(1)
I'll also refer you to this previous answerTier
G
0

Sadly, this is not possible (which is crazy).
However, Aptana Studio (which is an Eclipse derivative) lets you theme the entire IDE.

Gage answered 8/12, 2012 at 19:20 Comment(1)
@Deprecated see Eclipse 4 :PEvolute
D
0

I did some research and found that actualy it is posible to change all colors, but abit harder. there are two methods that I found so far.

first since eclipse is using OS themes, you can change your OS background settings, like folder background etc., or just change the whole theme if your using windows, but the downside is that all windowses will be same color, in linux and mac os it is also posible, but in different way, I did read it somewhere, but can't remember where :)

second creating a specific theme for eclipse, for example http://rogerdudler.github.io/eclipse-ui-themes/ or any other theme like google chrome etc.

Deepfry answered 5/11, 2013 at 12:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.