Search in sources :

Example 6 with NativeString

use of com.google.gerrit.client.rpc.NativeString in project gerrit by GerritCodeReview.

the class ActionContext method wrap.

private static GerritCallback<JavaScriptObject> wrap(final JavaScriptObject cb) {
    return new GerritCallback<JavaScriptObject>() {

        @Override
        public void onSuccess(JavaScriptObject result) {
            if (NativeString.is(result)) {
                NativeString s = result.cast();
                ApiGlue.invoke(cb, s.asString());
            } else {
                ApiGlue.invoke(cb, result);
            }
        }
    };
}
Also used : GerritCallback(com.google.gerrit.client.rpc.GerritCallback) NativeString(com.google.gerrit.client.rpc.NativeString) JavaScriptObject(com.google.gwt.core.client.JavaScriptObject)

Aggregations

NativeString (com.google.gerrit.client.rpc.NativeString)6 GerritCallback (com.google.gerrit.client.rpc.GerritCallback)3 CallbackGroup (com.google.gerrit.client.rpc.CallbackGroup)2 ErrorDialog (com.google.gerrit.client.ErrorDialog)1 GerritUiExtensionPoint (com.google.gerrit.client.GerritUiExtensionPoint)1 ExtensionPanel (com.google.gerrit.client.api.ExtensionPanel)1 AccountInfo (com.google.gerrit.client.info.AccountInfo)1 RestApi (com.google.gerrit.client.rpc.RestApi)1 JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)1 JsArray (com.google.gwt.core.client.JsArray)1