Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

CSS Theming for Eclipse RCP 3.x

DZone's Guide to

CSS Theming for Eclipse RCP 3.x

· Java Zone ·
Free Resource

How do you break a Monolith into Microservices at Scale? This ebook shows strategies and techniques for building scalable and resilient microservices.

Eclipse 4.0 brought a great new feature: Theming RCP applications with CSS. Another good news is, this cool feature can also be used with RCP 3.x based applications. The following screen shot shows the RCP Mail Demo, styled with CSS:

How to run the Demo with CSS styling?

  1. Checkout :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse/e4/releng
  2. Import Project Set /releng/org.eclipse.e4.ui.releng/e4.ui.css.psf
  3. Checkout e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.widgets (see bug 322641)
  4. Cleanup org.eclipse.e4.ui.css.swt (see bug 322644)
    => Organize Imports
    => Delete dependencies to org.eclipse.e4.core.*
  5. Start the CSS RCP Mail demo (project org.eclipse.e4.ui.examples.css.rcp)

The demo also provides dynamic theme switching. Here is is little excerpt from the defaul.css styling:

CTabItem, Label, Tree, Text {
font-family: "Arial";
}

Shell {
font-size: 12;
}

CTabItem, ToolBar, Button, CBanner, CoolBar {
font-size: 9;
background-color: white;
}

CTabFolder, CTabItem {
background-color: #F0F1F7;
}

If you would like to play around with the css, just edit the files css/default.css and css/colorful.css in the project org.eclipse.e4.ui.examples.css.rcp. I have submitted a short talk at Eclipse Summit Europe to explain a few more details.

Have Fun!

From http://www.toedter.com/blog/?p=295

How do you break a Monolith into Microservices at Scale? This ebook shows strategies and techniques for building scalable and resilient microservices.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}