Update plugin-js-archetype to match current implementation

Use auto registering mechanism using @Listen annotation instead of
binding in main Module.

Change-Id: I3ece0066fb52cfae4e5913782b1cf43e71f1dc07
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
This commit is contained in:
Dariusz Luksza 2012-10-30 16:48:14 +01:00
parent aaf2c4f87a
commit 9abe435ba3
2 changed files with 5 additions and 8 deletions

View File

@ -42,8 +42,6 @@ limitations under the License.
</includes>
<archive>
<manifestEntries>
<Gerrit-Module>${package}.Module</Gerrit-Module>
<Implementation-Vendor>${Implementation-Vendor}</Implementation-Vendor>
<Implementation-URL>${Implementation-Url}</Implementation-URL>

View File

@ -14,13 +14,12 @@
package ${package};
import com.google.inject.AbstractModule;
import com.google.gerrit.extensions.webui.WebUiPlugin;
import com.google.gerrit.extensions.annotations.Listen;
import com.google.gerrit.extensions.webui.JavaScriptPlugin;
class Module extends AbstractModule {
@Override
protected void configure() {
bind(WebUiPlugin.class).toInstance(new JavaScriptPlugin("hello-js-plugins.js"));
@Listen
public class MyJsExtension extends JavaScriptPlugin {
public MyJsExtension() {
super("hello-js-plugins.js");
}
}