package com.speedment.tool.core.internal.toolbar;

import com.speedment.common.injector.annotation.ExecuteBefore;
import com.speedment.common.injector.annotation.InjectKey;
import com.speedment.common.injector.annotation.WithState;
import com.speedment.tool.core.component.UserInterfaceComponent;
import com.speedment.tool.core.resource.FontAwesome;
import com.speedment.tool.core.toolbar.ToolbarComponent;

import static com.speedment.common.injector.State.INITIALIZED;

/**
 * @author Emil Forslund
 * @since  3.1.5
 */
@InjectKey(DefaultToolbarItems.class)
public final class DefaultToolbarItems {

    @ExecuteBefore(INITIALIZED)
    void install(
            @WithState(INITIALIZED) ToolbarComponent toolbar,
            @WithState(INITIALIZED) UserInterfaceComponent ui) {

        toolbar.install("reload", new SimpleToolbarItemImpl(
            "Reload", FontAwesome.REFRESH, ev -> ui.reload(),
            "Reload the metadata from the database and merge any changes " +
            "with the existing configuration."
        ));

        toolbar.install("generate", new SimpleToolbarItemImpl(
            "Generate", FontAwesome.PLAY_CIRCLE, ev -> ui.generate(),
            "Generate code using the current configuration. Automatically " +
                "save the configuration before generation."
        ));

        toolbar.install("progress", new GenerationProgressToolbarItem());
        toolbar.install("brand", new BrandToolbarItem());
    }
}

@@ -1346,41 +1346,25 @@
 ll(%22
-progress%22, new GenerationProgress
+brand%22, new Brand
 Tool
@@ -1400,33 +1400,49 @@
 nstall(%22
-brand%22, new Brand
+progress%22, new GenerationProgress
 ToolbarI

Change the order of the progress bar and the brand icon