I was able to change all the other SQL syntax coloring in Eclipse Preferences, but the normal (non-Sql-syntactic) text is still black and I couldn't find where to find the setting for that. Black text is kind of hard to read against an almost black background. Thank you!
4 Answers
If you are looking for the place to change the Text Editor color settings, go to Preferences->General->Editors->Text Editors, select "Foreground color" in "Appearance color options", uncheck "System Default", click on the color and choose the color you want.
If you want to change the SQL Editor color settings, go to Preferences->Data Management->SQL Development->SQL Editor->Syntax Coloring.
Edit: You need to change the "Others" item in SQL Editor's syntax coloring. It's working on my Mac, anyway. First uncheck "Default foreground color" and then choose the color you want.
Edit: For those not seeing the change, after selecting "Apply and Close", you must Restart your workspace to see the changes. File -> Restart
-
That's a good, informative answer, BUT even after changing that, the text remains black. I'm using Eclipse Luna's built-in Dark Theme. Dec 2, 2014 at 14:21
-
When I select that theme, both my SQL editor and my Text editor are still with black font on white background. Is that your problem? (I'm using a Mac) Dec 2, 2014 at 14:42
-
Actually yes, with the exception that I've managed to change the background color to dark with some hassle, however the normal text color can't be changed with the same dark magic. Dec 2, 2014 at 14:44
-
1Yes, that's it! The settings are kind of confusing. You can edit that to your answer if you will. I'll check it as the correct answer. Dec 3, 2014 at 14:30
-
1
Alexis Dufrenoy is absolutely right:
If you want to change the SQL Editor color settings, go to Preferences->Sata Management->SQL Development->SQL Editor->Syntax Coloring.
Edit: You need to change the "Others" item in SQL Editor's syntax coloring. It's working on my Mac, anyway. First uncheck "Default foreground color" and then choose the color you want.
Just in Luna release I have to restart Eclipse every time after changing SQL syntax coloring (other editors work without restart).
Its strange, but with Windows 7 its the only way.
-
6Closing and re-opening the opened .sql files also work, without restarting the full program– golimarAug 4, 2016 at 10:27
Since 2019-03-14 there is standalone and very simple SQL editor plugin available at eclipse marketplace: https://marketplace.eclipse.org/content/sql-editor - it's just for editing SQL files, syntax highlighting and contains an experimental SQL formatter. It has full customizable colour preferences and also good looking defaults for dark theme - see https://github.com/de-jcup/eclipse-sql-editor/wiki
It is open source, works out of the box, is small and has no dependencies. So it could be a good alternative.
PS: I am the author of the mentioned plugin.
-
1@MartijnPieters : I added the disclosure. I do not want to make commercials here, but I had the same questions before I started to write my plugin... So I thought it is okay.– de-jcupApr 7, 2020 at 14:32
-
Sure, within reason. But a recommendation to use a plugin from someone else has different weight from the same message coming from the author of the code. You are naturally biased, after all.– Martijn Pieters ♦Apr 7, 2020 at 14:35
-
without beeing able to (mark and) execute the code it's not really a good alternative for me. Aug 22, 2022 at 15:21
-
1@AndreasCovidiot: If you need to execute the SQL statements from the IDE you should use DBeaver instead.– de-jcupAug 23, 2022 at 14:57
-
@de-jcup thx - perfect, much more feature-rich than the standard Database Tools and an extensive tool also providing nice coloring Aug 24, 2022 at 16:29