Retain previous open file tab under visible tabs

前端 未结 4 1392
夕颜
夕颜 2020-12-23 11:32

Eclipse Juno - In my workspace I have \'Package Explorer\' opened on the left side, on the right side I have 6 visible file tabs and under \'Show List\' I have 17 files.

相关标签:
4条回答
  • 2020-12-23 11:56

    There's a more straight-forward way to bring back the old tab behavior of the eclipse Juno editor:

    • Go to INSTALL/plugins/org.eclipse.platform_4.2.0.qualifier/css
    • Choose the CSS for the theme that you use
    • Replace swt-mru-visible: false; with swt-mru-visible: true;
    • Restart eclipse (I haven't tested if that's necessary, at all)

    If that doesn't work, also look in INSTALL/configuration/org.eclipse.e4.ui.css.swt.theme/ for CSS files.

    If you have a look at the css files of the different themes, you can see why switching the theme solves the problem as well.

    => http://wiki.eclipse.org/Eclipse4/CSS

    0 讨论(0)
  • 2020-12-23 12:04

    I think I just had the same problem and I solved it by switching the theme.

    Go to Preferences -> General -> Appearance and switch to the Classic theme.

    I can't understand why this helps, but it worked for me.

    Update:

    After being bitten by this again I checked again and as @anweibel says in his answer this can be edited in the CSS.

    I just installed the E4 CSS editor plugin using the Eclipse Marketplace so that I could change the CSS directly from Eclipse under Preferences -> Apperance. I changed swt-mru-visible from false to true so that the relevant part for the GTK theme looked like this:

    .MPartStack {
        font-size: 11;
        swt-simple: false;
        swt-mru-visible: true;
    }
    

    A restart was required for the changes to take effect.

    More info can also be found here: Eclipse tabs repositionning

    0 讨论(0)
  • 2020-12-23 12:07

    Quick Linux fix for all themes:

    cd <eclipse install dir>
    find . -type f -name "*.css" | xargs grep 'swt-mru-visible: false'  | cut -d: -f1 | xargs -n1 sed -i.orig 's/swt-mru-visible: false/swt-mru-visible: true/'
    

    This will find all CSS files with "swt-mru-visible: false", back them up with *.orig suffix and change to "swt-mru-visible: true"

    You can find all backup files with"

    find . -type f -name "*.orig"
    
    0 讨论(0)
  • 2020-12-23 12:16

    Here is a quick update for anweibel's answer for Eclipse Luna:

    The CSS you wanna edit is now located at

    • INSTALL/plugins/org.eclipse.ui.themes_1.0.0.qualifier/css
    0 讨论(0)
提交回复
热议问题