Change the font size of the JDT views of Eclipse on OS X

On OS X, the default font size of the Java Package Explorer of Eclipse is too small. To change it, open the file e4_default_mac.css located in the ${ECLIPSE_HOME}/plugins/org.eclipse.platform_*/css directory. Note that the exact path depends on the version of Eclipse you have.

At the bottom of the file, add the following:

#org-eclipse-jdt-ui-PackageExplorer Tree {
   font-size: 16;
}

This means that any Tree widget who’s parent has the CSS ID of #org-eclipse-jdt-ui-PackageExplorer will be affected. See this blog for more information on CSS styling in Eclipse.

To do the same for the Outline View, add the following:

#org-eclipse-ui-views-ContentOutline Tree {
   font-size: 16;
}

Now save the file, restart Eclipse and that’s it.

For a more pleasant editing experience, install the Chrome Theme plugin from the Marketplace, open Preferences | General | Appearance | Chrome Theme, select the CSS tab and pase the above text to the Custom CSS editor. To find the CSS IDs of other UI elements in Eclipse, install the CSS Spy plugin from the Marketplace and go treasure hunting. Good Luck!

Change the font size of the JDT views of Eclipse on OS X