Change Project Explorer tree view font size in Eclipse Oxygen
Asked Answered
T

17

40

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.

Tonsil answered 9/12, 2017 at 17:40 Comment(1)
codeyarns.com/2014/11/03/…Lemieux
T
29

In Eclipse the font-sizes of the UI elements can be adjusted in the following preferences values:

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.

Tonsil answered 10/12, 2017 at 15:21 Comment(7)
The trick for the project explorer tree doesn't work in Oxygen and Photon on Windows 10.Mahaffey
Moreover, I checked with procmon, Eclipse not using these .css files at all. I mean none from that directory.Mahaffey
hi all, this all is about Eclipse Oxygen version, so in Windows 7, 8.1 & 10 it is working fine.Tonsil
Just checked Oxygen on Windows 10. It doesn't work. On Windows the SWT uses a standard Windows tree control, nothing's fancy. The font size depends only on Windows settings, nothing in Eclipse changes it.Mahaffey
With Oxy-3a on Mac, all tree elements are bigger now except for the one changed (using git of course), which stay old size. This is even when I change e4_basestyle.css too.Sluggard
It doesn't work!! Just now checked in Neon.3 Release (4.6.3) in MacOS :(Beckybecloud
I am able to change the font in the Package Explorer in Eclipse 2019-12 on Windows 10 by adding a style for Tree to e4_basestyle.css like: Tree { font-size: 9px; font: Consolas; }Gorlicki
I
66

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://static.mcmap.net/file/mcmap/ZG-AbGLDKwf1c1bQXVMsZ7BxXS2vbmb/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://static.mcmap.net/file/mcmap/ZG-AbGLDKwf1c1bQXVMsZ7BxXS2vbmb/eclipse/news/4.17/images/adjustable-view-font.png

Install answered 10/7, 2020 at 16:12 Comment(0)
T
29

In Eclipse the font-sizes of the UI elements can be adjusted in the following preferences values:

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.

Tonsil answered 10/12, 2017 at 15:21 Comment(7)
The trick for the project explorer tree doesn't work in Oxygen and Photon on Windows 10.Mahaffey
Moreover, I checked with procmon, Eclipse not using these .css files at all. I mean none from that directory.Mahaffey
hi all, this all is about Eclipse Oxygen version, so in Windows 7, 8.1 & 10 it is working fine.Tonsil
Just checked Oxygen on Windows 10. It doesn't work. On Windows the SWT uses a standard Windows tree control, nothing's fancy. The font size depends only on Windows settings, nothing in Eclipse changes it.Mahaffey
With Oxy-3a on Mac, all tree elements are bigger now except for the one changed (using git of course), which stay old size. This is even when I change e4_basestyle.css too.Sluggard
It doesn't work!! Just now checked in Neon.3 Release (4.6.3) in MacOS :(Beckybecloud
I am able to change the font in the Package Explorer in Eclipse 2019-12 on Windows 10 by adding a style for Tree to e4_basestyle.css like: Tree { font-size: 9px; font: Consolas; }Gorlicki
L
11

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.

Larina answered 7/5, 2019 at 21:11 Comment(2)
I needed to apply this to e4-dark_mac.css because I'm using the dark theme and it worked.Otte
I modified e4-dark_globalstyle.css .. beginning to wonder if it matters what CSS file it goes into. I added to that file and worked after restart.Diva
R
8

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.

Ro answered 11/7, 2018 at 23:44 Comment(1)
I'm using eclipse 2018-09 on openSUSE and Gnome. This mostly works, but uncommitted resources in EGit still use the larger font. I could change this through the eclipse preferences, but it would be better to sort this out in the CSS as well. I'll look into this a bit more when I have time.....Triecious
U
5

Go to Preferences -> (search for) Fonts -> View and Editor Folders -> (select the last option) Tree and Table font for views -> Edit (left hand side) -> and change the font size.

Unworthy answered 12/11, 2021 at 19:9 Comment(0)
R
3

Thanks for the help. In my case, I use the Dark [Mac OS X] theme in Eclipse Photon on Windows 7, so the file I had to alter was e4-dark_mac.css in eclipse\plugins\org.eclipse.ui.themes_X.X.X.vXXXXXXXX-XXXX\css. Also the .MPart Tree was not in the file so I had to add it as opposed to editing it. I added right under another .Mpart entry so my file looked like below.

...

.MpartStack, .Mpart {
    font-family: '#org-eclipse-ui-workbench-TAB_TEXT_FONT';
}

.Mpart Tree {
    font-size: 12;
}

...
Rutharuthann answered 22/4, 2019 at 16:52 Comment(1)
This worked for me on Mac OS 10.15, using the path @Cristiano mentioned in his answer above, for Eclipse 2020-03 (4.15.0).Boastful
G
3

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.

Gehring answered 8/8, 2019 at 7:58 Comment(0)
C
2

Answer from Al Breight worked perfectly on Oxygen.3a Release (4.7.3a), Ubuntu 18.04. @pkeller comment (Oct 16 at 14:05) confirmed and solved editing 'Git Uncommited Change Font' size option in Window->Preferences->General->Appearance->Colors and Fonts:

enter image description here

Coomb answered 19/10, 2018 at 23:13 Comment(2)
This is only for the "uncommitted" stuff.Sadoff
Yes, that was the problem that pkeller marked on his commentCoomb
F
2

