Merge branch 'stable-2.16'
* stable-2.16: Document the UrlFormatter interface Allow plugin to bind a different implementation of UrlFormatter Honor --slave and --headless options better Correct javadoc @link to avoid warning in bazel build //... Encode project name in download commands Change-Id: Ifa40307e90c98e3329ac73773c2660653e4c13df
This commit is contained in:
commit
e149ca7f44
@ -2102,6 +2102,16 @@ By implementing the
|
|||||||
`com.google.gerrit.server.git.ChangeReportFormatter` interface, a plugin
|
`com.google.gerrit.server.git.ChangeReportFormatter` interface, a plugin
|
||||||
may change the formatting of the report.
|
may change the formatting of the report.
|
||||||
|
|
||||||
|
[[url-formatting]]
|
||||||
|
== URL Formatting
|
||||||
|
|
||||||
|
URLs to various parts of Gerrit are usually formed by adding suffixes to
|
||||||
|
the canonical web URL.
|
||||||
|
|
||||||
|
By implementing the
|
||||||
|
`com.google.gerrit.server.config.UrlFormatter` interface, a plugin may
|
||||||
|
change the format of the URL.
|
||||||
|
|
||||||
[[links-to-external-tools]]
|
[[links-to-external-tools]]
|
||||||
== Links To External Tools
|
== Links To External Tools
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
package com.google.gerrit.server.config;
|
package com.google.gerrit.server.config;
|
||||||
|
|
||||||
|
import com.google.gerrit.extensions.registration.DynamicItem;
|
||||||
import com.google.inject.AbstractModule;
|
import com.google.inject.AbstractModule;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.google.inject.Provider;
|
import com.google.inject.Provider;
|
||||||
@ -27,7 +28,8 @@ public class DefaultUrlFormatter implements UrlFormatter {
|
|||||||
public static class Module extends AbstractModule {
|
public static class Module extends AbstractModule {
|
||||||
@Override
|
@Override
|
||||||
protected void configure() {
|
protected void configure() {
|
||||||
bind(UrlFormatter.class).to(DefaultUrlFormatter.class);
|
DynamicItem.itemOf(binder(), UrlFormatter.class);
|
||||||
|
DynamicItem.bind(binder(), UrlFormatter.class).to(DefaultUrlFormatter.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user