📜 ⬆️ ⬇️

Dark theme for Eclipse + PDT (ZendStudio for Eclipse)

Preamble


Once upon a time, working back in ZendStudio 5.0, and then 5.5, there was a beautiful dark theme for highlighting the code. For a couple of years of work, I was so used to it, that when I relocated to Eclipse + PDT, my eyes were against a white background with green letters.
Searches on the Internet for the same topic for Eclipse, searches for at least some dark topic and then searches in general did not give any result. It turned out (horror of horrors!) That Eclipse does not support the change of finished themes.

The search for at least some possibility of Eclipse customization on Habré was brought to the olegchir Habrayuser topic . Inspired by the idea to make an analog Parabox Style for Eclipse, I got to work

What came out of this, you can look at the screenshots below:
')







I want the same!


The process of manually changing the standard theme is dreary, but for those who want, there are no obstacles :)

Be sure to export the Eclipse settings to a backup file! Zakapapte your workspace!

-one. Export settings and current workspace


Exporting settings is simple. File - Export - General - Preferences. On the next screen, choose export all settings - Export all.
Backup workspace is done by simply copying its folder.

0. Import settings.


The first step is to add the Eclipse base color settings.
a) Download the file http://blog.codefront.net/wp-content/uploads/2006/09/Eclipse%20preferences.epf
b) File - Import - General - Preferences and specify the path to the downloaded file.
Details about the file are written here: http://blog.codefront.net/2006/09/28/vibrant-ink-textmate-theme-for-eclipse/

