Change overview ruler color in Eclipse - eclipse

How to change overview rule background color in Eclipse 3.4.0.I20080617-2000 (vertical bar on right of editing window with some annotations) ?
General > Editors > Text Editors > Annotations allows only to change colors of marks itself not background of whole bar.
It looks like my web searching skills are getting weaker since I cannot find it anywhere ...

I also faced the problem of not being able to see the colors in the annotations ruler, so I've made a small plugin which enables setting the background color for the ruler. You can D/L it
from here: https://github.com/chookapp/AnnotationsRulerBackground
(screenshots at: https://github.com/chookapp/AnnotationsRulerBackground)

I have the same problem as Michal - this seems to be non-customisable.
I have trouble seeing some of the annotation marks in the overview ruler due to Vista's lighter colouring. You can change the colour of the marks, but the bar itself doesn't change colour.
It looks like the only way to change it is to change the system colours for all windows.

you can only change the color for the occurrence marking inside the editor (General > Editors > Text Editors > Annotations). The color in the overview ruler is computed from that color.

Add the following lines at the end of e4_classic_win7.css
#org-eclipse-e4-ui-compatibility-editor Composite > Canvas {
background-color : #232323;
}
The file is located in
Eclipse Kepler : \plugins\org.eclipse.platform_4.3.2.v20140221-1700\css\
Eclipse Mars : \plugins\org.eclipse.ui.themes_1.1.1.v20151026-1355\css\
Be sure to select windows clasic theme in Preferences->General->Appearance
And restart eclipse.
Alternatively you can edit the other corresponding css files.
Note: You have to choose you own preferred RBG color instead of #232323

My solution has been to make the text light on a dark background across all text editors. (Window -> Preferences -> General -> Editors -> Text Editors -> Background color => BLACK, and then every 'Syntax Coloring' you need)
This way the annotation colours I choose can be quite highly saturated dark colours - the text is then still legible over the annotation highlight in the text editor, but the marker in the overview ruler is also highly visible (assuming a light window colour in your OS).
The downside of this is that you have to do a lot of customising to get there. (Its worth exporting your preferences for other workspaces if you plan to go down this route.) And its more of a workaround than an answer :-(

It seams to work for me.
The only thing to do is to "restart" Eclipse after your change.
The overview ruler and the editor will display the selected color

What if you are using eclipse 4, try this.
https://github.com/jeeeyul/eclipse-themes

You can actually just disable this bar by going to Preferences > General > Editors > Text Editors. Then just uncheck the box labeled "Show range indicator". The annotations will still appear, the bar will take the color of your theme. Solution found there.

i added below and works well in eclipse luna & neon. It works
#org-eclipse-e4-ui-compatibility-editor Canvas,
#org-eclipse-e4-ui-compatibility-editor Canvas > * > * {
background-color: #b5c7ce;
}
background-color: #e0d2d2;
}

Related

How to change the selected text color in pydev / eclipse dark theme

I am using Pydev / Eclipse with dark theme.
how can I change the selection color? Here's an screenshot showing a part that is selected and is highlighted with a color that is too bright and makes the foreground not readable:
I followed settings of appearance color options in General > Editors > Text Editors as well as General > Editors > Text Editors > Annotations, but I couldn't find any option for changing that bright blueish color.
Here's an image showing my current setting (as you can see, the background selection color is set as a color that is totally different from this light blue color).
You have to restart your Eclipse first to see that 'selection background color' changed for python files.
The best answer to this is found here, Which inherits from General > Editors > Text Editors. There is also General > Editors > Text Editors > Annotations, which is where I found "Breakpoints (PyDev) which had the color I was finding offensive to my eyes.
Happy Hunting!
Short answer:
Preferences > PyDev > Editor.

Eclipse: change vertical bar color

