Fixed formatting and lots of too long lines in ChangeApi Change-Id: Ieec1e519cfaa5fe5026c64ad5c03da874538d10e
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeApi.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeApi.java index 632ddd8..70d43e4 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeApi.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeApi.java
@@ -39,11 +39,12 @@ call(id, "abandon").post(input, cb); } - /** Create a new change. + /** + * Create a new change. * - * The new change is created as DRAFT unless the draft workflow is disabled - * by `change.allowDrafts = false` in the configuration, in which case the - * new change is created as NEW. + * The new change is created as DRAFT unless the draft workflow is disabled by + * `change.allowDrafts = false` in the configuration, in which case the new + * change is created as NEW. * */ public static void createChange(String project, String branch, String topic, @@ -178,12 +179,14 @@ public static RestApi hashtags(int changeId) { return change(changeId).view("hashtags"); } + public static RestApi hashtag(int changeId, String hashtag) { return change(changeId).view("hashtags").id(hashtag); } /** Submit a specific revision of a change. */ - public static void cherrypick(int id, String commit, String destination, String message, AsyncCallback<ChangeInfo> cb) { + public static void cherrypick(int id, String commit, String destination, + String message, AsyncCallback<ChangeInfo> cb) { CherryPickInput cherryPickInput = CherryPickInput.create(); cherryPickInput.setMessage(message); cherryPickInput.setDestination(destination); @@ -199,13 +202,15 @@ } /** Submit a specific revision of a change. */ - public static void submit(int id, String commit, AsyncCallback<SubmitInfo> cb) { + public static void submit(int id, String commit, + AsyncCallback<SubmitInfo> cb) { JavaScriptObject in = JavaScriptObject.createObject(); call(id, commit, "submit").post(in, cb); } /** Publish a specific revision of a draft change. */ - public static void publish(int id, String commit, AsyncCallback<JavaScriptObject> cb) { + public static void publish(int id, String commit, + AsyncCallback<JavaScriptObject> cb) { JavaScriptObject in = JavaScriptObject.createObject(); call(id, commit, "publish").post(in, cb); } @@ -216,7 +221,8 @@ } /** Delete a specific draft patch set. */ - public static void deleteRevision(int id, String commit, AsyncCallback<JavaScriptObject> cb) { + public static void deleteRevision(int id, String commit, + AsyncCallback<JavaScriptObject> cb) { revision(id, commit).delete(cb); } @@ -238,7 +244,8 @@ } /** Rebase a revision onto the branch tip or another change. */ - public static void rebase(int id, String commit, String base, AsyncCallback<ChangeInfo> cb) { + public static void rebase(int id, String commit, String base, + AsyncCallback<ChangeInfo> cb) { RebaseInput rebaseInput = RebaseInput.create(); rebaseInput.setBase(base); call(id, commit, "rebase").post(rebaseInput, cb); @@ -275,8 +282,9 @@ public final native void topic(String t) /*-{ if(t)this.topic=t; }-*/; public final native void project(String p) /*-{ if(p)this.project=p; }-*/; public final native void subject(String s) /*-{ if(s)this.subject=s; }-*/; - public final native void baseChange(String b) /*-{ if(b)this.base_change=b; }-*/; - public final native void status(String s) /*-{ if(s)this.status=s; }-*/; + public final native void status(String s) /*-{ if(s)this.status=s; }-*/; + public final native void baseChange( + String b) /*-{ if(b)this.base_change=b; }-*/; protected CreateChangeInput() { } @@ -286,7 +294,9 @@ static CherryPickInput create() { return (CherryPickInput) createObject(); } + final native void setDestination(String d) /*-{ this.destination = d; }-*/; + final native void setMessage(String m) /*-{ this.message = m; }-*/; protected CherryPickInput() {