Change annotation background colors in eclipse? - eclipse

So in eclipse whenever there is an error it's underlined in red, and when you hover over it is displays an annotation with tips on how to fix the error. On my Windows OS it is correct and the background is a tanish color but on Ubuntu the background is black and I want it tanish like Windows. I know there is an annotation area under Preferences > General > Editors > Text Editors > Annotations, but I don't see a section to change background colors. Please help.

Oddly, colors and fonts are very poorly implemented in Eclipse. Quite a number of things are either extremely difficult to figure out or impossible. Looks like this one is impossible to modify. Perhaps there's an OS way to make those changes?
That said, I found an Eclipse plugin, Annotions Ruler Background. It looks like it should do the trick, but was designed for Indigo (3.7) and doesn't seem to work on Juno (4.2). Sigh.
You can install it from the usual way in Eclipse (help->eclipse marketplace->search, etc.). Their website is here.
If you're still on Indigo, give it a try.

I find this page, it works. http://ubuntu-user-tricks.blogspot.tw/2012/09/3-things-to-do-after-installing-eclipse.html
It change the theme tooltip background color, and foreground color if need.
You can install tool gnome-color-chooser or modify the configure directly (default at /usr/share/themes/Ambiance/gtk-2.0/gtkrc). If After you modify the theme configure, you need reload theme to use new config.

Related

Eclipse (4.14.0), changing the editor background colour

I had set the theme to Dark, and changed the editor background/foreground colours, but it did not work (only changed the line number background). So, I searched the web and found the existing question. But the answer was saying the same thing that I already had done.
Is the method changed? Why can't I set the editor background to complete black and the text to complete white?
This worked for me:
1. Launch Eclipse
2. Click on Help
3. Select Eclipse Marketplace
4. Open Popular tab
5. Select and install "Darkest Dark Theme with DevStyle CI 2019.9.16"
6. Wait for it to finish installation
7. Restart Eclipse
At this stage, eclipse should restart with options to tweak background colour to your desired theme
There seems to be a recent Eclipse bug.
There is a possibly duplicate question here which has at least one additional suggested workaround besides the other answer to this question.
For anyone still looking for this known bug in eclipse -> install the plugin that James Kufre mentioned, right know there is another version called:
Darkest Dark Theme with DevStyle 2022.6.13a.
This plugin fixes the bug. You can then basically choose the complete color scheme of eclipse. So not only the editor field, but also the menus and everything!

How to edit Javadoc popup link color in Eclipse

I am using the Dark theme in Eclipse Oxygen. When I hover over a class to view the Javadoc, the links are in blue and very hard to see
I have tried editing the hyperlink color in Preferences -> General -> Appearance -> Colors and Fonts -> Basic -> Hyperlink text color but that didn't work. Under the Java section in Colors and Fonts there is an entry to edit Javadoc background and Javadoc text color, but I see nothing for Javadoc hyperlink color or something like that. I could change the background color as a workaround but that breaks the dark theme and I'd rather not.
The short answer is you can't because it's system dependent.
Among the many other ongoing dark-theme bugs that need to be fixed, the particular bug you've found has been recently reported here as bug 517393. The target fix for this bug is in Eclipse Photon (4.8) Milestone 2.
I've figured out a workaround for this issue at least for Windows.
On Windows, Eclipse's html renderer follows Internet Explorer's option for changing color of webpage. So, if you do not use Internet Explorer or just do not mind such change of all webpage, let's go!
Please note that some desciption below may not be accurate since I do not use an English version of Windows.
Open IE, click GEAR icon at top right corner - choose Internet Optioin - click Color at the bottom - uncheck Use Windows Color - change the color of Visited and Unvisited, and the rest two to suit your need if you use dark theme in Eclipse. Apply the change.
Then click Accessibility (on the right of Font) - check Omit Color - Apply the change.
It's done.
For those who are like me still stuck with an older Eclipse IDE like 4.7.3 (without the fix of the bug mentioned in the first answer) and are using Windows:
The workaround in the previous answer does not work if you have Microsoft Edge installed instead of Internet Explorer. Reason: Microsoft Edge does not let you change the link color. There are Chrome Extension that you can install but this didn't work for me either.
Another solution could be to switch Windows to "High contrast mode". Someone even managed to change the link color for Eclipse. I accidently found this "temporary" workaround:
Start Eclipse
Activate Windows "High contrast mode"
Eclipse wants to be restarted. Say yes.
Deactivate Windows "High contrast mode"
Again, Eclipse wants to be restarted. Again, say yes.
Now the Javadoc popup looks like in "Light" theme!? So links are very easy to see now.
However, that's not a really comfortable workaround: it needs some time and you have to repeat these steps after every reboot. My "favorite workaround" for now, is to select the link text in the Javadoc popup with the mouse, so that the link text is displayed with a more readable background/foreground color combination.

Change the appearance of Eclipse

I'm using Eclipse and I don't like the appearance of the user interface, it's to much white color in the background. I have used Eclipse earlier, and then it was better with not all that white area! I have been looking in the preference, but have not found any places to change the user interface. Is there a theme that could be changed !?
Open your Eclipse Market Place and search for "Eclipse Color Theme",install it.
than go to windows> preferences> appearances> color theme, select your favorite style, and enjoy.
For more info read hare.
In Eclipse Juno (4.2) it's possible to completely customize the look and feel of Eclipse via CSS, but doing so yourself isn't exactly trivial. You can get the "old" style theme (Indigo) easily via changing a Preference, see this question.
Here are a couple of other related SO questions and answers:
Eclipse 4 Juno themes
eclipse Juno custom workbench colors

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

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.
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):
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.
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.
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)
Sadly, this is not possible (which is crazy).
However, Aptana Studio (which is an Eclipse derivative) lets you theme the entire IDE.
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.
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!

Eclipse syntax colors for HTML files

I'm using eclipse for a few months, I realy like gvim better but eclipse makes my life easier with pydev and phpeclipse. Everything is pretty nice, I have a black fluxbox and black GTK themes, I've changed the syntax colors for py and php and now everything is dark background, light foreground (including the eclipse menu/borders/etc), very nice.
But.. I can't find a way to change the syntax colors for html files. It's really bad, occasionally I will want to open a html file in eclipse and standard text is black (same as my background). I've changed every background-related color setting I could find but the html editor's colors don't change. Am I missing something? Does anyone know how to change this?
You need to install the WTP plugin to add all that HTML/JS/CSS support.
I would also recommend using the PDT plugin for all your PHP needs.
After installing these plugins.. you should be able to access their properties in Window>Preferences...
Hope this helps :)
For others who may not be as familiar with the Preferences for Eclipse you can find most of these color settings (once you have the plugins mentioned here installed) at:
Preferences > Text editors > Appearance color options
and
Preferences > Appearance > Colors and Fonts
Don't forget to use the search features built into the Eclipse preference panes to find the exact element you are trying to modify.