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:
parent
aaf2c4f87a
commit
9abe435ba3
@ -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>
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user