trying to deal with a minor issue here: I want to make my eclipse as distraction free as possible. So far I'm satisfied, except for one thing that I've not been able to figure out how to change:
the white vertical bars are ... annoying. How can I change their color?
Please note that the left ruler is not the code folding bar (which is on the right side of the line numbers), but the so called "vertical ruler" which shows line annotations (eg errors and stuff), to be found in Preferences > General > Editors > Text Editors > Annotations. This bar can not be deactivated (which I don"t want because i find it useful), I just want its color changed. Don't know what the right ruler is though.
not a duplicate of Vertical white line on eclipse or Is it possible to make Eclipse's code-folding gutter black?
edit: but indeed a (partial) duplicate of Change overview ruler color in Eclipse. Problem not solved: changing the system theme (mine is mediterranean dark) did not change the color of the bar.
Thank you
Found it myself, sharing it for others who want to customize their bar color:
#org-eclipse-e4-ui-compatibility-editor * { background-color: #002b36; }
change the hex value to anything you like. This css snippet has to be added to eclipse in some way (I did it with eclipse Chrome Theme http://marketplace.eclipse.org/content/eclipse-4-chrome-theme#.UYrzEkAW1J0)
FYI: I found the css id with the "css spy" from the eclipse tooling collection (http://marketplace.eclipse.org/content/eclipse-4-tools-css-spy#.UYrzSkAW1J0)
result:
Btw, It looks like you can actually just disable this bar by going to Preferences > General > Editors > Text Editors. Then just uncheck the box labeled "Show range indicator".
Thanks for sharing your solution. I could apply the code by just adding to CSS files in eclipse\plugins\org.eclipse.platform_4.3.1.v20130911-1000\css.
I use Windows 7 theme so added to e4_default_win7.css. And I slightly modified the rule to have less side effect (occurrence markers were hard to see with the colors set by color theme).
#org-eclipse-e4-ui-compatibility-editor Composite > Canvas {
background-color: #232323;
}
I had a similar problem, but for me with Neon .2 on windows it was the unfold bar that stayed white. After I disabled unfold and enabled it, the bar stayed black(for now). But you could also just keep it disabled. It is shown in the link below.
link to the PrntScrn to disable unfold bar

How to change search background color in eclipse

I've been searching for about 40 minutes now and this is just so frustrating...
The standard search result background color in eclipse is freaking white and black. Everytime I search something I have to scan the screen for like 50 seconds before I find the spot where Eclipse has found something. I don't know which goon set it this way but he must be working with the goon who programmed the interface for configuring the colors... I can't find it.
Where do I change the background color of search results?
I feel ashamed to have to ask this here... but the things I've tried, like setting it in general>editors>text-editors>annotations didn't work.
In the Eclipse menu bar:
Windows->Preferences->General->Editors->Text Editors->Annotations
Then scroll down to "Search Results" and set the highlighted text color.
This works for Eclipse Helios and Eclipse Juno. I haven't tested other versions.
I am not sure I understand what you mean, but this might help, go to:
Eclipse -> Preferences -> General -> Search there is a line in the right that reads:
"Foreground color for potential matches" and it has a box right next to it where you can change the colors.
You can change the color of the search.
Otherwise, you can also change the colors of what Eclipse highlights by going to:
Eclipse -> Preferences -> General -> Appearance -> Colors and Fonts -> Match Highlight background color
and change the color there.
Hope this helps!
You can also look at this webpage:
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Fconcepts%2Faccessibility%2Ffontsandcolors.htm
This may not be true for all modes, but I'm using Eclipse with Flash Builder plugin on Mac, and it turned out I had to modify the current selection highlight:
General -> Editors -> Text Editors -> Selection Background Color
Also in the search results window (that lists all the findings in a tree), the background color is under a different setting: Windows->Preferences->General->Appearance->Colors and Fonts->Match highlighting background color.
You can change search background color like this: (works for Luna and previous versions)
In the Eclipse menu bar: Windows->Preferences->General->Editors->Text Editors->Annotations
Then scroll down to "Search Results" and set the highlighted text color.
Old question but I will add my findings. I'm using a MacBook Pro
Using Eclipse Mars.1, while I do a 'text' search (using Emacs). To set the search highlight (or background) color I do the following:
Preferences->General->Editors->Text Editors see the Appearance color options section. Highlight the Selection background color and use the color palette to set your desired color.
It is somewhat frustrating as the only way I could get this to work is to restart Eclipse. After the restart I am happy.
Same as #bityz's answer, except for me the annotation which mattered was "Occurrences". I tried this on Eclipse 4.3 Kepler.
To highlight the matching keywords in Juno
Windows->Preferences->General->Text Editor-.Annotations-> in Annotation Types box, look for Write Occurrences. Change the color there.
If you mean (as I think you do) how do you change the highlight colour of strings that match what you select in an editor (e.g. you double-click on 'filename' and Eclipse highlights other references to 'filename' in a dull grey background), then the following post answers this:
Eclipse: How do you change the highlight color of the currently selected method/expression?
In a nutshell, you want:
* General -> Editors -> Text Editors -> Annotations
* Look for "Occurrences" in the Annotation types list and change it from grey to your favourite colour!
I have also found, if you are looking at C++ code (at least in Eclipse Mars 2), changing the following option will set the highlight color of all occurrences of your current (or most recent) search, in case this is what you are looking for:
General->Editors->Text Editors->Annotations->C/C++ Occurrences
Why oh why this is not in the C++ preferences pane I will never know.

Eclipse in Ubuntu: hover background color property, where?

I changed the background color that is visible when hovering code (to black). For example when you hover over a method, you see its signature in a box; I mean the background color of that box.
I want to rechange it but I don't find the property anywhere. Do you know which property it is?
(It should be a global property, because other boxes use the same background color, even the heap status box).
It might be too late. But I think you need to change this from your OS.
System->Preference->Appearance->Customise->Colors->Tooltips
solved my problem.
I am using Ubuntu 10.04.
Preferences -> Java -> Editor -> "Source hover background"?
Edit: OK, do you mean the tooltip type popup window? The background color of the View to show Javadoc can be set in Preferences "General -> Appearance -> Colrs and Fonts -> Javadoc view background" but if you mean a tooltip type popup then you might have to set this in your OS.
In KDE 11.10, System Settings->Application Appearance->Colors(on left)->Colors(tab)->Color Set->Tooltop->Normal Background. Mine was set to black, resulting in black on black in Eclipse.
If you want to change the colour of the hover over for a method that indicates you can click through to its declaration:
Preferences > General > Editors > Text Editors
There is a list of options in 'Appearance Color Options' in the right panel. Select the 'Hyperlink' option and change its colour.
In ubuntu (software center) find and Install GNOME Color Chooser application and set Tool Tip Background color (yellow). Set foreground color to black if you find color viewing problem on other tooltips.
Just go to:
Preferences -> Appearance
and choose a Theme other than GTK
There is no setting for this within Eclipse that works for all cases. You will have to set this on an OS level as recommended by several other answers and it will vary depending on your OS and desktop environment.
However, on some versions of Ubuntu (specifically 14.04), none of the methods mentioned in the answers so far work correctly.
In that case, refer to this this answer on AskUbuntu, which lists the files that need to be edited in order to change the tooltip foreground/background colors to black and white OS wide for the built-in themes. In addition to those, I had to edit one more file (gtk-main.css).
The files that need to be edited are:
/usr/share/themes/Ambiance/gtk-3.0/settings.ini
/usr/share/themes/Ambiance/gtk-3.0/gtk.css
/usr/share/themes/Ambiance/gtk-3.0/gtk-main.css
/usr/share/themes/Ambiance/gtk-2.0/gtkrc
Set all instances of tooltip bg colors to #ffffff (white) and tooltip bg colors to #000000 or any other color combination you like. If you use the Radiance (light) theme instead of the default Ambiance theme edit the files in the corresponding Radiance folder.
For me, no proposed solution did work.
I ended up adding the following to eclipse.ini:
--launcher.GTK_version
2
Preferences -> General -> Appearance -> Colors and Fonts -> Java -> Colored labels (or anything in here)

Eclipse, change popup text background color when hovering the mouse on a keyword

Ubuntu 10.04.1 new theme has by default all windows background colors set to black.
I don't want to change that.
In Eclipse, the interface didn't change much due to 10.04.1 - except for one annoying thing:
when the mouse hovers over a keyword - a variable for instance - the type (...) of that keyword is displayed in a small pop-up window.
The problem since 10.04.1, is that the text is in black color while the background is also black.
Is there a way to change that background color in Eclipse?
Update Dec. 2018: as mentioned in howlger's answer, Eclipse Oxygen 4.7 (June 2017) does now include a way to configure the background color in popups:
See "Colors in interactive popups"
Interactive popups like JDT's Quick Outline don't use the platform's tooltip colors any more, since those were sometimes hard to read.
Old style:
New style:
Go to Window > Preferences: General > Appearance > Colors and Fonts
and change the Basic > Information background color.
In that same Colors and Fonts section, you will find:
Code assist
Basic > Content Assist background color -> change
Basic > Content Assist foreground color -> change
java doc
Java > Javadoc background ( overrides default: information background color) -> change
Original answer (2010-2012)
All the various popup background color are managed in Preferences > Java > Editor (like the one for the completion list popup in bug 133615).
Other background colors are in General > Appearance > Colors and Font (type background in the filter field).
But the type popup seems to stick to a system color, which is why you see a black background.
If this is truly the case, it is worth reporting as a bug.
The OP confirms it is not the case, actually:
It was in Preferences > C/C++ > Editor > Source hover background, and had to untick the "System default" (because the shown color was light-gray!)
On Ubuntu 12.04+, the post "How to change tooltip background color in Unity?" also mentions:
/usr/share/themes/Ambiance/gtk-2.0/gtkrc
The recent post (December 2012) "Eclipse Papercut #10 – Eclipse on Ubuntu: Fixing the black background color in hover" (from Lars Vogel) confirms:
The relevant properties are tooltip_fg_color and tooltip_bg_color.
Just search for these values, the position changes sometimes between releases, currently they are at the very top of the file.
The following setting uses more reasonable colors.
tooltip_fg_color:#000000
tooltip_bg_color:#f5f5c5
pointhi adds in the comments:
I also had to set the environment variable SWT_GTK3=0 before starting eclipse to get it working.
If you use KDE (Kubuntu) you can fix that by changing the Tooltip Background color in KDE System Settings -> Application Appearance -> Colors -> Colors, and change the Tooltip Background.
I've adopted a slightly different solution;
First create a new script, eclipse.sh, that starts eclipse, mine look like this:
#!/bin/bash
GTK2_RC_FILES=/usr/share/eclipse/gtkrc-2.0-eclipse /usr/share/eclipse/eclipse
Then create the gtkrc file (/usr/share/eclipse/gtkrc-2.0-eclipse), mine look like this (it have some other changes as well to make better use of the screen):
style "my-tooltips"
{
bg[NORMAL] = "#FFFFAF"
fg[NORMAL] = "#000000"
}
widget "gtk-tooltip*" style "my-tooltips"
style "gtkcompact"
{
font_name="Ubuntu Light 11"
GtkButton::default_border={0,0,0,0}
GtkButton::default_outside_border={0,0,0,0}
GtkButtonBox::child_min_width=0
GtkButtonBox::child_min_heigth=0
GtkButtonBox::child_internal_pad_x=4
GtkButtonBox::child_internal_pad_y=4
GtkMenu::vertical-padding=1
GtkMenuBar::internal_padding=0
GtkMenuItem::horizontal_padding=4
GtkToolbar::internal-padding=1
GtkToolbar::space-size=1
GtkOptionMenu::indicator_size=0
GtkOptionMenu::indicator_spacing=0
GtkPaned::handle_size=4
GtkRange::trough_border=0
GtkRange::stepper_spacing=0
GtkScale::value_spacing=0
GtkScrolledWindow::scrollbar_spacing=0
GtkExpander::expander_size=10
GtkExpander::expander_spacing=0
GtkTreeView::vertical-separator=0
GtkTreeView::horizontal-separator=0
GtkTreeView::expander-size=10
GtkTreeView::fixed-height-mode=TRUE
GtkWidget::focus_padding=0
GtkTreeView::vertical-separator = 0
}
class "GtkWidget" style "gtkcompact"
style "gtkcompactextra"
{
xthickness=0
ythickness=0
}
class "GtkButton" style "gtkcompactextra"
class "GtkToolbar" style "gtkcompactextra"
class "GtkPaned" style "gtkcompactextra"
class "GtkNotebook" style "gtkcompact"
window -> preferences -> general -> Appearance -> Color&Fonts -> Java (necessary language, example java) -> Javadoc text color (or Javadoc background)
Since Eclipse Oxygen (4.7) this color can be configured in Window > Preferences: General > Appearance > Colors and Fonts by changing the Basic > Information background color.