Merge "Fixed formatting and lots of too long lines in ChangeApi"

This commit is contained in:
David Pursehouse 2016-09-22 13:47:40 +00:00 committed by Gerrit Code Review
commit 4475f68df0

View File

@ -39,11 +39,12 @@ public class ChangeApi {
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 class ChangeApi {
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 @@ public class ChangeApi {
}
/** 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 @@ public class ChangeApi {
}
/** 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 @@ public class ChangeApi {
}
/** 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 class ChangeApi {
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 baseChange(
String b) /*-{ if(b)this.base_change=b; }-*/;
protected CreateChangeInput() {
}
@ -286,7 +294,9 @@ public class ChangeApi {
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() {