eclipse single line color - eclipse

how can I change the color of a single line in Eclipse to be able to find it fast while scrolling ? many people are suggesting to download eclipse themes but I am interested in changing the color of a single line to be able to re-find it faster

You can leave this little comment in that line:
// TODO
A small blue rectangle will be shown next to the scrollbar (the same way as your errors and warnings), and you will be able to instanlty find that line by clicking on it.

Related

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

Eclipse change color of vertical white line

I've applied a custom code coloring theme to eclipse 4.3 (Kepler), but there is this annoying thin vertical white line separating code and line numbers. Is it possible to change it's color somehow?
I'm on Ubuntu 13.10 (Saucy Salamander) 64bit, Java 1.7_45 64bit
UPDATE: I've installed Chrome Theme which allows certain customisation, so I was thinking maybe there is a css to change that line color?
That white (it's not white actually but #F8F8F8) line was haunting my dark theme. Google sent me here but couldn't find a working solution. But I found some clues as to where to look for a solution. If you're running Eclipse on Windows 7, there's a file called e4_default_win7.css inside one of the folders. Just search for it.
In that file the last section is,
CTabFolder Canvas {
background-color: #28446a;
}
Just change the color there. That'll solve the problem. I actually did this for my TrueStudio Eclipse IDE. But this leaves another problem. The text is too close to the line numbers and I don't know how to change the margin between them!
Screenshot - see what I'm talking about

changing eclipse colors but don't know what this part of the screen is even called

Having tried and failed to convert my eclipse to a fully white on black display I tried to revert to black on white...and now have only one area remaining in the old mode. The problem is I don't even know what this part of the screen is called, so I can't figure out where in the 18 places eclipse sets colors to go to fix it.
Its the area on the left of the Java editor where you see + or - for expanding / collapsing sections of text. How do I set the background color of this area?
Maybe the Plug-in Spy can help you here. Try Alt+Shift+F1. It shows details about the view you point your mouse at.

Eclipse: scroll space below code

is there any plugin for eclipse to add some space below the code so that I can scroll the last line up to half the screen / up to the top? I hate it when the line I am writing on is always on the bottom of my screen.
Of course, I could add these lines myself, but that would also mean that I have to remove them later, and I don't feel comfortable with so many empty lines...
If there is no such plugin, would it be easy to write one?
I suggest as you are saying adding these lines manually and in the end hit Ctrl+Shift+F to format your code which also includes removing those empty lines at the bottom.

How can I get Eclipse to scroll past the bottom of the document?

When I scroll to the bottom of an open document in the Eclipse editor, the last line is at the bottom of the file. This is a tad annoying when editing code at the bottom of the file / screen.
How can I enable Eclipse to scroll (much like Vim or VS) down far enough that the last line of code reaches the top of the editor window?
I'm asking for the reverse of this question, in Eclipse: How to make Visual Studio editor stop scrolling past bottom of a file?
Considering the current implementation of a Scrollbar, this is not possible.
(See org.eclipse.swt.widgets.ScrollBar.java)
At any given moment, a given scroll bar will have a single 'selection' that is considered to be its value, which is constrained to be within the range of values the scroll bar represents (that is, between its minimum and maximum values).
In the JDT (Java Editor) realm, the range is strongly linked to the number of lines a source file has.
Adding artificial "logical lines" to allows scrolling past the last line would have unintended consequences on many other parts of the JDT, related to displaying informations based on the line number of a source file (like a compilation error red underline).
This is also why there is no soft wrapping in those editors, despite
a 7-years old bug 35779 (one of the most upvoted).
Allowing word/soft wrap in the editor while typing is easy but not enough, a mapping between the model lines and the visual lines must be introduced to e.g. correctly show annotations.
It also introduces various problems that need to be solved, e.g. 'Go to Line': tools like a debugger, compiler etc. will report the model line but a user it will look strange that a different line will be selected than the one entered into the 'Go to Line' dialog
So for now, the SWT scrollbar example is still limited by the bottom of the window: