InlineEdit: Respect change edits in download commands drop down

Change-Id: I0f4d101b3249722cd03851f814476129f79bb022
This commit is contained in:
David Ostrovsky
2014-08-12 22:36:27 +02:00
parent 59e558f737
commit 5562fe5ee6
8 changed files with 123 additions and 28 deletions

View File

@@ -239,6 +239,8 @@ public class ChangeEdits implements
}
}
// TODO(davido): Turn the boolean options to ChangeEditOption enum,
// like it's already the case for ListChangesOption/ListGroupsOption
static class Detail implements RestReadView<ChangeResource> {
private final ChangeEditUtil editUtil;
private final ChangeEditJson editJson;
@@ -251,6 +253,9 @@ public class ChangeEdits implements
@Option(name = "--list", metaVar = "LIST")
boolean list;
@Option(name = "--download-commands", metaVar = "download-commands")
boolean downloadCommands;
@Inject
Detail(ChangeEditUtil editUtil,
ChangeEditJson editJson,
@@ -271,7 +276,7 @@ public class ChangeEdits implements
return Response.none();
}
EditInfo editInfo = editJson.toEditInfo(edit.get());
EditInfo editInfo = editJson.toEditInfo(edit.get(), downloadCommands);
if (list) {
PatchSet basePatchSet = null;
if (base != null) {