Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » eclipse-dark and Ambiance-dark - how to change background color of current line
eclipse-dark and Ambiance-dark - how to change background color of current line [message #1486728] Tue, 25 November 2014 08:43 Go to next message
Simone Perriello is currently offline Simone PerrielloFriend
Messages: 25
Registered: October 2014
Junior Member
I'm trying to use the Dark theme with eclipse and the results are pretty cool. However, as you can see from the image below (last line starting with ObjectMapper), it is pretty difficult to read the text of the currently selected line: the background color is a shade of white/grey, very similar to the color of some of the text.
Ubuntu Ambiance-dark + Eclipse Dark
http://i.stack.imgur.com/sQeyk.png


I think this bad background color is setted by the Ambiance-dark theme, which is my default GTK theme on ubuntu.
So, I'd like to use Ambiance-dark theme on Ubuntu and Dark-theme on eclipse, but I'd like to change the default background color of the selected line. Is there any way to change this color in eclipse only? Another good workaround?


I also tried tried to use the GTK theme in eclipse, but it sucks compared to the dark theme.
Ubuntu Ambiance-dark + Eclipse GTK
http://i.stack.imgur.com/U7c3u.png

[Updated on: Tue, 25 November 2014 08:44]

Report message to a moderator

Re: eclipse-dark and Ambiance-dark - how to change background color of current line [message #1486747 is a reply to message #1486728] Tue, 25 November 2014 09:02 Go to previous messageGo to next message
None of Your Business is currently offline None of Your BusinessFriend
Messages: 7
Registered: November 2014
Junior Member
I guess you're looking for the option under:

"Window - Preferences"

on the left side:

"General - Editors - Text Editors"

on the right side bottom ("Appearance color options"):

"Current line highlight"
Re: eclipse-dark and Ambiance-dark - how to change background color of current line [message #1487121 is a reply to message #1486747] Tue, 25 November 2014 15:30 Go to previous messageGo to next message
Simone Perriello is currently offline Simone PerrielloFriend
Messages: 25
Registered: October 2014
Junior Member
None of Your Business wrote on Tue, 25 November 2014 09:02
I guess you're looking for the option under:

"Window - Preferences"

on the left side:

"General - Editors - Text Editors"

on the right side bottom ("Appearance color options"):

"Current line highlight"

Thanks a lot man, it works!!! Very Happy
Re: eclipse-dark and Ambiance-dark - how to change background color of current line [message #1487137 is a reply to message #1486747] Tue, 25 November 2014 15:45 Go to previous messageGo to next message
Simone Perriello is currently offline Simone PerrielloFriend
Messages: 25
Registered: October 2014
Junior Member
None of Your Business wrote on Tue, 25 November 2014 09:02
...
A little bit OT, but I'd like to change another color too, that is the background color for the variables automatically highlighted when I select a variable with the same name. Well, I think an image could is better to understand Very Happy
http://i62.tinypic.com/29mkbjt.png
Re: eclipse-dark and Ambiance-dark - how to change background color of current line [message #1487978 is a reply to message #1487137] Wed, 26 November 2014 08:03 Go to previous messageGo to next message
None of Your Business is currently offline None of Your BusinessFriend
Messages: 7
Registered: November 2014
Junior Member
no problem, i just recently had the same problems trying to find out which color is defined in which eclipse-preference.

the preference your looking for now is set in:

"Window - Preferences"

on the left side:

"General - Editors - Text Editors - Annotations"

on the right side:

"Occurrences (org.eclipse.jdt.ui.ocurrences)"
Re: eclipse-dark and Ambiance-dark - how to change background color of current line [message #1487998 is a reply to message #1487978] Wed, 26 November 2014 08:24 Go to previous messageGo to next message
Simone Perriello is currently offline Simone PerrielloFriend
Messages: 25
Registered: October 2014
Junior Member
None of Your Business wrote on Wed, 26 November 2014 08:03
no problem, i just recently had the same problems trying to find out which color is defined in which eclipse-preference.

the preference your looking for now is set in:

"Window - Preferences"

on the left side:

"General - Editors - Text Editors - Annotations"

on the right side:

"Occurrences (org.eclipse.jdt.ui.ocurrences)"

Thanks a lot for your help, really appreciated!! Very Happy
I would not take advantage of it, but I noticed another thing. When the occurrences are highlighted, the ones corresponding to variable assignation or declaration have a different color from that in which the variable is only used. Indeed, the color change in "Occurrences" does only affect the variable used and not the others. Any idea on how to change this behaviour?
http://i60.tinypic.com/29m96co.png
Re: eclipse-dark and Ambiance-dark - how to change background color of current line [message #1488009 is a reply to message #1487998] Wed, 26 November 2014 08:32 Go to previous messageGo to next message
None of Your Business is currently offline None of Your BusinessFriend
Messages: 7
Registered: November 2014
Junior Member
sure thing.

in the same "area":

the option "Declaration" instead of "Occurrences (org.eclipse.jdt.ui.ocurrences)".

[Updated on: Wed, 26 November 2014 08:33]

Report message to a moderator

Re: eclipse-dark and Ambiance-dark - how to change background color of current line [message #1488014 is a reply to message #1488009] Wed, 26 November 2014 08:36 Go to previous messageGo to next message
Simone Perriello is currently offline Simone PerrielloFriend
Messages: 25
Registered: October 2014
Junior Member
None of Your Business wrote on Wed, 26 November 2014 08:32
sure thing.

in the same "area":

the option "Declaration" instead of "Occurrences (org.eclipse.jdt.ui.ocurrences)".

It seems that I don't have the "Declaration" option under General> Text Editors> Annotations (I'm using Luna)
Re: eclipse-dark and Ambiance-dark - how to change background color of current line [message #1488030 is a reply to message #1488014] Wed, 26 November 2014 08:55 Go to previous messageGo to next message
None of Your Business is currently offline None of Your BusinessFriend
Messages: 7
Registered: November 2014
Junior Member
thats weird... i also use eclipse luna, the x64 version:

"Eclipse IDE for Java Developers

Version: Luna Service Release 1 (4.4.1)
Build id: 20140925-1800"

in my eclipse it looks like in the attached picture. i don't know, where you can find the option if its not there. sorry..

index.php/fa/20022/0/
icon8.gif  Re: eclipse-dark and Ambiance-dark - how to change background color of current line [message #1488085 is a reply to message #1488030] Wed, 26 November 2014 09:54 Go to previous messageGo to next message
Simone Perriello is currently offline Simone PerrielloFriend
Messages: 25
Registered: October 2014
Junior Member
Same version here
Quote:
Version: Luna Service Release 1 (4.4.1)
Build id: 20140925-1800


but
http://i61.tinypic.com/jrs9xu.png
Re: eclipse-dark and Ambiance-dark - how to change background color of current line [message #1488175 is a reply to message #1488030] Wed, 26 November 2014 11:20 Go to previous messageGo to next message
Simone Perriello is currently offline Simone PerrielloFriend
Messages: 25
Registered: October 2014
Junior Member
None of Your Business wrote on Wed, 26 November 2014 08:55
...

do you have some sort of additional plugins installed on your eclipse?
Re: eclipse-dark and Ambiance-dark - how to change background color of current line [message #1488275 is a reply to message #1488175] Wed, 26 November 2014 13:14 Go to previous messageGo to next message
None of Your Business is currently offline None of Your BusinessFriend
Messages: 7
Registered: November 2014
Junior Member
this is what i get in

"Help - About Eclipse"

on the left side on the bottom:

"Installation Details"

first tab "Installed Software".

index.php/fa/20025/0/
Re: eclipse-dark and Ambiance-dark - how to change background color of current line [message #1488362 is a reply to message #1488275] Wed, 26 November 2014 14:40 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
The standard Eclipse Java tools do not have the Declaration option for annotations. I suspect it's coming from Scala IDE or possibly Xtext.

Simone, about your question:
Quote:
I noticed another thing. When the occurrences are highlighted, the ones corresponding to variable assignation or declaration have a different color from that in which the variable is only used. Indeed, the color change in "Occurrences" does only affect the variable used and not the others. Any idea on how to change this behaviour?
http://i60.tinypic.com/29m96co.png

There's a separate Annotation color for "Write Occurrences," look at the bottom of the list of Annotation Types.


Re: eclipse-dark and Ambiance-dark - how to change background color of current line [message #1488448 is a reply to message #1488362] Wed, 26 November 2014 16:14 Go to previous message
Simone Perriello is currently offline Simone PerrielloFriend
Messages: 25
Registered: October 2014
Junior Member
Thanks both for your great help!! @Eric your solution worked great, thanks a lot Very Happy.
Is there some sort of list anywhere that contains the location of all the various color settings?
Previous Topic:How to get cursor into source code in web editor
Next Topic:Build path entry is missing
Goto Forum:
  


Current Time: Tue Apr 23 12:27:51 GMT 2024

Powered by FUDForum. Page generated in 0.09623 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top