1. Set colors in PHP - Editor - Syntax Coloring


  Comment 202/202/202 (#CACACA) Italic
 Heredoc 0/130/130 (# 008282)
 Keyword 255/255/128 (# FFFF80) Bold
 Normal 255/255/128 (# FFFF80)
 Number 255/100/100 (# FF6464)
 PHPTags 155/255/50 (# 9BFF32) Bold
 PHP Doc 0/204/204 (# 00CCCC)
 String 132/194/255 (# 84C2FF)
 Task tag 124/165/213 (# 7CA5D5) Bold
 Variable 172/255/174 (#ACFFAE) 


2. Set colors to General - Editors - Text Editors


  Current line highlight 70/70/70 (# 464646)
 Selection foreground color 229/229/229 (# E5E5E5)
 Selection backgroud color 93/93/93 (# 5D5D5D)
 Background color 64/64/64 (# 404040)
 Hyperlink 0/190/255 (# 00BEFF) 


3. Change colors in General - Editors - Structured Text Editors


  Matching bracket hightlight 100/100/100 (# 646464) 

- Perhaps not the best option, but I settled on it.

4. General - Editors - Text Editors - Annotation


  PHP elements 'write' occurrences 160/140/110 (# A08C6E)
 Write Occurrences 160/140/110 (# A08C6E)
 PHP elements 'read' occurrences 100/100/100 (# 646464)
 Occurrance annotation 100/100/100 (# 646464)
 Debug Current Instruction Pointer 0/102/153 (# 006699) 


5. Web - CSS Files - Editor - Syntax Coloring


  At Rule 132/194/255 (# 84C2FF)
 Comment 202/202/202 (#CACACA)
 Curly Brace 100/100/100 (# 646464)
 Media Name 0/170/200 (# 00AAC8)
 Property Name 251/205/121 (# FBCD79) Italic
 Property Value 255/255/125 (# FFFF7D)
 Quoted String 30/200/30 (# 1EC81E)
 Selector 255/100/100 (# FF6464)
 URI 0/127/255 (# 007FE1) Italic 


6. Web - HTML Files - Editor - Syntax Coloring


  Attribute Names 132/194/255 (# 84C2FF)
 Attribute Values ​​30/200/30 (# 1EC81E)
 Comment Content 202/202/202 (#CACACA)
 Comment Delimiters 202/202/202 (#CACACA)
 Content 235/235/235 (#EBEBEB)
 Entity References 255/255/125 (# FFFF7D)
 Tag Delimiters 132/194/255 (# 84C2FF)
 Tag Names 132/194/255 (# 84C2FF) 


7a. JavaScript - Editor - Syntax Coloring


This item must be completed if you use the standard JS editor.
  Javascript:
	 String 30/200/30 (# 1EC81E)
	 Brackets 230/230/230 (# E6E6FA)
	 Keyword 'return' 245/240/137 (# F5F089) Bold
	 Keyword excluding 'return' 245/240/137 (# F5F089) Bold
	 Operators 230/230/230 (# E6E6FA)
	 Others 230/230/230 (# E6E6FA)
 Jsdoc:
	 Others 202/202/202 (#CACACA)
 Comments:
	 Multi-line Comments 202/202/202 (#CACACA)
	 Single-line Comments 202/202/202 (#CACACA) 


7b. Spket - Editors - JavaScript Editor - Syntax Coloring


This item must be completed if you use Spket JS Editor.
  Javascript:
	 Keywords excluding 'return' 245/240/137 (# F5F089) Bold
	 Future Reserved Word 255/128/128 (# FF8080)
	 Keyword 'return' 245/240/137 (# F5F089) Bold
	 Operators and brackets 230/230/230 (# E6E6FA)
	 Strings 30/200/30 (# 1EC81E)
	 Regular Expressions 255/128/64 (# FF8040)
	 Server Side Script 128/128/128 (# 808080)
	 Brackets 230/230/230 (# E6E6FA)
	 Others 230/230/230 (# E6E6FA)
 Jsdoc:
	 Tags 127/159/191 (# 7F9FBF) Bold
	 HTML markup 127/127/159 (# 7F7F9F)
	 Links 128/128/230 (# 8080E6)
	 Others 202/202/202 (#CACACA)
 Comments:
	 Multi-line Comments 202/202/202 (#CACACA)
	 Single-line Comments 202/202/202 (#CACACA)
	 Task Tags 127/159/191 (# 7F9FBF) 


8. Extended vs Presentation


Instructions for setting up taken from the topic

First you need to download the “Extended VS Presentation” plugin, after its installation the side panels and tabs will start to look like in the screenshot.
You can read about it on the author's page (http://andrei.gmxhome.de/skins/index.html).

Briefly the installation process is to
1) adding a new entry in “ Help- > Software Updates-> Avialable Software“ andrei.gmxhome.de/eclipse ”
2) and installing from this source plug-in Eclipse 3.4 plugins -> Extended VS Presentation (instead of 3.4 substitute the current version of Eclipse)
3) in the menu “Window -> Preferences -> Appearance” set Current Presentation to “Extended VS Presentation”
4) in the same menu, set the Current Theme option to the “High Contrast” position
5) applying the settings requires restarting Eclipses

  Border Color (focus) 89/38/38 (# 592626)
 Tab Color (focus) 68/68/68 (# 444444)
 Tab color (no focus) 25/25/25 (# 191919)
 Tab Text Color (focus) 170/170/170 (#AAAAAA)
 Tab Text Color (no focus) 128/128/128 (# 808080)
 Title Color (focus) 60/60/60 (# 3C3C3C)
 Title Color (no focus) 0/0/0 (# 000000)
 Title Text (focus) 230/230/230 (# E6E6FA)
 Title Text (no focus) 77/77/77 (# 4D4D4D) 


9. Window View Settings in Linux Gnome


Method prompted nuit in comments

We take from /usr/share/themes/Clearlooks/gtk-2.0/gtkrc (if you want a Clearlooks theme) and copy somewhere (I have it in the Eclipse directory) ...
open this file, replace fg_color / bg_color, etc. (basically just tweak only the top line) with dark colors ...
and run :)
  GTK2_RC_FILES = "/ home / nuit / Desktop / eclipse / clearlooksrc" ./eclipse 


I bring a ready line of flowers to get what is on the screenshots
  gtk_color_scheme = 
 "Fg_color: #fdffff \ nbg_color: # 333333 \ nbase_color: # 222 \ ntext_color: #fdffff \ nselected_bg_color: # FFA443 \ nselected_fg_color: # 1A1A1A \ ntooltip_bg_color: # 222222 \ ntooltip_fg_color: #FFF" 


Shortcomings and additions


I did not customize colors for XML files, so I don’t provide here. I would be glad if someone complements my little manual :)
To highlight changes in diff mode, you can change colors in General - Apperance - Colors and Fonts - Text Compare. Unfortunately, with my beloved Eclipse some bjaki happen sometimes, so the color settings in this section are not saved after the restart. Therefore left as is. Still, setting the colors here, you need to look at how it looks in the window, because there the colors will not be the same as you set, but some strange mixture of the given color and some other, like when selecting text.

I hope this topic is useful to someone.

Source: https://habr.com/ru/post/68314/


All Articles