How to change the color of the main editor text
To be clear, I am specifically looking for a way to change the text that is produced in the main editor as I am typing it (ie, it is black right now). For lack of a better term, I shall refer to this as 'typing text'. The version of Eclipse that I'm using is Kepler (4.3).
The equivalent functionality can be achieved in Aptana by visiting:
Window => Preferences => General => Editors => Text Editors
and changing the Foreground Color
Now, eclipse actually has this same setting, but it doesn't seem to do anything. It is possible that it is getting overridden by the styles applied through the Moonrise theme, which I found out about elsewhere on StackOverflow and have installed.
I have determined that a lot of eclipse's fonts/colors/etc can be edited through the Moonrise CSS files, but have not been able to find a style that affects the typing text.
So I am looking for any way to change the color of this so-called 'typing text' that is likely (but not limited) to be one of the following:
"Why?" You might ask?
Imagine handwriting with a pen that used molten metal as ink that would dry in various colors as you completed words. That, but for code. Oh yes.
Editing Moonrise's CSS files:
Here is Moonrise's page on GitHub
Or just install it directly through eclipse (as I did):
https://raw.github.com/guari/eclipse-ui-theme/master/com.github.eclipseuitheme.themes.updatesite
After installing Moonrise, go to:
Window => Preferences => General => Appearance
and set the Theme
to MoonRise (standalone)
Make a backup copy of, and open in WinRAR (or similar), the following JAR file (obviously, your version number may differ):
{pathToEclipse}eclipse/plugins/com.github.eclipseuitheme.themes.moonrise-ui_0.8.4.jar
Open the file (inside the jar):
themes/css/moonrise-ui-standalone.css
Then you can play around thusly:
Yes
button. Eclipse Color Locations:
Since it is a serious pain keeping track of which color is where in the Eclipse Preferences, I made this list of all the sections in which there are color changing options. Note that various plugins and libraries will have their own sections included in Preferences. Obviously, this is not an exhaustive list of those, but I do believe that it's an exhaustive list of the Eclipse ones. Please comment if you know any more not listed (besides some library/plug-in or another).
Solution:
After much searching, I've found a place to change the typing color. It turns out that the color can be changed through the Preferences window:
Eclipse => Window => Preferences => Java => Editor => Syntax Coloring => Element => Java => Others
Additionally, a big piece of the puzzle that I was missing is the Plug-In Selection Spy
which allows for determining the theming information about a specific UI element. It can be viewed by selecting a UI element and pressing ALT+SHIFT+F1
This was brought to my attention in the answer that was accepted for this information and an explanation of why the Foreground
color wasn't being applied.
I then set out to learn more about this sacred tool and found this great tutorial , which I'll leave here for anyone else who has similar issues in the future.
The lines
StyledText {
background-color: #383C3E;
color: #dddddd;
}
in the moonrise-ui-standalone.css
file set the colors for the plain text editor. Given the large number of more specific styles in the CSS file this might vary for other editors.
After much searching, I've found a place to change the typing color. It turns out that the color can be changed through the Preferences window:
Eclipse => Window => Preferences => Java => Editor => Syntax Coloring => Element => Java => Others
链接地址: http://www.djcxy.com/p/71636.html
下一篇: 如何更改主编辑器文本的颜色