[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Problem with css theme switching

Hi,

Thanks for your answers.

Yes, there are the right values in my execute method and it works as I want when I start it in eclipse. Only when I export the product and start the exported executable it doesn't work ..

Freundliche Grüsse
Christian Strotz

Am 04.07.2012 um 16:47 schrieb "Paul Webster" <pwebster@xxxxxxxxxxxxxxxxxxx>:

Your theme defintitions look reasonable.  If they're in your plugin.jar as css/default.css, etc then that should be fine.

If you add a breakpoint in your execute(*) method, is the correct engine and themeId being supplied?

On Wed, Jul 4, 2012 at 10:24 AM, Christian Strotz <Christian.Strotz@xxxxxxxxxxxxx> wrote:

Hello together

 4.  The handler to switch between the themes:

 

public final class SwitchThemeHandler {

             @Execute

             public void execute(IThemeEngine engine, @Named(XmiIDs.COMMANDPARAMETERS_THEME_ID) String themeId) {

                    engine.setTheme(themeId, true);

             }

 

             @CanExecute

             public boolean canExecute(IThemeEngine engine, @Named(XmiIDs.COMMANDPARAMETERS_THEME_ID) String themeId) {

                    String activeThemeId = engine.getActiveTheme().getId();

                    return !activeThemeId.equals(themeId);

             }

}

 

It works great if I start the product in eclipse. When I export the product I can properly run it without errors but there is no style active and I can’t switch between it. When I go into the exported plugin jar I can see my css files.

 



Later,
PW

--
Paul Webster
Hi floor.  Make me a sammich! - GIR
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/e4-dev