Change Project Explorer tree view font size in Eclipse Oxygen

35,687

Solution 1

I assume that it is important for others also, so I am posting this, for below requireds in eclipse ide,

Increase java editor font size

Window Menu -> Preferences -> General > Appearance > Color and Fonts > Java > Java Editor Text Font > Edit & Apply

Increase console output font size

Window Menu -> Preferences -> General > Appearance > Color and Fonts > Debug > Console font > Edit & Apply

Increase xml bean file font size

Window Menu -> Preferences -> General > Appearance > Color and Fonts > Basic > Text Font > Edit & Apply

Increase dialog view font size

Window Menu -> Preferences -> General > Appearance > Color and Fonts > Basic > Dialog Font > Edit & Apply

Increase project explorer tree view font size

enter image description here

If using Windows 7 or higher architecture, then reach to the eclipse home directory, go inside of eclipse\plugins\org.eclipse.ui.themes_X.X.X.vXXXXXXXX-XXXX\css directory, find two css files which are "e4_default_gtk.css" and "e4_default_win.css", open and add below said css script part in tail of above two files, save those and close accordingly,

.MPart Tree {
    font-family: Consolas;
    font-size: 14;
}

if eclipse is opened, restart, it all worked for me on eclipse oxygen.1a release version,

and hope on other OS type, you have to edit the same e4_default_gtk.css and other e4_default_os-type.css, thanks.

Solution 2

There is now (Eclipse 4.17, July 2020) an official setting:

The font used for tree and table views can now be customized with a font preference. This preference is called "Tree and Table font for views" and can be found in Window > Preferences > General > Appearance > Colors and Fonts under the "View and Editor Folders" category.

https://www.eclipse.org/eclipse/news/4.17/images/adjustable-view-font-preference.png

The Project Explorer is an example of a view that gets affected by this font preference.

https://www.eclipse.org/eclipse/news/4.17/images/adjustable-view-font.png

Solution 3

I have been searching this for every version of Eclipse and finally I got something which helped me to increase the font size and font type of of the project explorer.

1.go to below path on your local environment

.p2 -> pool -> plugins -> org.eclipse.ui.themes_(version) -> css -> e4_basestyle

2.paste below lines at the end of the file.

Tree {
     font-size: 14px; /* <-- Desired font size */
     font: Consolas;  /* <-- Font you want to have */
}
  1. Restart the eclipse
  2. You will get the new defined size and font in your project explorer of eclipse.

NOTE : I tried this on latest version of the eclipse on windows 10 and it worked for me. I did not tried on the previous version.

Solution 4

I'm using eclipse-neon on Ubuntu on Windows-10. The graphical interface is not supported by Microsoft at this time, but I have been using Eclipse Neon and it works decently enough. I added the following to the end of one file: eclipse/plugins/org.eclipse.ui.themes_1.1.300.v20161107-1827/css/e4_default_gtk.css:

.MPart Tree {
font-family: Sans Regular;
font-size: 8;
}

My intent was to make the font smaller, and it worked successfully.

Solution 5

Ankit Fulzele's answer helped me with minor adjustments.

I use Dark Theme on Mac and the following worked for me for Eclipse 2019-06:

Add the following lines to ~/.p2/pool/plugins/org.eclipse.ui.themes_{version}/css/dark/e4-dark_basestyle.css

Tree {
        font-family: '#org-eclipse-ui-workbench-TAB_TEXT_FONT';
}

Instead of setting a fixed font, this will pin it to whatever the "Preferences -> General -> Appearance -> Colors and Fonts -> View and Editor Folders -> Part title font" is configured to.

Note: It would make more sense to pin this to another setting, e.g. to "Preferences -> General -> Appearance -> Colors and Fonts -> Basic -> Text Font", but couldn't find the CSS reference for it.

Note: This update will change not only the "Project Explorer" tab, but others as well.

Share:
35,687
ArifMustafa
Author by

ArifMustafa

Working on computers applications with more than a decade, but these days I am trying to learn JavaScript seriously and other related frameworks like AngularJS and VueJS for better grip on Web Applications and with Cross Mobile native apps support through Flutter

Updated on November 13, 2021

Comments

  • ArifMustafa
    ArifMustafa over 2 years

    I am using Eclipse Version: Oxygen.1a Release (4.7.1a) and I want to enlarge the Project Explorer tree view font size because I have some sight issues and thus I searched many places to enlarge the project tree view font size.

    enter image description here

    I only founded the font change in project explorer tree view for older eclipse versions releases which are older or equal to eclipse luna version.

    for the information I would like to say that this Oxygen version release is latest in Eclipse IDE, please somebody help me.