5

Is it possible to remove the close button from main editor tabs? I've heard there is a new UI model in Eclipse Juno (e4) that uses CSS for tuning, so is it possible to write some CSS to remove close button from the tabs?

I didn't found anything useful regarding available css rules and selector for the new UI.

5

Just found a solution:

  1. First you need to install E4 tools (from update site http://download.eclipse.org/e4/updates/0.12/): Er CSS Editor (Incubation) and restart Eclipse
  2. Now go to Preferences (menu WindowPreferences, then Appearance), there you should find CSS editor for Eclipse UI
  3. Add the following piece of code at the end of CSS code:

    CTabItem {
        swt-show-close: false !important;   
    }
    
  4. Restart eclipse.

2

In addition to Sergey,

You don't have to install any plugin to actually edit the CSS file. If you goto

(eclipse-folder)/plugins/org.eclipse.platform_4.2.***/css/e4_default_gtk.css

and edit this file you will get the same result.

CTabItem {
    swt-show-close: false !important;   
}
  • Just an update for Version: 2018-12 (4.10.0) - The path is a bit different; eclipse/plugins/org.eclipse.ui.themes_1.2.300.v20181108-1102/css/e4_default_gtk.css and css/dark/e4-dark_globalstyle.css for the dark theme. – Alan G. Feb 27 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.