Switching Themes in E3 mode [message #1015976] |
Mon, 04 March 2013 08:04  |
Eclipse User |
|
|
|
Hi,
We are currently developing a e4 RCP that can dynamically switch themes. But it might happen that we have to use 3.x views. So I edited the project in a way that allows starting it as an e3 or an e4 RCP (by renaming the plugin.xml). I used this tutorial as a base: http://dirksmetric.wordpress.com/2012/08/01/tutorial-eclipse-rcp-e4-with-3-x-views-like-project-explorer-properties-etc/.
Running it as an e3 RCP works out quite well, but switching css files doesn't work anymore. The handler code looks like this:
@Execute
public void execute(
IThemeEngine engine,
@Named("styleParam") String param) {
if (param.equals(TEST) && !engine.getActiveTheme().getId().equals(TEST)) {
engine.setTheme(TEST, true);
} else if (param.equals(DEFAULT)
&& !engine.getActiveTheme().getId().equals(DEFAULT)) {
engine.setTheme(DEFAULT, true);
}
}
This code works under e4, but the handler isn't invoked in e3, since it seems to have problems with the IThemeEngine.
Is it possible to change themes dynamically, if I start the RCP as an e3 RCP?
Best regards
Bastian
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05046 seconds