Enhance plugin extension panels to allow ordering per a config
Enhance plugin extension panels to allow ordering to be specified in AllProjects projects config so that ordering can be defined rather than determined by the order in which plugins are loaded. The interface change is backwards compatible at runtime because the extension panel implementation will correctly handle the null value for the panel name. Change-Id: I51f3ac5a18b504daa5bf55d92cc33621d2247082
This commit is contained in:
@@ -121,12 +121,16 @@ public final class Plugin extends JavaScriptObject {
|
||||
*
|
||||
* @param extensionPoint the UI extension point for which the panel should be registered.
|
||||
* @param entry callback function invoked to create the panel widgets.
|
||||
* @param name the name of the panel which can be used to specify panel
|
||||
* ordering via project config
|
||||
*/
|
||||
public void panel(GerritUiExtensionPoint extensionPoint, Panel.EntryPoint entry) {
|
||||
panel(extensionPoint.name(), wrap(entry));
|
||||
public final void panel(GerritUiExtensionPoint extensionPoint,
|
||||
Panel.EntryPoint entry, String name) {
|
||||
panel(extensionPoint.name(), wrap(entry), name);
|
||||
}
|
||||
|
||||
private native void panel(String i, JavaScriptObject e) /*-{ this.panel(i, e) }-*/;
|
||||
private native void panel(String i, JavaScriptObject e, String n)
|
||||
/*-{ this.panel(i, e, n) }-*/;
|
||||
|
||||
protected Plugin() {}
|
||||
|
||||
|
Reference in New Issue
Block a user