737285df3f
Plugin has to include a class that implements com.google.gerrit.pgm.init.InitStep and specifying the class name into the Plugin MANIFEST.MF. Plugin InitStep is getting instantiated using the Gerrit PGM injector and then is able to access the same init objects. Example: -------- public class InitJira implements InitStep { private ConsoleUI ui; @Inject public InitJira(final ConsoleUI ui, final Section.Factory sections) { this.ui = ui; this.sections = sections; } @Override public void run() throws Exception { ui.header("Jira integration"); // Jira-specific init steps. Section jira = sections.get("link", "jira"); // Jira-specific link expansions } } MANIFEST.MF: ------------ Gerrit-InitStep: com.googlesource.plugins.jira.InitJira Change-Id: I84fcb9acd6845c706961657219a14570e2060b0f Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com> |
||
---|---|---|
.. | ||
.gitignore | ||
pom.xml |