TopMenu extension: specify which Module is needed
In the TopMenu developers' documentation it is needed to indicate in which Plugin Module the extension needs to be registered (if plugin is not auto-discoverable). A common mistake is to reuse the Gerrit-HttpModule and thus wondering why the menubar is not populated. Change-Id: I949f5d178cb934c830082cd580f306107ecadd9a
This commit is contained in:
@@ -854,10 +854,13 @@ public class MyTopMenuExtension implements TopMenu {
|
|||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
Otherwise the top menu extension must be bound in a plugin module:
|
Otherwise the top menu extension must be bound in the plugin module used
|
||||||
|
for the Gerrit system injector (Gerrit-Module entry in MANIFEST.MF):
|
||||||
|
|
||||||
[source,java]
|
[source,java]
|
||||||
----
|
----
|
||||||
|
package com.googlesource.gerrit.plugins.helloworld;
|
||||||
|
|
||||||
public class HelloWorldModule extends AbstractModule {
|
public class HelloWorldModule extends AbstractModule {
|
||||||
@Override
|
@Override
|
||||||
protected void configure() {
|
protected void configure() {
|
||||||
@@ -866,6 +869,12 @@ public class HelloWorldModule extends AbstractModule {
|
|||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
|
[source,manifest]
|
||||||
|
----
|
||||||
|
Gerrit-ApiType: plugin
|
||||||
|
Gerrit-Module: com.googlesource.gerrit.plugins.helloworld.HelloWorldModule
|
||||||
|
----
|
||||||
|
|
||||||
[[http]]
|
[[http]]
|
||||||
HTTP Servlets
|
HTTP Servlets
|
||||||
-------------
|
-------------
|
||||||
|
Reference in New Issue
Block a user