diff --git a/cobigen-eclipse/cobigen-eclipse-feature/pom.xml b/cobigen-eclipse/cobigen-eclipse-feature/pom.xml index 01e23da9bd..8e02f39315 100644 --- a/cobigen-eclipse/cobigen-eclipse-feature/pom.xml +++ b/cobigen-eclipse/cobigen-eclipse-feature/pom.xml @@ -11,4 +11,10 @@ eclipse-parent ${revision} + + + false + true + + diff --git a/cobigen-eclipse/cobigen-eclipse-test/pom.xml b/cobigen-eclipse/cobigen-eclipse-test/pom.xml index 7b1ac73625..2f18ede16e 100644 --- a/cobigen-eclipse/cobigen-eclipse-test/pom.xml +++ b/cobigen-eclipse/cobigen-eclipse-test/pom.xml @@ -24,6 +24,10 @@ com.devonfw.cobigen core-api + + com.devonfw.cobigen + gui + ch.qos.logback logback-classic diff --git a/cobigen-eclipse/cobigen-eclipse/plugin.xml b/cobigen-eclipse/cobigen-eclipse/plugin.xml index 647a2dbdb7..c5deb9d123 100644 --- a/cobigen-eclipse/cobigen-eclipse/plugin.xml +++ b/cobigen-eclipse/cobigen-eclipse/plugin.xml @@ -19,6 +19,10 @@ id="com.devonfw.cobigen.eclipseplugin.adapt_template" name="Adapt Template"> + + @@ -38,6 +42,10 @@ class="com.devonfw.cobigen.eclipse.workbenchcontrol.handler.AdaptTemplatesHandler" commandId="com.devonfw.cobigen.eclipseplugin.adapt_template"> + + @@ -70,6 +78,11 @@ label="Adapt Templates..." style="push"> + + + + + + diff --git a/cobigen-eclipse/cobigen-eclipse/pom.xml b/cobigen-eclipse/cobigen-eclipse/pom.xml index 97648bc5b6..732aa69a4d 100644 --- a/cobigen-eclipse/cobigen-eclipse/pom.xml +++ b/cobigen-eclipse/cobigen-eclipse/pom.xml @@ -13,6 +13,8 @@ false + false + true @@ -24,6 +26,10 @@ com.devonfw.cobigen core-externalprocess-api + + com.devonfw.cobigen + gui + com.devonfw.cobigen javaplugin-model diff --git a/cobigen-eclipse/cobigen-eclipse/src/com/devonfw/cobigen/eclipse/workbenchcontrol/handler/ManageTemplateSetsHandler.java b/cobigen-eclipse/cobigen-eclipse/src/com/devonfw/cobigen/eclipse/workbenchcontrol/handler/ManageTemplateSetsHandler.java index 63fb04f1d1..2abc107d65 100644 --- a/cobigen-eclipse/cobigen-eclipse/src/com/devonfw/cobigen/eclipse/workbenchcontrol/handler/ManageTemplateSetsHandler.java +++ b/cobigen-eclipse/cobigen-eclipse/src/com/devonfw/cobigen/eclipse/workbenchcontrol/handler/ManageTemplateSetsHandler.java @@ -1,9 +1,53 @@ package com.devonfw.cobigen.eclipse.workbenchcontrol.handler; +import java.util.concurrent.TimeUnit; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.IPath; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.devonfw.cobigen.eclipse.common.tools.ResourcesPluginUtil; +import com.devonfw.cobigen.gui.AppLauncher; + /** * TODO nneuhaus This type ... * */ -public class ManageTemplateSetsHandler { +public class ManageTemplateSetsHandler extends AbstractHandler { + + /** + * Assigning logger to ManageTemplateSetsHandler + */ + private static final Logger LOG = LoggerFactory.getLogger(ManageTemplateSetsHandler.class); + + public AppLauncher launcher; + + /** + * Location of workspace root + */ + IPath ws = ResourcesPluginUtil.getWorkspaceLocation(); + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + + System.out.println("You just called the GUI"); + this.launcher = new AppLauncher(); + try { + wait(1337); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + while (this.launcher.app.window.isShowing()) { + TimeUnit.SECONDS.sleep(1); + } + + return null; + + } }