In my case using a MacBook 13", I had to edit the following file /Users/myuser/.p2/pool/plugins/org.eclipse.ui.themes_1.2.800.v20191030-0746/css/e4-dark_mac1013.css

Then I searched for this existing item and added the font-size and font-size-adjust. Doing that prevents the tree line to be cropped:

CTabFolder Tree, CTabFolder Canvas {
    background-color: #2F2F2F;
    color: #CCC;
    font-size-adjust: none;
    font-size: 14px;
}
Facultative answered 21/11, 2019 at 12:46 Comment(0)
S
0

Thanks so much! I can finally see the Eclipse Project Explorer clearly! I was able to change the project explorer tree font size by making the css file addition shown above in Windows 7 with Eclipse 2018-9 (4.9.0).

The specific folder location I found was at:

C:\Users\myUserName\.p2\pool\plugins\org.eclipse.ui.themes_1.2.200.v20180828-1350\css

Apparently, from my investigation of solving this problem the specific folder location varies based on different factors like Eclipse Version and OS.
So I searched on the css file names to find the latest folder.

I had 7 eclipse themes folders on my workstation, I used the most recent one, corresponding to the specific install/update of Eclipse being currently used.

Scaffolding answered 15/10, 2018 at 14:39 Comment(0)
P
0

I'm using Eclipse 2018-09 and could't found .css file similar gtk at Eclipe directory.
But I discover custom css menu on Jeeyul's theme(plugin for Eclipse Color UI).
Just typing css style above comments. And apply and close.
In the end, change UI style.

Paulownia answered 15/4, 2019 at 6:20 Comment(0)
T
0

ECLIPSE FONT CHANGE - Change below to 2 css files.

eclipse/plugins/org.eclipse.ui.themes_x.x.x.vxxxxx/css/e4_basesetyle.css eclipse/plugins/org.eclipse.ui.themes_x.x.x.vxxxxx/css/dark/e4-dark_globalstyle.css

#org-eclipse-jdt-ui-PackageExplorer Tree,
#org-eclipse-ui-navigator-ProjectExplorer Tree {
    font-size: 10px; /* <-- Desired font size */
    font: Consolas;  /* <-- Font you want to have */
}

and change preference -> General > Appearance > Colors and Fonts > Basic > Text Font : Consolas 12px

Towel answered 3/5, 2020 at 4:49 Comment(1)
Could you mention on what Eclipse version, you have done this tweak, so it will be easier for the arrivers.Tonsil
D
0

To increase font size of eclipse project explorer window for eclipse 2020-06.

First check the theme, you are using in the eclipse from preferences.Increase the value of below property for that theme. For example, if you are using light theme.

In file: /Applications/Eclipse.app/Contents/Eclipse/plugins/org.eclipse.ui.themes_1.2.1000.v20200528-1125/css/light/e4-light_partstyle.css,

Add property if missing or if it is already present, just increase value of font size.

.MPart Tree {
    font-size: 13;
}
Dygall answered 29/6, 2020 at 16:24 Comment(0)
M
0

Eclipse Project/Package explorer, Outline window are using OS default font for labels.
For Win 7+ go to Control Panel\Appearance and Personalization\Personalization click 'Window Color' to start 'Window Color and Appearance' dialog. Increase 'Message Box' font.
As a bonus you'll have other programs pop-ups more user friendly most likely you are using large display if you bother with eclipse project explorer font.

enter image description here

Eclipse restart required

Mellman answered 28/1, 2021 at 15:54 Comment(0)
I
0
  1. The changes to the ".css" files don't work, if you have disabled "theming", during your efforts to alter the font size ("Settings.General.Appearance.Enalbe theming (requires restart)" (I mean, I found during my efforts :)

  2. To cover all bases and "themes_versions", rather than hit and miss the right css file, change all ".css" files (find eclipse/plugins -name '*.css') and add "* { font-size:7; }" at the end of every file. Specify your size, and font-family as well if you like.

Works on: Version: 2019-09 R (4.13.0) / Build id: 20190917-1200

Integrity answered 5/5, 2021 at 1:46 Comment(0)
F
0

I'm using eclipse 2019-06 (4.12.0) version and I didn't find this path (eclipse\plugins\org.eclipse.ui.themes_X.X.X.vXXXXXXXX-XXXX\css), instead I went to the path shown in the below pic with selected folders named org.eclipse.ui.themes_1.2.600.v20190513-0458 and org.eclipse.ui.themes_1.2.1400.v20210315-1604 enter image description here

Under themes_1.2.600.v20190513-0458 folder, go into css folder

themes_1.2.600.v20190513-0458

Now you can change the selected css files selected here in the below pic. enter image description here

Add the property highlighted in the below pic for both the css files, save the files, restart eclipse and viola we are done with the font change.

Note: You can either change to small font or big font depending on your choice by changing the font size number.

.MPart Tree {
    font-size: 14;
}

enter image description here

Before Change:

enter image description here

After Change:

enter image description here

Floorboard answered 22/2, 2022 at 8:1 Comment(0)
R
0

In Eclipse (2023-12 R) the font-sizes of the Project Explorer tree view can be adjusted in the following preferences values:

Window Menu -> Preferences -> General > Appearance > Color and Fonts > View and Editor Folders > Tree and Table font for views

enter image description here

Reece answered 15/2 at 12:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.