Merge "Fix code snippet formatting for Plugins own InitStep"
This commit is contained in:
@@ -217,26 +217,26 @@ Plugins InitStep cannot refer to Gerrit DB Schema or any other Gerrit runtime
|
|||||||
objects injected at startup.
|
objects injected at startup.
|
||||||
|
|
||||||
====
|
====
|
||||||
public class MyInitStep implements InitStep {
|
public class MyInitStep implements InitStep {
|
||||||
private final ConsoleUI ui;
|
private final ConsoleUI ui;
|
||||||
private final Section.Factory sections;
|
private final Section.Factory sections;
|
||||||
private final String pluginName;
|
private final String pluginName;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public GitBlitInitStep(final ConsoleUI ui, Section.Factory sections, @PluginName String pluginName) {
|
public GitBlitInitStep(final ConsoleUI ui, Section.Factory sections, @PluginName String pluginName) {
|
||||||
this.ui = ui;
|
this.ui = ui;
|
||||||
this.sections = sections;
|
this.sections = sections;
|
||||||
this.pluginName = pluginName;
|
this.pluginName = pluginName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() throws Exception {
|
||||||
|
ui.header("\nMy plugin");
|
||||||
|
|
||||||
|
Section mySection = getSection("myplugin", null);
|
||||||
|
mySection.string("Link name", "linkname", "MyLink");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run() throws Exception {
|
|
||||||
ui.header("\nMy plugin");
|
|
||||||
|
|
||||||
Section mySection = getSection("myplugin", null);
|
|
||||||
mySection.string("Link name", "linkname", "MyLink");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
====
|
====
|
||||||
|
|
||||||
[[classpath]]
|
[[classpath]]
|
||||||
|
|||||||
Reference in New Issue
Block a user