Allow plugins to display errors in the Gerrit ErrorDialog

Add a method to the JavaScript API to open the Gerrit ErrorDialog with
a given message. Plugins don't want to reimplement the ErrorDialog.

Change-Id: Iec18fb873bfbe9f47684414aacbaf697076d315f
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2014-01-31 16:16:52 +01:00
parent 6ac5b4eef5
commit 792c8d80f5
5 changed files with 16 additions and 0 deletions

View File

@@ -50,6 +50,10 @@ public final class Plugin extends JavaScriptObject {
public final native void refresh()
/*-{ return this.refresh() }-*/;
/** Show message in Gerrit's ErrorDialog. */
public final native void showError(String message)
/*-{ return this.showError(message) }-*/;
/**
* Register a screen displayed at {@code /#/x/plugin/token}.
*