Time for action – adding themes
Eclipse 4 ships with a theme manager which can be used to swap between themes (in essence, separate CSS files). The theme manager is available for inclusion in Eclipse 4-based applications by adding the org.eclipse.e4.ui.css.swt
plug-in as a dependency to the application, and by adding one or more org.eclipse.e4.ui.css.swt.theme
extension points.
- Add the
org.eclipse.e4.ui.css.swt.theme
plug-in to the Dependencies tab of theplugin.xml
file of thecom.packtpub.e4.application
project. - Go to the plugin.xml tab of the
plugin.xml
file (or edit the file as text) and add the following content to add blue and green themes:<extension point="org.eclipse.e4.ui.css.swt.theme"> <theme label="Blue Theme" id="com.packtpub.e4.ui.css.theme.blue" ...
Get Eclipse Plug-in Development Beginner's Guide - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.