From 293021e700b704dba0e3bab560aca41db9f43854 Mon Sep 17 00:00:00 2001 From: Dariusz Luksza Date: Tue, 30 Oct 2012 17:06:06 +0100 Subject: [PATCH] Update plugin-gwt-archetype to match current implementation Update GWT plugin archetype to auto register its instance in Gerrit Change-Id: I7b1930871b21f5ae4850ee07f14cd430f9866036 Signed-off-by: Dariusz Luksza --- .../src/main/resources/archetype-resources/pom.xml | 2 -- .../src/main/java/{Module.java => MyExtension.java} | 11 +++++------ 2 files changed, 5 insertions(+), 8 deletions(-) rename gerrit-plugin-gwt-archetype/src/main/resources/archetype-resources/src/main/java/{Module.java => MyExtension.java} (72%) diff --git a/gerrit-plugin-gwt-archetype/src/main/resources/archetype-resources/pom.xml b/gerrit-plugin-gwt-archetype/src/main/resources/archetype-resources/pom.xml index 3904e2b13a..6e1ba210f0 100644 --- a/gerrit-plugin-gwt-archetype/src/main/resources/archetype-resources/pom.xml +++ b/gerrit-plugin-gwt-archetype/src/main/resources/archetype-resources/pom.xml @@ -41,8 +41,6 @@ limitations under the License. - ${package}.Module - ${Implementation-Vendor} ${Implementation-Url} diff --git a/gerrit-plugin-gwt-archetype/src/main/resources/archetype-resources/src/main/java/Module.java b/gerrit-plugin-gwt-archetype/src/main/resources/archetype-resources/src/main/java/MyExtension.java similarity index 72% rename from gerrit-plugin-gwt-archetype/src/main/resources/archetype-resources/src/main/java/Module.java rename to gerrit-plugin-gwt-archetype/src/main/resources/archetype-resources/src/main/java/MyExtension.java index d42545a76d..ebdbb2651a 100644 --- a/gerrit-plugin-gwt-archetype/src/main/resources/archetype-resources/src/main/java/Module.java +++ b/gerrit-plugin-gwt-archetype/src/main/resources/archetype-resources/src/main/java/MyExtension.java @@ -14,13 +14,12 @@ package ${package}; -import com.google.inject.AbstractModule; -import com.google.gerrit.extensions.webui.WebUiPlugin; import com.google.gerrit.extensions.webui.GwtPlugin; +import com.google.gerrit.extensions.annotations.Listen; -class Module extends AbstractModule { - @Override - protected void configure() { - bind(WebUiPlugin.class).toInstance(new GwtPlugin("hello_gwt_plugins")); +@Listen +public class MyExtension extends GwtPlugin { + public MyExtension() { + super("hello_gwt_plugins"); } }