I have created an RCP based on my 3.x plug-in.
I have applied CSS styling (based on http://www.slideshare.net/toedter_k/css-styling-for-eclipse-rcp-3x-and-4x) which works correctly when I launch my RCP application from with the Eclipse IDE.
When I export the RCP application and then run it, no CSS styling is applied; all other aspects of the application do however work correctly.
Details of the build and configuration as follows:
1) OS - Windows 7 64bit Professional
2) Eclipse - Juno Service Release 1 Build id: 20121004-1855
3) RCP plugin.xml->build.properties
output.. = bin/
bin.includes = plugin.xml,\
source.. = src/
4) RCP Extension Point fragments:
<product ... >
label="Windows 7 Custom Theme"
public void initialize( IWorkbenchConfigurer configurer )
super.initialize( configurer );
Bundle b = FrameworkUtil.getBundle( getClass() );
BundleContext context = b.getBundleContext();
ServiceReference serviceRef = context.getServiceReference( IThemeManager.class.getName());
IThemeManager themeManager = (IThemeManager) context.getService( serviceRef );
final IThemeEngine engine = themeManager.getEngineForDisplay( Display.getCurrent() );
engine.setTheme( "com.workflowscience.designer.themeDef", true );
I have checked the RCP application log file under workspace/.metadata post execution and there are no reported errors.
I included the following log statement in the ApplicationWorkbenchAdvisor class to query the theme directly after setting:
StaticLogger.get().info( "Theme: " + engine.getActiveTheme().getId() );
which logs: "Theme: com.workflowscience.designer.themeDef6.1"
I included the following log statements in the ApplicationWorkbenchAdvisor class to ensure that the css urls could be resolved:
Enumeration e = (Enumeration) b.findEntries( "", "*.css", true );
URL url = null;
URL cssUrl = null;
if ( e != null )
while ( e.hasMoreElements() )
url = (URL) e.nextElement();
cssUrl = FileLocator.resolve( url );
catch ( IOException e1 )
// TODO Auto-generated catch block
StaticLogger.get().info( "CSS URL: " + url.toString() );
StaticLogger.get().info( "CSS FILE: " + cssUrl != null ? cssUrl.toString() : "null" );
which shows that all css urls can be resolved to the RCP plugin.
I have found the following forum entries that highlight similar issues and provide suggested resolutions: http://dev.eclipse.org/mhonarc/lists/e4-dev/msg06652.html and http://www.eclipse.org/forums/index.php/m/1034649/?srch=3.x+rcp+theme+css#msg_1034649. I have checked my configuration which seems to be consistent with that suggested.
I am now at a complete loss as to how to further debug and would appreciate any insight as to the likely cause of the problem or any further avenues to explore.