Is it possible to change the background color of text highlighted while using a code template in Eclipse? - eclipse

In other words, when you type for and hit ctrl+space, you can pick various template for loops. After selecting, it creates the code and lets you tab between various aspects of the code (such as which array you're looping over). I've switched to dark colors on Eclipse, but I can't find anywhere to change the highlight for these tab areas, so they show up with light backgrounds and my light foreground colors and are completely unreadable.
Is it possible to change these colors somewhere? If so, where?

It took me some time, but I found it.
Look under window>Preferences>General>Text Editors>Linked Mode
Then it is "Editable Range" you are looking for.
In preferences:
Result:

Since you didn't find a prefs setting by searching for "color", there probably is no way to do this. I suggest to open a bug at https://bugs.eclipse.org/bugs/

Related

Customize background color of suggested text

Does anyone know whether it's possible to customize the background of a text after it has been suggested by IntelliSense? I'm using the Everblush theme.
As you can see in the GIF, after selecting the suggested "activityBar.activeBackground" option in the settings.json, I get this annoying white background between the two quotes. This also happens with brackets and with other programming languages (Rust for example).
Do you have any idea on how to change this?
Keep in mind that this happens only after I press the ENTER key on option given by IntelliSense. It has nothing to do with normal text highlighting.
Following rioV8 suggestion, I found out that the option for this particular case is editor.snippetTabstopHighlightBackground.

Eclipse change 'view' border color

Is there a way to change the color of the grids in eclipse?
I am using the built-in 'Dark' theme, and the grid lines are too bright for me, they mess with my vision, I have some visual snow.
I think that is based on the "Window Color and Appearance" (that's the given name if you are under windows) of your desktop personalization just like the top bar maximize/minimize/close.
So you can always go there and change it in "3D objects", but be aware that this change will affect your whole desktop/windows visuals.
Altho, that beeing said, I know that there are ways tweak it around. This could give you a hand: http://marketplace.eclipse.org/content/eclipse-4-chrome-theme#.UYrzEkAW1J0
Also a tool called css spy will help you find what you want to edit faster: http://marketplace.eclipse.org/content/eclipse-4-tools-css-spy#.UYrzSkAW1J0

Netbeans: How to change error row highlighting color away from red

I've dug through every damn color setting under Tools> Options. Went through every Fonts & Color, Editor, PHP etc and I'll be damned if I can figure out how to change the background row highlighting for when you have an error. I've been able to change ever other color to fit my personal preference cept this one. Here's a screen shot of the problem:
I would like to change the background red to a dark red so the text is easier to ready.
Using Netbeans 7.4
Thank you for your time and consideration.
Edit: Per Ben's point, here's the current options and the code behind the panel to show it's not working:
Final update, here's the end result which is close enough:
By looking at your screenshots (correct me if I am wrong) I can see that you have set your current row highlighting to red:
Tools-> Options-> Fonts&Colors-> Highlighting(Tab)-> Highlight Caret Row
As far as I know you can't set different background highlighting options for errors. So what you can do is set the formatting options for errors:
Font: No need to explain this.
Foreground: This is the text color if you change this it will disregard all other formatting options that you may have set, so lets leave it as is.
Background: This is what you want to change so that text don't get lost in the formatting. If you scroll to the bottom you can also set custom colors.
Effects: Irrelevant
Effect Color: Disabled if effects is None and only applies to the effect.
As you can see I set mine to yellow just as an example.
As you can see in this screen shot my background highlighting is light grey as well as my string formatting. So it is impossible to read, but by changing the error formatting this is the result:
Alternatively you can just select another background highlighting color that suits your formatting better.
Try Fonts&Colors->Syntax->Error
You can also try setting the Annotations color for "Error", mine was set to a specific color (after importing a theme) instead of 'Inherited', making text unreadable in a similar way.
This was really annoying for me too and most answers didn't help. I think that I have figured it out.
In netbeans 12 you need to change two things.
Tools->Options->Fonts&Colors->Syntax->Java->Error->change background color. This will only change the background of the code in error and not the red background of the rest of the lines white space.
To fix the red on the whitespace.
Tools->Options->Fonts&Colors->Annotations->Error(the one with the exclamation point)->change background color
I selected inherited to have no whitespace highlighting.
enter image description here

The selected entry in Eclipse content assist is unreadable because of colours

In my Eclipse installation, the selected entry in the content assist menu is almost unreadable because the colour is white on white-greyish. See image below.
I can change the background and text colour of the non-selected entries in the list from eclipse preferences, but the selected entry is always the same colour and is always unreadable. I use the Eclipse Color Theme RecognEyes, but that should only affect the editor as far as I understand.
How do I make the text of the selected entry in the context assist menu readable?
Update
After reading m1shk4's answer it does indeed seem that Eclipse takes it's colours from the current gnome theme. However it does this in a kind of weird way.
The background colour of the content assist "window" is the input boxes background colour, and the text colour is the input boxes text colour. This all seems logical.
However the background colour of the selected entry is the windows background colour, but the text of the selected entry is not the background text colour.
See image below for an illustration.
Does anybody know how to fix or workaround this issue?
Working workaround
It seems this issue is rather specific with the default gnome theme in Ubuntu. Switching to another gnome theme solves the issue for me.
Not sure if it's still in time but this might help all of you who are having the same problem, as I had:
Create a file ~/.gtkrc-2.0 and add this content to the file:
style "eclipse_fix"
{
base[ACTIVE] = shade(0.7, "#4283d3")
}
class "GtkTreeView" style "eclipse_fix"
Then just set Unity a new theme (in Configuration > appearance) and set again to the previous theme (Ambiance for instance). That will read the new file created above and the new color will take effect in eclipse.
I'm on Eclipse Neon and using Eclipse Color Themes.
I've solved this issue by:
Window-> Preferences-> General-> Appearance:
->Uncheck "Use mixed fonts and colors for labels."
Windows > Preference > General > Appearance > Color and Fonts
Basic > Content Assist background color, Content Assist foreground color:
and voilĂ !
Update
Interface is in Russian, but I think it's clear that colors, you're looking for, correspond to Selected Items entry. On my screenshot its light-blue for background and black for foreground.
If you are on Ubuntu / Unity, go ahead and install and start gnome-color-chooser.
Global Colors -> Default Configuration, Entry Fields -> selected and change fg and bg colors according to your needs.
I have the same issue on Windows 7. I found that text color(unselected text) of the content assist box can be changed under:
Desktop->Personalize->Window Color->Advanced Appearance Settings->Item->MessageBox
The only problem is one cannot set the background color for the MessageBox. -> any help from someone else?
At least this way you can read something...
NOTE: Be warned that a lot of other applications may depend on the messageBox color!
I was able to fix this in Ubuntu 12.04 by editing a file in the theme (I use Radiance):
sudo vi /usr/share/themes/Radiance/gtk-2.0/gtkrc
At the top is a key "gtk-color-scheme" with a bunch of color variables that are used later in the file. I make these changes: tooltip_fg_color:#000000 selected_fg_color:#000000 tooltip_bg_color:#f5f5b5
After making the changes, change your theme to something else then back, and most everything looks better! I did have to restart eclipse to get the fonts in the borders of the window to update.
Note that unfortunately these changes get overwritten sometimes during updates. There may be a way to use ~/.gtkrc-2.0 to do the same thing, I just don't know anything about that file.

eclipse editor colors - how to set in outline view

The line that is highlighted on Eclipse is really hard for me to see. I am color blind, but I can see colors. I assume the the highlight color in the outline screen has very little contrast to the other colors. Thank you!
Anyway I will try and attach a graphic.... anyone know to change this?
I think I have something usable enough to post as an answer. You didn't specify the OS that you're using but from the screenshot it looked like Windows 7/Vista with the Aero theme. Like I mentioned in my comment to your question, from this and this, it looks like there isn't any [straightforward] way to change the highlight color.
However, if you don't mind losing the Aero effects, you can switch to the Windows Classic theme to get a different highlighting that IMO provides more contrast and better readability.