Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is how I got it working.</p> <h2>Using a plugin</h2> <p>I have downloaded <strong>Eclipse UI Themes</strong> plugin as described <a href="https://github.com/eclipse-color-theme/eclipse-ui-themes" rel="nofollow noreferrer">here</a> (<a href="https://github.com/downloads/eclipse-color-theme/eclipse-ui-themes/com.github.eclipsecolortheme.themes_1.0.0.201207121019.zip" rel="nofollow noreferrer">direct link</a> to an archive). But instead of extracting it into <code>dropins</code> directory, I extracted it into <code>plugins</code>. Also I changed its permissions to allow everyone to modify its files.</p> <p>At this point you have:</p> <pre> plugins/com.github.eclipsecolortheme.themes_1.0.0.201207121019/ ├── com │   └── github │   └── eclipsecolortheme │   └── themes │   └── Activator.class ├── META-INF │   └── MANIFEST.MF ├── plugin.xml └── themes └── css └── <b>juno.css</b> </pre> <p><code>juno.css</code> file is what you want. After launching Eclipse, this theme will be available under <em>Appearance -> Dark Juno</em>.</p> <h2>Without a plugin</h2> <p>After looking into <code>plugin.xml</code>, I had an idea how to create a new theme without using any plugin.</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;?eclipse version="3.4"?&gt; &lt;plugin&gt; &lt;extension point="org.eclipse.e4.ui.css.swt.theme"&gt; &lt;theme basestylesheeturi="themes/css/juno.css" id="com.github.eclipsecolortheme.themes.darkjuno" label="Dark Juno"&gt; &lt;/theme&gt; &lt;/extension&gt; &lt;/plugin&gt; </code></pre> <p>One can add <code>org.eclipse.e4.ui.css.swt.theme</code> extension point to an existing plugin, say <code>org.eclipse.platform_4.2.0.v201206081400</code>. Moreover, its <code>plugin.xml</code> already have this extension point, and the only thing you have to do is to add an appropriate <code>theme</code>. Please note, that it must have a unique <code>id</code>.</p> <pre><code> &lt;theme basestylesheeturi="css/my_theme.css" id="org.eclipse.e4.ui.css.theme.my_theme" label="My Theme Name"&gt; &lt;/theme&gt; </code></pre> <p>A new CSS file can be placed into the <code>css</code> directory, which already contains the default set of themes.</p> <pre> org.eclipse.platform_4.2.0.v201206081400/ ├── ... ├── css │   ├── e4_basestyle.css │   ├── e4_classic_win7.css │   ├── e4_classic_winxp.css │   ├── e4_default.css │   ├── e4_default_gtk.css │   └── ... ├── images │   ├── gtkGrey.png │   ├── gtkHandleDark.png │   ├── gtkHandle.png │   ├── gtkTSFrameDark.png │   ├── gtkTSFrame.png │   └── ... ├── META-INF │   ├── eclipse.inf │   ├── ECLIPSE_.RSA │   ├── ECLIPSE_.SF │   └── MANIFEST.MF ├── platform.jar ├── plugin.properties ├── plugin.xml └── ... </pre> <p>After restarting Eclipse with <code>-clean</code> option you will see a newly created item in the list of all themes: <img src="https://i.stack.imgur.com/f0r7t.png" alt="The newly registered theme"></p> <h1>UPD. 1</h1> <p>For my installation it seems that changes to CSS apply on Eclipse restarting (<em>File -> Restart</em>, or just quitting and starting it manually).</p> <p>The only weird behavior I have noticed is that CSS files from <code>~/.e4css</code> directory (if any exists) override thus ones from the plugin directory. I'm not sure where it comes from, but I can safely remove any files from it. I also don't know this directory even exists on non-Linux systems, but if it does, I guess it should be located somewhere in a home directory of the user, or maybe in <code>Documents</code>.</p> <h1>UPD. 2</h1> <p>I just tried to add a new theme from scratch and noticed that there was a small mistake in the XML above. In order to get a new theme properly registered it must have a unique <code>id</code> attribute. Otherwise you will get an error:</p> <pre><code>java.lang.IllegalArgumentException: A theme with the id 'org.eclipse.e4.ui.css.theme.e4_default' is already registered at org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngine.registerTheme(ThemeEngine.java:186) ... </code></pre> <p>And it seems that I were not right saying just restarting Eclipse to register a new theme is enough. However, <code>eclipse -clean</code> does the trick.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload