Consistently use camelCase in Gerrit Client
In the Gerrit Client classes that represent the JSON entities retrieved from the server we have a mix of camelCase and underscore_case method names. Make it consistent by always using camelCase. Change-Id: I5ba3a0e52bbfc6d1b9d224461b8a45952ab93b3a Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
committed by
Edwin Kempin
parent
baa72847a4
commit
0ec1e17477
@@ -72,7 +72,7 @@ public class AvatarImage extends Image implements LoadHandler {
|
||||
} else if (isGerritServer(account)) {
|
||||
setVisible(true);
|
||||
setResource(Gerrit.RESOURCES.gerritAvatar26());
|
||||
} else if (account.has_avatar_info()) {
|
||||
} else if (account.hasAvatarInfo()) {
|
||||
setVisible(false);
|
||||
AvatarInfo info = account.avatar(size);
|
||||
if (info != null) {
|
||||
@@ -121,7 +121,7 @@ public class AvatarImage extends Image implements LoadHandler {
|
||||
}
|
||||
|
||||
private static boolean isGerritServer(AccountInfo account) {
|
||||
return account._account_id() == 0
|
||||
return account._accountId() == 0
|
||||
&& Util.C.messageNoAuthor().equals(account.name());
|
||||
}
|
||||
|
||||
|
||||
@@ -144,8 +144,8 @@ public class FormatUtil {
|
||||
StringBuilder b = new StringBuilder().append(name);
|
||||
if (info.email() != null) {
|
||||
b.append(" <").append(info.email()).append(">");
|
||||
} else if (info._account_id() > 0) {
|
||||
b.append(" (").append(info._account_id()).append(")");
|
||||
} else if (info._accountId() > 0) {
|
||||
b.append(" (").append(info._accountId()).append(")");
|
||||
}
|
||||
return b.toString();
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import com.google.gwt.core.client.JavaScriptObject;
|
||||
import com.google.gwt.core.client.JsArray;
|
||||
|
||||
public class AccountInfo extends JavaScriptObject {
|
||||
public final native int _account_id() /*-{ return this._account_id || 0; }-*/;
|
||||
public final native int _accountId() /*-{ return this._account_id || 0; }-*/;
|
||||
public final native String name() /*-{ return this.name; }-*/;
|
||||
public final native String email() /*-{ return this.email; }-*/;
|
||||
public final native String username() /*-{ return this.username; }-*/;
|
||||
@@ -29,7 +29,7 @@ public class AccountInfo extends JavaScriptObject {
|
||||
* available, such as when no plugin is installed. This method returns
|
||||
* false if the server did not check on avatars for the account.
|
||||
*/
|
||||
public final native boolean has_avatar_info()
|
||||
public final native boolean hasAvatarInfo()
|
||||
/*-{ return this.hasOwnProperty('avatars') }-*/;
|
||||
|
||||
public final AvatarInfo avatar(int sz) {
|
||||
|
||||
@@ -248,7 +248,7 @@ public class AccountGroupMembersScreen extends AccountGroupScreen {
|
||||
for (int row = 1; row < table.getRowCount(); row++) {
|
||||
final AccountInfo i = getRowItem(row);
|
||||
if (i != null && ((CheckBox) table.getWidget(row, 1)).getValue()) {
|
||||
ids.add(i._account_id());
|
||||
ids.add(i._accountId());
|
||||
}
|
||||
}
|
||||
if (!ids.isEmpty()) {
|
||||
@@ -258,7 +258,7 @@ public class AccountGroupMembersScreen extends AccountGroupScreen {
|
||||
public void onSuccess(final VoidResult result) {
|
||||
for (int row = 1; row < table.getRowCount();) {
|
||||
final AccountInfo i = getRowItem(row);
|
||||
if (i != null && ids.contains(i._account_id())) {
|
||||
if (i != null && ids.contains(i._accountId())) {
|
||||
table.removeRow(row);
|
||||
} else {
|
||||
row++;
|
||||
@@ -296,7 +296,7 @@ public class AccountGroupMembersScreen extends AccountGroupScreen {
|
||||
return cmp;
|
||||
}
|
||||
|
||||
return a._account_id() - b._account_id();
|
||||
return a._accountId() - b._accountId();
|
||||
}
|
||||
|
||||
public String nullToEmpty(String str) {
|
||||
|
||||
@@ -44,7 +44,7 @@ class CreateChangeAction {
|
||||
public void onSuccess(ChangeInfo result) {
|
||||
sent = true;
|
||||
hide();
|
||||
Gerrit.display(PageLinks.toChange(result.legacy_id()));
|
||||
Gerrit.display(PageLinks.toChange(result.legacyId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -32,7 +32,7 @@ public class EditConfigAction {
|
||||
@Override
|
||||
public void onSuccess(ChangeInfo result) {
|
||||
Gerrit.display(Dispatcher.toEditScreen(
|
||||
new PatchSet.Id(result.legacy_id(), 1), "project.config"));
|
||||
new PatchSet.Id(result.legacyId(), 1), "project.config"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -485,8 +485,8 @@ public class ProjectBranchesScreen extends ProjectScreen {
|
||||
actionsPanel.add(new Anchor(c.getLinkName(), false,
|
||||
c.toBranch(new Branch.NameKey(getProjectKey(), k.ref()))));
|
||||
}
|
||||
if (k.web_links() != null) {
|
||||
for (WebLinkInfo webLink : Natives.asList(k.web_links())) {
|
||||
if (k.webLinks() != null) {
|
||||
for (WebLinkInfo webLink : Natives.asList(k.webLinks())) {
|
||||
actionsPanel.add(webLink.toAnchor());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ public class ProjectInfoScreen extends ProjectScreen {
|
||||
if (box.getValue(i).startsWith(InheritableBoolean.INHERIT.name())) {
|
||||
inheritedIndex = i;
|
||||
}
|
||||
if (box.getValue(i).startsWith(inheritedBoolean.configured_value().name())) {
|
||||
if (box.getValue(i).startsWith(inheritedBoolean.configuredValue().name())) {
|
||||
box.setSelectedIndex(i);
|
||||
}
|
||||
}
|
||||
@@ -322,7 +322,7 @@ public class ProjectInfoScreen extends ProjectScreen {
|
||||
box.removeItem(inheritedIndex);
|
||||
} else {
|
||||
box.setItemText(inheritedIndex, InheritableBoolean.INHERIT.name() + " ("
|
||||
+ inheritedBoolean.inherited_value() + ")");
|
||||
+ inheritedBoolean.inheritedValue() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -341,20 +341,20 @@ public class ProjectInfoScreen extends ProjectScreen {
|
||||
|
||||
void display(ConfigInfo result) {
|
||||
descTxt.setText(result.description());
|
||||
setBool(contributorAgreements, result.use_contributor_agreements());
|
||||
setBool(signedOffBy, result.use_signed_off_by());
|
||||
setBool(contentMerge, result.use_content_merge());
|
||||
setBool(newChangeForAllNotInTarget, result.create_new_change_for_all_not_in_target());
|
||||
setBool(requireChangeID, result.require_change_id());
|
||||
setSubmitType(result.submit_type());
|
||||
setBool(contributorAgreements, result.useContributorAgreements());
|
||||
setBool(signedOffBy, result.useSignedOffBy());
|
||||
setBool(contentMerge, result.useContentMerge());
|
||||
setBool(newChangeForAllNotInTarget, result.createNewChangeForAllNotInTarget());
|
||||
setBool(requireChangeID, result.requireChangeId());
|
||||
setSubmitType(result.submitType());
|
||||
setState(result.state());
|
||||
maxObjectSizeLimit.setText(result.max_object_size_limit().configured_value());
|
||||
if (result.max_object_size_limit().inherited_value() != null) {
|
||||
maxObjectSizeLimit.setText(result.maxObjectSizeLimit().configuredValue());
|
||||
if (result.maxObjectSizeLimit().inheritedValue() != null) {
|
||||
effectiveMaxObjectSizeLimit.setVisible(true);
|
||||
effectiveMaxObjectSizeLimit.setText(
|
||||
Util.M.effectiveMaxObjectSizeLimit(result.max_object_size_limit().value()));
|
||||
Util.M.effectiveMaxObjectSizeLimit(result.maxObjectSizeLimit().value()));
|
||||
effectiveMaxObjectSizeLimit.setTitle(
|
||||
Util.M.globalMaxObjectSizeLimit(result.max_object_size_limit().inherited_value()));
|
||||
Util.M.globalMaxObjectSizeLimit(result.maxObjectSizeLimit().inheritedValue()));
|
||||
} else {
|
||||
effectiveMaxObjectSizeLimit.setVisible(false);
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ public class ProjectListScreen extends Screen {
|
||||
|
||||
private void addWebLinks(int row, ProjectInfo k) {
|
||||
GitwebLink gitWebLink = Gerrit.getGitwebLink();
|
||||
List<WebLinkInfo> webLinks = Natives.asList(k.web_links());
|
||||
List<WebLinkInfo> webLinks = Natives.asList(k.webLinks());
|
||||
if (gitWebLink != null || (webLinks != null && !webLinks.isEmpty())) {
|
||||
FlowPanel p = new FlowPanel();
|
||||
table.setWidget(row, ProjectsTable.C_REPO_BROWSER, p);
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ChangeGlue {
|
||||
ChangeInfo change,
|
||||
ActionInfo action,
|
||||
ActionButton button) {
|
||||
RestApi api = ChangeApi.change(change.legacy_id().get()).view(action.id());
|
||||
RestApi api = ChangeApi.change(change.legacyId().get()).view(action.id());
|
||||
JavaScriptObject f = get(action.id());
|
||||
if (f != null) {
|
||||
ActionContext c = ActionContext.create(api);
|
||||
|
||||
@@ -29,7 +29,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
|
||||
class DefaultActions {
|
||||
static void invoke(ChangeInfo change, ActionInfo action, RestApi api) {
|
||||
invoke(action, api, callback(PageLinks.toChange(change.legacy_id())));
|
||||
invoke(action, api, callback(PageLinks.toChange(change.legacyId())));
|
||||
}
|
||||
|
||||
static void invoke(Project.NameKey project, ActionInfo action, RestApi api) {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class EditGlue {
|
||||
ActionInfo action,
|
||||
ActionButton button) {
|
||||
RestApi api = ChangeApi.edit(
|
||||
change.legacy_id().get())
|
||||
change.legacyId().get())
|
||||
.view(action.id());
|
||||
|
||||
JavaScriptObject f = get(action.id());
|
||||
|
||||
@@ -29,7 +29,7 @@ public class RevisionGlue {
|
||||
ActionInfo action,
|
||||
ActionButton button) {
|
||||
RestApi api = ChangeApi.revision(
|
||||
change.legacy_id().get(),
|
||||
change.legacyId().get(),
|
||||
revision.name())
|
||||
.view(action.id());
|
||||
|
||||
|
||||
@@ -78,17 +78,17 @@ class Actions extends Composite {
|
||||
boolean hasUser = Gerrit.isSignedIn();
|
||||
RevisionInfo revInfo = info.revision(revision);
|
||||
CommitInfo commit = revInfo.commit();
|
||||
changeId = info.legacy_id();
|
||||
changeId = info.legacyId();
|
||||
project = info.project();
|
||||
subject = commit.subject();
|
||||
message = commit.message();
|
||||
branch = info.branch();
|
||||
key = info.change_id();
|
||||
key = info.changeId();
|
||||
changeInfo = info;
|
||||
|
||||
initChangeActions(info, hasUser);
|
||||
|
||||
NativeMap<ActionInfo> actionMap = revInfo.has_actions()
|
||||
NativeMap<ActionInfo> actionMap = revInfo.hasActions()
|
||||
? revInfo.actions()
|
||||
: NativeMap.<ActionInfo> create();
|
||||
actionMap.copyKeysIntoChildren("id");
|
||||
@@ -96,7 +96,7 @@ class Actions extends Composite {
|
||||
}
|
||||
|
||||
private void initChangeActions(ChangeInfo info, boolean hasUser) {
|
||||
NativeMap<ActionInfo> actions = info.has_actions()
|
||||
NativeMap<ActionInfo> actions = info.hasActions()
|
||||
? info.actions()
|
||||
: NativeMap.<ActionInfo> create();
|
||||
actions.copyKeysIntoChildren("id");
|
||||
|
||||
@@ -296,7 +296,7 @@ public class ChangeScreen extends Screen {
|
||||
}
|
||||
|
||||
private void initReplyButton(ChangeInfo info, String revision) {
|
||||
if (!info.revision(revision).is_edit()) {
|
||||
if (!info.revision(revision).isEdit()) {
|
||||
reply.setTitle(Gerrit.getConfig().getReplyTitle());
|
||||
reply.setHTML(new SafeHtmlBuilder()
|
||||
.openDiv()
|
||||
@@ -310,7 +310,7 @@ public class ChangeScreen extends Screen {
|
||||
}
|
||||
|
||||
private void gotoSibling(final int offset) {
|
||||
if (offset > 0 && changeInfo.current_revision().equals(revision)) {
|
||||
if (offset > 0 && changeInfo.currentRevision().equals(revision)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ public class ChangeScreen extends Screen {
|
||||
if (revision.equals(revisions.get(i).name())) {
|
||||
if (0 <= i + offset && i + offset < revisions.length()) {
|
||||
Gerrit.display(PageLinks.toChange(
|
||||
new PatchSet.Id(changeInfo.legacy_id(),
|
||||
new PatchSet.Id(changeInfo.legacyId(),
|
||||
revisions.get(i + offset)._number())));
|
||||
return;
|
||||
}
|
||||
@@ -336,7 +336,7 @@ public class ChangeScreen extends Screen {
|
||||
private void initIncludedInAction(ChangeInfo info) {
|
||||
if (info.status() == Status.MERGED) {
|
||||
includedInAction = new IncludedInAction(
|
||||
info.legacy_id(),
|
||||
info.legacyId(),
|
||||
style, headerLine, includedIn);
|
||||
includedIn.setVisible(true);
|
||||
}
|
||||
@@ -344,7 +344,7 @@ public class ChangeScreen extends Screen {
|
||||
|
||||
private void initChangeAction(ChangeInfo info) {
|
||||
if (info.status() == Status.DRAFT) {
|
||||
NativeMap<ActionInfo> actions = info.has_actions()
|
||||
NativeMap<ActionInfo> actions = info.hasActions()
|
||||
? info.actions()
|
||||
: NativeMap.<ActionInfo> create();
|
||||
actions.copyKeysIntoChildren("id");
|
||||
@@ -358,9 +358,9 @@ public class ChangeScreen extends Screen {
|
||||
private void initRevisionsAction(ChangeInfo info, String revision,
|
||||
NativeMap<ActionInfo> actions) {
|
||||
int currentPatchSet;
|
||||
if (info.current_revision() != null
|
||||
&& info.revisions().containsKey(info.current_revision())) {
|
||||
currentPatchSet = info.revision(info.current_revision())._number();
|
||||
if (info.currentRevision() != null
|
||||
&& info.revisions().containsKey(info.currentRevision())) {
|
||||
currentPatchSet = info.revision(info.currentRevision())._number();
|
||||
} else {
|
||||
JsArray<RevisionInfo> revList = info.revisions().values();
|
||||
RevisionInfo.sortRevisionInfoByNumber(revList);
|
||||
@@ -379,7 +379,7 @@ public class ChangeScreen extends Screen {
|
||||
patchSetsText.setInnerText(Resources.M.patchSets(
|
||||
currentlyViewedPatchSet, currentPatchSet));
|
||||
patchSetsAction = new PatchSetsAction(
|
||||
info.legacy_id(), revision,
|
||||
info.legacyId(), revision,
|
||||
style, headerLine, patchSets);
|
||||
|
||||
RevisionInfo revInfo = info.revision(revision);
|
||||
@@ -402,20 +402,20 @@ public class ChangeScreen extends Screen {
|
||||
|
||||
private void initProjectLinks(final ChangeInfo info) {
|
||||
projectSettingsLink.setHref(
|
||||
"#" + PageLinks.toProject(info.project_name_key()));
|
||||
"#" + PageLinks.toProject(info.projectNameKey()));
|
||||
projectSettings.addDomHandler(new ClickHandler() {
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
if (Hyperlink.impl.handleAsClick((Event) event.getNativeEvent())) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
Gerrit.display(PageLinks.toProject(info.project_name_key()));
|
||||
Gerrit.display(PageLinks.toProject(info.projectNameKey()));
|
||||
}
|
||||
}
|
||||
}, ClickEvent.getType());
|
||||
projectDashboard.setText(info.project());
|
||||
projectDashboard.setTargetHistoryToken(
|
||||
PageLinks.toProjectDefaultDashboard(info.project_name_key()));
|
||||
PageLinks.toProjectDefaultDashboard(info.projectNameKey()));
|
||||
}
|
||||
|
||||
private void initBranchLink(ChangeInfo info) {
|
||||
@@ -423,7 +423,7 @@ public class ChangeScreen extends Screen {
|
||||
branchLink.setTargetHistoryToken(
|
||||
PageLinks.toChangeQuery(
|
||||
BranchLink.query(
|
||||
info.project_name_key(),
|
||||
info.projectNameKey(),
|
||||
info.status(),
|
||||
info.branch(),
|
||||
null)));
|
||||
@@ -453,7 +453,7 @@ public class ChangeScreen extends Screen {
|
||||
reviewMode.setVisible(false);
|
||||
}
|
||||
|
||||
if (rev.is_edit()) {
|
||||
if (rev.isEdit()) {
|
||||
if (info.hasEditBasedOnCurrentPatchSet()) {
|
||||
publishEdit.setVisible(true);
|
||||
} else {
|
||||
@@ -465,11 +465,11 @@ public class ChangeScreen extends Screen {
|
||||
}
|
||||
|
||||
private boolean isEditModeEnabled(ChangeInfo info, RevisionInfo rev) {
|
||||
if (rev.is_edit()) {
|
||||
if (rev.isEdit()) {
|
||||
return true;
|
||||
}
|
||||
if (edit == null) {
|
||||
return revision.equals(info.current_revision());
|
||||
return revision.equals(info.currentRevision());
|
||||
}
|
||||
return rev._number() == RevisionInfo.findEditParent(
|
||||
info.revisions().values());
|
||||
@@ -781,9 +781,9 @@ public class ChangeScreen extends Screen {
|
||||
private void loadConfigInfo(final ChangeInfo info, final String base) {
|
||||
info.revisions().copyKeysIntoChildren("name");
|
||||
if (edit != null) {
|
||||
edit.set_name(edit.commit().commit());
|
||||
info.set_edit(edit);
|
||||
if (edit.has_files()) {
|
||||
edit.setName(edit.commit().commit());
|
||||
info.setEdit(edit);
|
||||
if (edit.hasFiles()) {
|
||||
edit.files().copyKeysIntoChildren("path");
|
||||
}
|
||||
info.revisions().put(edit.name(), RevisionInfo.fromEdit(edit));
|
||||
@@ -801,14 +801,14 @@ public class ChangeScreen extends Screen {
|
||||
if (revision == null) {
|
||||
RevisionInfo.sortRevisionInfoByNumber(list);
|
||||
RevisionInfo rev = list.get(list.length() - 1);
|
||||
if (rev.is_edit()) {
|
||||
info.set_current_revision(rev.name());
|
||||
if (rev.isEdit()) {
|
||||
info.setCurrentRevision(rev.name());
|
||||
}
|
||||
} else if (revision.equals("edit") || revision.equals("0")) {
|
||||
for (int i = 0; i < list.length(); i++) {
|
||||
RevisionInfo r = list.get(i);
|
||||
if (r.is_edit()) {
|
||||
info.set_current_revision(r.name());
|
||||
if (r.isEdit()) {
|
||||
info.setCurrentRevision(r.name());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -819,7 +819,7 @@ public class ChangeScreen extends Screen {
|
||||
|
||||
CallbackGroup group = new CallbackGroup();
|
||||
Timestamp lastReply = myLastReply(info);
|
||||
if (rev.is_edit()) {
|
||||
if (rev.isEdit()) {
|
||||
loadFileList(b, rev, lastReply, group, null, null);
|
||||
} else {
|
||||
loadDiff(b, rev, lastReply, group);
|
||||
@@ -833,7 +833,7 @@ public class ChangeScreen extends Screen {
|
||||
|
||||
RevisionInfoCache.add(changeId, rev);
|
||||
ConfigInfoCache.add(info);
|
||||
ConfigInfoCache.get(info.project_name_key(),
|
||||
ConfigInfoCache.get(info.projectNameKey(),
|
||||
group.addFinal(new ScreenLoadCallback<ConfigInfoCache.Entry>(this) {
|
||||
@Override
|
||||
protected void preDisplay(Entry result) {
|
||||
@@ -848,10 +848,10 @@ public class ChangeScreen extends Screen {
|
||||
|
||||
static Timestamp myLastReply(ChangeInfo info) {
|
||||
if (Gerrit.isSignedIn() && info.messages() != null) {
|
||||
int self = Gerrit.getUserAccountInfo()._account_id();
|
||||
int self = Gerrit.getUserAccountInfo()._accountId();
|
||||
for (int i = info.messages().length() - 1; i >= 0; i--) {
|
||||
MessageInfo m = info.messages().get(i);
|
||||
if (m.author() != null && m.author()._account_id() == self) {
|
||||
if (m.author() != null && m.author()._accountId() == self) {
|
||||
return m.date();
|
||||
}
|
||||
}
|
||||
@@ -938,7 +938,7 @@ public class ChangeScreen extends Screen {
|
||||
JsArray<CommentInfo> thisRevision = JsArray.createArray().cast();
|
||||
for (int i = 0; i < allRevisions.length(); i++) {
|
||||
CommentInfo c = allRevisions.get(i);
|
||||
if (c.patch_set() == id) {
|
||||
if (c.patchSet() == id) {
|
||||
thisRevision.push(c);
|
||||
}
|
||||
}
|
||||
@@ -971,7 +971,7 @@ public class ChangeScreen extends Screen {
|
||||
}
|
||||
|
||||
private void loadCommit(final RevisionInfo rev, CallbackGroup group) {
|
||||
if (rev.is_edit()) {
|
||||
if (rev.isEdit()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -979,7 +979,7 @@ public class ChangeScreen extends Screen {
|
||||
group.add(new AsyncCallback<CommitInfo>() {
|
||||
@Override
|
||||
public void onSuccess(CommitInfo info) {
|
||||
rev.set_commit(info);
|
||||
rev.setCommit(info);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1019,7 +1019,7 @@ public class ChangeScreen extends Screen {
|
||||
|
||||
private RevisionInfo resolveRevisionToDisplay(ChangeInfo info) {
|
||||
RevisionInfo rev = resolveRevisionOrPatchSetId(info, revision,
|
||||
info.current_revision());
|
||||
info.currentRevision());
|
||||
if (rev != null) {
|
||||
revision = rev.name();
|
||||
return rev;
|
||||
@@ -1036,7 +1036,7 @@ public class ChangeScreen extends Screen {
|
||||
return rev;
|
||||
} else {
|
||||
new ErrorDialog(
|
||||
Resources.M.changeWithNoRevisions(info.legacy_id().get())).center();
|
||||
Resources.M.changeWithNoRevisions(info.legacyId().get())).center();
|
||||
throw new IllegalStateException("no revision, cannot proceed");
|
||||
}
|
||||
}
|
||||
@@ -1116,7 +1116,7 @@ public class ChangeScreen extends Screen {
|
||||
|
||||
star.setValue(info.starred());
|
||||
permalink.setHref(ChangeLink.permalink(changeId));
|
||||
permalink.setText(String.valueOf(info.legacy_id()));
|
||||
permalink.setText(String.valueOf(info.legacyId()));
|
||||
topic.set(info, revision);
|
||||
commit.set(commentLinkProcessor, info, revision);
|
||||
related.set(info, revision);
|
||||
@@ -1128,7 +1128,7 @@ public class ChangeScreen extends Screen {
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(Util.M.changeScreenTitleId(info.id_abbreviated()));
|
||||
sb.append(Util.M.changeScreenTitleId(info.idAbbreviated()));
|
||||
if (info.subject() != null) {
|
||||
sb.append(": ");
|
||||
sb.append(info.subject());
|
||||
@@ -1138,8 +1138,8 @@ public class ChangeScreen extends Screen {
|
||||
// Although this is related to the revision, we can process it early to
|
||||
// render it faster.
|
||||
if (!info.status().isOpen()
|
||||
|| !revision.equals(info.current_revision())
|
||||
|| info.revision(revision).is_edit()) {
|
||||
|| !revision.equals(info.currentRevision())
|
||||
|| info.revision(revision).isEdit()) {
|
||||
setVisible(strategy, false);
|
||||
}
|
||||
|
||||
@@ -1151,10 +1151,10 @@ public class ChangeScreen extends Screen {
|
||||
actions.reloadRevisionActions(emptyMap);
|
||||
|
||||
RevisionInfo revisionInfo = info.revision(revision);
|
||||
boolean current = revision.equals(info.current_revision())
|
||||
&& !revisionInfo.is_edit();
|
||||
boolean current = revision.equals(info.currentRevision())
|
||||
&& !revisionInfo.isEdit();
|
||||
|
||||
if (revisionInfo.is_edit()) {
|
||||
if (revisionInfo.isEdit()) {
|
||||
statusText.setInnerText(Util.C.changeEdit());
|
||||
} else if (!current) {
|
||||
statusText.setInnerText(Util.C.notCurrent());
|
||||
@@ -1203,7 +1203,7 @@ public class ChangeScreen extends Screen {
|
||||
? info.owner().name()
|
||||
: info.owner().email() != null
|
||||
? info.owner().email()
|
||||
: String.valueOf(info.owner()._account_id()), Change.Status.NEW));
|
||||
: String.valueOf(info.owner()._accountId()), Change.Status.NEW));
|
||||
}
|
||||
|
||||
private void renderSubmitType(String action) {
|
||||
|
||||
@@ -47,7 +47,7 @@ class CherryPickAction {
|
||||
|
||||
@Override
|
||||
public void onSend() {
|
||||
ChangeApi.cherrypick(info.legacy_id().get(), revision,
|
||||
ChangeApi.cherrypick(info.legacyId().get(), revision,
|
||||
getDestinationBranch(),
|
||||
getMessageText(),
|
||||
new GerritCallback<ChangeInfo>() {
|
||||
@@ -55,7 +55,7 @@ class CherryPickAction {
|
||||
public void onSuccess(ChangeInfo result) {
|
||||
sent = true;
|
||||
hide();
|
||||
Gerrit.display(PageLinks.toChange(result.legacy_id()));
|
||||
Gerrit.display(PageLinks.toChange(result.legacyId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -109,8 +109,8 @@ class CommitBox extends Composite {
|
||||
CommitInfo commit = revInfo.commit();
|
||||
|
||||
commitName.setText(revision);
|
||||
idText.setText("Change-Id: " + change.change_id());
|
||||
idText.setPreviewText(change.change_id());
|
||||
idText.setText("Change-Id: " + change.changeId());
|
||||
idText.setPreviewText(change.changeId());
|
||||
|
||||
formatLink(commit.author(), authorPanel, authorNameEmail, authorDate,
|
||||
change);
|
||||
@@ -141,7 +141,7 @@ class CommitBox extends Composite {
|
||||
gw.getLinkName());
|
||||
}
|
||||
|
||||
JsArray<WebLinkInfo> links = revInfo.commit().web_links();
|
||||
JsArray<WebLinkInfo> links = revInfo.commit().webLinks();
|
||||
if (links != null) {
|
||||
for (WebLinkInfo link : Natives.asList(links)) {
|
||||
webLinkPanel.add(link.toAnchor());
|
||||
@@ -191,7 +191,7 @@ class CommitBox extends Composite {
|
||||
a.setStyleName(style.parentWebLink());
|
||||
panel.add(a);
|
||||
}
|
||||
JsArray<WebLinkInfo> links = c.web_links();
|
||||
JsArray<WebLinkInfo> links = c.webLinks();
|
||||
if (links != null) {
|
||||
for (WebLinkInfo link : Natives.asList(links)) {
|
||||
panel.add(link.toAnchor());
|
||||
@@ -212,7 +212,7 @@ class CommitBox extends Composite {
|
||||
// only try to fetch the avatar image for author and committer if an avatar
|
||||
// plugin is installed, if the change owner has no avatar info assume that
|
||||
// no avatar plugin is installed
|
||||
if (change.owner().has_avatar_info()) {
|
||||
if (change.owner().hasAvatarInfo()) {
|
||||
AvatarImage avatar;
|
||||
if (change.owner().email().equals(person.email())) {
|
||||
avatar = new AvatarImage(change.owner());
|
||||
|
||||
@@ -30,7 +30,7 @@ class DownloadAction extends RightSidePopdownAction {
|
||||
Widget downloadButton) {
|
||||
super(style, relativeTo, downloadButton);
|
||||
this.downloadBox = new DownloadBox(info, revision,
|
||||
new PatchSet.Id(info.legacy_id(),
|
||||
new PatchSet.Id(info.legacyId(),
|
||||
info.revision(revision)._number()));
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ class DownloadBox extends VerticalPanel {
|
||||
protected void onLoad() {
|
||||
if (fetch == null) {
|
||||
if (psId.get() == 0) {
|
||||
ChangeApi.editWithCommands(change.legacy_id().get()).get(
|
||||
ChangeApi.editWithCommands(change.legacyId().get()).get(
|
||||
new AsyncCallback<EditInfo>() {
|
||||
@Override
|
||||
public void onSuccess(EditInfo result) {
|
||||
@@ -93,9 +93,9 @@ class DownloadBox extends VerticalPanel {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
RestApi call = ChangeApi.detail(change.legacy_id().get());
|
||||
RestApi call = ChangeApi.detail(change.legacyId().get());
|
||||
ChangeList.addOptions(call, EnumSet.of(
|
||||
revision.equals(change.current_revision())
|
||||
revision.equals(change.currentRevision())
|
||||
? ListChangesOption.CURRENT_REVISION
|
||||
: ListChangesOption.ALL_REVISIONS,
|
||||
ListChangesOption.DOWNLOAD_COMMANDS));
|
||||
@@ -268,7 +268,7 @@ class DownloadBox extends VerticalPanel {
|
||||
if (scheme != null && scheme != pref.getDownloadUrl()) {
|
||||
pref.setDownloadUrl(scheme);
|
||||
PreferenceInput in = PreferenceInput.create();
|
||||
in.download_scheme(scheme);
|
||||
in.downloadScheme(scheme);
|
||||
AccountApi.self().view("preferences")
|
||||
.put(in, new AsyncCallback<JavaScriptObject>() {
|
||||
@Override
|
||||
@@ -303,11 +303,11 @@ class DownloadBox extends VerticalPanel {
|
||||
return createObject().cast();
|
||||
}
|
||||
|
||||
final void download_scheme(DownloadScheme s) {
|
||||
download_scheme0(s.name());
|
||||
final void downloadScheme(DownloadScheme s) {
|
||||
downloadScheme0(s.name());
|
||||
}
|
||||
|
||||
private final native void download_scheme0(String n) /*-{
|
||||
private final native void downloadScheme0(String n) /*-{
|
||||
this.download_scheme = n;
|
||||
}-*/;
|
||||
|
||||
|
||||
@@ -516,8 +516,8 @@ public class FileTable extends FlowPanel {
|
||||
for (int i = 0; i < list.length(); i++) {
|
||||
FileInfo info = list.get(i);
|
||||
if (!Patch.COMMIT_MSG.equals(info.path()) && !info.binary()) {
|
||||
inserted += info.lines_inserted();
|
||||
deleted += info.lines_deleted();
|
||||
inserted += info.linesInserted();
|
||||
deleted += info.linesDeleted();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -657,10 +657,10 @@ public class FileTable extends FlowPanel {
|
||||
}
|
||||
|
||||
sb.closeAnchor();
|
||||
if (info.old_path() != null) {
|
||||
if (info.oldPath() != null) {
|
||||
sb.br();
|
||||
sb.openSpan().setStyleName(R.css().renameCopySource())
|
||||
.append(info.old_path())
|
||||
.append(info.oldPath())
|
||||
.closeSpan();
|
||||
}
|
||||
sb.closeTd();
|
||||
@@ -733,16 +733,16 @@ public class FileTable extends FlowPanel {
|
||||
sb.openTd().setStyleName(R.css().deltaColumn1());
|
||||
if (!Patch.COMMIT_MSG.equals(info.path()) && !info.binary()) {
|
||||
if (showChangeSizeBars) {
|
||||
sb.append(info.lines_inserted() + info.lines_deleted());
|
||||
sb.append(info.linesInserted() + info.linesDeleted());
|
||||
} else if (!ChangeType.DELETED.matches(info.status())) {
|
||||
if (ChangeType.ADDED.matches(info.status())) {
|
||||
sb.append(info.lines_inserted())
|
||||
sb.append(info.linesInserted())
|
||||
.append(" lines");
|
||||
} else {
|
||||
sb.append("+")
|
||||
.append(info.lines_inserted())
|
||||
.append(info.linesInserted())
|
||||
.append(", -")
|
||||
.append(info.lines_deleted());
|
||||
.append(info.linesDeleted());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -753,24 +753,24 @@ public class FileTable extends FlowPanel {
|
||||
sb.openTd().setStyleName(R.css().deltaColumn2());
|
||||
if (showChangeSizeBars
|
||||
&& !Patch.COMMIT_MSG.equals(info.path()) && !info.binary()
|
||||
&& (info.lines_inserted() != 0 || info.lines_deleted() != 0)) {
|
||||
&& (info.linesInserted() != 0 || info.linesDeleted() != 0)) {
|
||||
int w = 80;
|
||||
int t = inserted + deleted;
|
||||
int i = Math.max(5, (int) (((double) w) * info.lines_inserted() / t));
|
||||
int d = Math.max(5, (int) (((double) w) * info.lines_deleted() / t));
|
||||
int i = Math.max(5, (int) (((double) w) * info.linesInserted() / t));
|
||||
int d = Math.max(5, (int) (((double) w) * info.linesDeleted() / t));
|
||||
|
||||
sb.setAttribute(
|
||||
"title",
|
||||
Util.M.patchTableSize_LongModify(info.lines_inserted(),
|
||||
info.lines_deleted()));
|
||||
Util.M.patchTableSize_LongModify(info.linesInserted(),
|
||||
info.linesDeleted()));
|
||||
|
||||
if (0 < info.lines_inserted()) {
|
||||
if (0 < info.linesInserted()) {
|
||||
sb.openDiv()
|
||||
.setStyleName(R.css().inserted())
|
||||
.setAttribute("style", "width:" + i + "px")
|
||||
.closeDiv();
|
||||
}
|
||||
if (0 < info.lines_deleted()) {
|
||||
if (0 < info.linesDeleted()) {
|
||||
sb.openDiv()
|
||||
.setStyleName(R.css().deleted())
|
||||
.setAttribute("style", "width:" + d + "px")
|
||||
|
||||
@@ -39,7 +39,7 @@ class FollowUpAction extends ActionMessageBox {
|
||||
new GerritCallback<ChangeInfo>() {
|
||||
@Override
|
||||
public void onSuccess(ChangeInfo result) {
|
||||
Gerrit.display(PageLinks.toChange(result.legacy_id()));
|
||||
Gerrit.display(PageLinks.toChange(result.legacyId()));
|
||||
hide();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -123,8 +123,8 @@ public class Hashtags extends Composite {
|
||||
}
|
||||
|
||||
void set(ChangeInfo info) {
|
||||
canEdit = info.has_actions() && info.actions().containsKey("hashtags");
|
||||
this.changeId = info.legacy_id();
|
||||
canEdit = info.hasActions() && info.actions().containsKey("hashtags");
|
||||
this.changeId = info.legacyId();
|
||||
display(info);
|
||||
openForm.setVisible(canEdit);
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ class History extends FlowPanel {
|
||||
for (CommentInfo c : Natives.asList(map.get(path))) {
|
||||
c.path(path);
|
||||
if (c.author() != null) {
|
||||
int authorId = c.author()._account_id();
|
||||
int authorId = c.author()._accountId();
|
||||
List<CommentInfo> l = byAuthor.get(authorId);
|
||||
if (l == null) {
|
||||
l = new ArrayList<>();
|
||||
@@ -108,7 +108,7 @@ class History extends FlowPanel {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
int authorId = msg.author()._account_id();
|
||||
int authorId = msg.author()._accountId();
|
||||
List<CommentInfo> list = byAuthor.get(authorId);
|
||||
if (list == null) {
|
||||
return Collections.emptyList();
|
||||
|
||||
@@ -143,7 +143,7 @@ class Labels extends Grid {
|
||||
|
||||
String val = LabelValue.formatValue(v.shortValue());
|
||||
html.openSpan();
|
||||
html.setAttribute("title", label.value_text(val));
|
||||
html.setAttribute("title", label.valueText(val));
|
||||
if (v.intValue() == approved) {
|
||||
html.setStyleName(style.label_ok());
|
||||
} else if (v.intValue() == rejected) {
|
||||
@@ -172,12 +172,12 @@ class Labels extends Grid {
|
||||
|
||||
private static boolean isApproved(LabelInfo label, ApprovalInfo ai) {
|
||||
return label.approved() != null
|
||||
&& label.approved()._account_id() == ai._account_id();
|
||||
&& label.approved()._accountId() == ai._accountId();
|
||||
}
|
||||
|
||||
private static boolean isRejected(LabelInfo label, ApprovalInfo ai) {
|
||||
return label.rejected() != null
|
||||
&& label.rejected()._account_id() == ai._account_id();
|
||||
&& label.rejected()._accountId() == ai._accountId();
|
||||
}
|
||||
|
||||
private String getStyleForLabel(LabelInfo label) {
|
||||
@@ -234,12 +234,12 @@ class Labels extends Grid {
|
||||
} else if (ai.email() != null) {
|
||||
name = ai.email();
|
||||
} else {
|
||||
name = Integer.toString(ai._account_id());
|
||||
name = Integer.toString(ai._accountId());
|
||||
}
|
||||
|
||||
String votableCategories = "";
|
||||
if (votable != null) {
|
||||
Set<String> s = votable.get(ai._account_id()).votableLabels();
|
||||
Set<String> s = votable.get(ai._accountId()).votableLabels();
|
||||
if (!s.isEmpty()) {
|
||||
StringBuilder sb = new StringBuilder(Util.C.votable());
|
||||
sb.append(" ");
|
||||
@@ -254,7 +254,7 @@ class Labels extends Grid {
|
||||
}
|
||||
html.openSpan()
|
||||
.setAttribute("role", "listitem")
|
||||
.setAttribute(DATA_ID, ai._account_id())
|
||||
.setAttribute(DATA_ID, ai._accountId())
|
||||
.setAttribute("title", getTitle(ai, votableCategories))
|
||||
.setStyleName(style.label_user());
|
||||
if (img != null) {
|
||||
@@ -270,7 +270,7 @@ class Labels extends Grid {
|
||||
html.closeSelf();
|
||||
}
|
||||
html.append(name);
|
||||
if (removable.contains(ai._account_id())) {
|
||||
if (removable.contains(ai._accountId())) {
|
||||
html.openElement("button")
|
||||
.setAttribute("title", Util.M.removeReviewer(name))
|
||||
.setAttribute("onclick", REMOVE + "(event)")
|
||||
|
||||
@@ -46,9 +46,9 @@ class LineComment extends Composite {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
PatchSet.Id ps;
|
||||
if (info.patch_set() != defaultPs.get()) {
|
||||
ps = new PatchSet.Id(defaultPs.getParentKey(), info.patch_set());
|
||||
psNum.setInnerText(Integer.toString(info.patch_set()));
|
||||
if (info.patchSet() != defaultPs.get()) {
|
||||
ps = new PatchSet.Id(defaultPs.getParentKey(), info.patchSet());
|
||||
psNum.setInnerText(Integer.toString(info.patchSet()));
|
||||
} else {
|
||||
ps = defaultPs;
|
||||
psLoc.removeFromParent();
|
||||
@@ -56,7 +56,7 @@ class LineComment extends Composite {
|
||||
psNum= null;
|
||||
}
|
||||
|
||||
if (info.has_line()) {
|
||||
if (info.hasLine()) {
|
||||
fileLoc.removeFromParent();
|
||||
fileLoc = null;
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ class PatchSetsBox extends Composite {
|
||||
@Override
|
||||
public void onSuccess(ChangeInfo result) {
|
||||
if (edit != null) {
|
||||
edit.set_name(edit.commit().commit());
|
||||
edit.setName(edit.commit().commit());
|
||||
result.revisions().put(edit.name(), RevisionInfo.fromEdit(edit));
|
||||
}
|
||||
render(result.revisions());
|
||||
@@ -201,7 +201,7 @@ class PatchSetsBox extends Composite {
|
||||
if (r.draft()) {
|
||||
sb.append(Resources.C.draft()).append(' ');
|
||||
}
|
||||
if (r.has_draft_comments()) {
|
||||
if (r.hasDraftComments()) {
|
||||
sb.openSpan()
|
||||
.addStyleName(style.draft_comment())
|
||||
.setAttribute("title", Resources.C.draftCommentsTooltip())
|
||||
|
||||
@@ -42,12 +42,12 @@ class QuickApprove extends Button implements ClickHandler {
|
||||
}
|
||||
|
||||
void set(ChangeInfo info, String commit, ReplyAction action) {
|
||||
if (!info.has_permitted_labels() || !info.status().isOpen()) {
|
||||
if (!info.hasPermittedLabels() || !info.status().isOpen()) {
|
||||
// Quick approve needs at least one label on an open change.
|
||||
setVisible(false);
|
||||
return;
|
||||
}
|
||||
if (info.revision(commit).is_edit() || info.revision(commit).draft()) {
|
||||
if (info.revision(commit).isEdit() || info.revision(commit).draft()) {
|
||||
setVisible(false);
|
||||
return;
|
||||
}
|
||||
@@ -58,11 +58,11 @@ class QuickApprove extends Button implements ClickHandler {
|
||||
|
||||
int index = info.getMissingLabelIndex();
|
||||
if (index != -1) {
|
||||
LabelInfo label = Natives.asList(info.all_labels().values()).get(index);
|
||||
JsArrayString values = info.permitted_values(label.name());
|
||||
LabelInfo label = Natives.asList(info.allLabels().values()).get(index);
|
||||
JsArrayString values = info.permittedValues(label.name());
|
||||
String s = values.get(values.length() - 1);
|
||||
short v = LabelInfo.parseValue(s);
|
||||
if (v > 0 && s.equals(label.max_value())) {
|
||||
if (v > 0 && s.equals(label.maxValue())) {
|
||||
qName = label.name();
|
||||
qValueStr = s;
|
||||
qValue = v;
|
||||
@@ -70,7 +70,7 @@ class QuickApprove extends Button implements ClickHandler {
|
||||
}
|
||||
|
||||
if (qName != null) {
|
||||
changeId = info.legacy_id();
|
||||
changeId = info.legacyId();
|
||||
revision = commit;
|
||||
input = ReviewInput.create();
|
||||
input.drafts(DraftHandling.PUBLISH_ALL_REVISIONS);
|
||||
|
||||
@@ -180,7 +180,7 @@ public class RelatedChanges extends TabPanel {
|
||||
setForOpenChange(info, revision);
|
||||
}
|
||||
|
||||
ChangeApi.revision(info.legacy_id().get(), revision).view("related")
|
||||
ChangeApi.revision(info.legacyId().get(), revision).view("related")
|
||||
.get(new TabCallback<RelatedInfo>(Tab.RELATED_CHANGES, info.project(), revision) {
|
||||
@Override
|
||||
public JsArray<ChangeAndCommit> convert(RelatedInfo result) {
|
||||
@@ -190,8 +190,8 @@ public class RelatedChanges extends TabPanel {
|
||||
|
||||
StringBuilder cherryPicksQuery = new StringBuilder();
|
||||
cherryPicksQuery.append(op("project", info.project()));
|
||||
cherryPicksQuery.append(" ").append(op("change", info.change_id()));
|
||||
cherryPicksQuery.append(" ").append(op("-change", info.legacy_id().get()));
|
||||
cherryPicksQuery.append(" ").append(op("change", info.changeId()));
|
||||
cherryPicksQuery.append(" ").append(op("-change", info.legacyId().get()));
|
||||
cherryPicksQuery.append(" -is:abandoned");
|
||||
ChangeList.query(cherryPicksQuery.toString(),
|
||||
EnumSet.of(ListChangesOption.CURRENT_REVISION, ListChangesOption.CURRENT_COMMIT),
|
||||
@@ -215,7 +215,7 @@ public class RelatedChanges extends TabPanel {
|
||||
StringBuilder conflictsQuery = new StringBuilder();
|
||||
conflictsQuery.append("status:open");
|
||||
conflictsQuery.append(" is:mergeable");
|
||||
conflictsQuery.append(" ").append(op("conflicts", info.legacy_id().get()));
|
||||
conflictsQuery.append(" ").append(op("conflicts", info.legacyId().get()));
|
||||
ChangeList.query(conflictsQuery.toString(),
|
||||
EnumSet.of(ListChangesOption.CURRENT_REVISION, ListChangesOption.CURRENT_COMMIT),
|
||||
new TabChangeListCallback(Tab.CONFLICTING_CHANGES, info.project(), revision));
|
||||
@@ -323,16 +323,16 @@ public class RelatedChanges extends TabPanel {
|
||||
protected JsArray<ChangeAndCommit> convert(ChangeList l) {
|
||||
JsArray<ChangeAndCommit> arr = JavaScriptObject.createArray().cast();
|
||||
for (ChangeInfo i : Natives.asList(l)) {
|
||||
if (i.current_revision() != null && i.revisions().containsKey(i.current_revision())) {
|
||||
RevisionInfo currentRevision = i.revision(i.current_revision());
|
||||
if (i.currentRevision() != null && i.revisions().containsKey(i.currentRevision())) {
|
||||
RevisionInfo currentRevision = i.revision(i.currentRevision());
|
||||
ChangeAndCommit c = ChangeAndCommit.create();
|
||||
c.set_id(i.id());
|
||||
c.set_commit(currentRevision.commit());
|
||||
c.set_change_number(i.legacy_id().get());
|
||||
c.set_revision_number(currentRevision._number());
|
||||
c.set_branch(i.branch());
|
||||
c.set_project(i.project());
|
||||
c.set_submittable(i.submittable() && i.mergeable());
|
||||
c.setId(i.id());
|
||||
c.setCommit(currentRevision.commit());
|
||||
c.setChangeNumber(i.legacyId().get());
|
||||
c.setRevisionNumber(currentRevision._number());
|
||||
c.setBranch(i.branch());
|
||||
c.setProject(i.project());
|
||||
c.setSubmittable(i.submittable() && i.mergeable());
|
||||
arr.push(c);
|
||||
}
|
||||
}
|
||||
@@ -357,56 +357,56 @@ public class RelatedChanges extends TabPanel {
|
||||
final native String project() /*-{ return this.project }-*/;
|
||||
final native boolean submittable() /*-{ return this._submittable ? true : false; }-*/;
|
||||
|
||||
final native void set_id(String i)
|
||||
final native void setId(String i)
|
||||
/*-{ if(i)this.change_id=i; }-*/;
|
||||
|
||||
final native void set_commit(CommitInfo c)
|
||||
final native void setCommit(CommitInfo c)
|
||||
/*-{ if(c)this.commit=c; }-*/;
|
||||
|
||||
final native void set_branch(String b)
|
||||
final native void setBranch(String b)
|
||||
/*-{ if(b)this.branch=b; }-*/;
|
||||
|
||||
final native void set_project(String b)
|
||||
final native void setProject(String b)
|
||||
/*-{ if(b)this.project=b; }-*/;
|
||||
|
||||
public final Change.Id legacy_id() {
|
||||
return has_change_number() ? new Change.Id(_change_number()) : null;
|
||||
public final Change.Id legacyId() {
|
||||
return hasChangeNumber() ? new Change.Id(_changeNumber()) : null;
|
||||
}
|
||||
|
||||
public final PatchSet.Id patch_set_id() {
|
||||
return has_change_number() && has_revision_number()
|
||||
? new PatchSet.Id(legacy_id(), _revision_number())
|
||||
public final PatchSet.Id patchSetId() {
|
||||
return hasChangeNumber() && hasRevisionNumber()
|
||||
? new PatchSet.Id(legacyId(), _revisionNumber())
|
||||
: null;
|
||||
}
|
||||
|
||||
public final native boolean has_change_number()
|
||||
public final native boolean hasChangeNumber()
|
||||
/*-{ return this.hasOwnProperty('_change_number') }-*/;
|
||||
|
||||
final native boolean has_revision_number()
|
||||
final native boolean hasRevisionNumber()
|
||||
/*-{ return this.hasOwnProperty('_revision_number') }-*/;
|
||||
|
||||
final native boolean has_current_revision_number()
|
||||
final native boolean hasCurrentRevisionNumber()
|
||||
/*-{ return this.hasOwnProperty('_current_revision_number') }-*/;
|
||||
|
||||
final native int _change_number()
|
||||
final native int _changeNumber()
|
||||
/*-{ return this._change_number }-*/;
|
||||
|
||||
final native int _revision_number()
|
||||
final native int _revisionNumber()
|
||||
/*-{ return this._revision_number }-*/;
|
||||
|
||||
final native int _current_revision_number()
|
||||
final native int _currentRevisionNumber()
|
||||
/*-{ return this._current_revision_number }-*/;
|
||||
|
||||
final native void set_change_number(int n)
|
||||
final native void setChangeNumber(int n)
|
||||
/*-{ this._change_number=n; }-*/;
|
||||
|
||||
final native void set_revision_number(int n)
|
||||
final native void setRevisionNumber(int n)
|
||||
/*-{ this._revision_number=n; }-*/;
|
||||
|
||||
final native void set_current_revision_number(int n)
|
||||
final native void setCurrentRevisionNumber(int n)
|
||||
/*-{ this._current_revision_number=n; }-*/;
|
||||
|
||||
final native void set_submittable(boolean s)
|
||||
final native void setSubmittable(boolean s)
|
||||
/*-{ this._submittable=s; }-*/;
|
||||
|
||||
protected ChangeAndCommit() {
|
||||
|
||||
@@ -302,7 +302,7 @@ class RelatedChangesTab implements IsWidget {
|
||||
|
||||
sb.openSpan();
|
||||
GitwebLink gw = Gerrit.getGitwebLink();
|
||||
if (gw != null && (!info.has_change_number() || !info.has_revision_number())) {
|
||||
if (gw != null && (!info.hasChangeNumber() || !info.hasRevisionNumber())) {
|
||||
sb.setStyleName(RelatedChanges.R.css().gitweb());
|
||||
sb.setAttribute("title", gw.getLinkName());
|
||||
sb.append('\u25CF'); // Unicode 'BLACK CIRCLE'
|
||||
@@ -310,8 +310,8 @@ class RelatedChangesTab implements IsWidget {
|
||||
sb.setStyleName(RelatedChanges.R.css().indirect());
|
||||
sb.setAttribute("title", Resources.C.indirectAncestor());
|
||||
sb.append('~');
|
||||
} else if (info.has_current_revision_number() && info.has_revision_number()
|
||||
&& info._current_revision_number() != info._revision_number()) {
|
||||
} else if (info.hasCurrentRevisionNumber() && info.hasRevisionNumber()
|
||||
&& info._currentRevisionNumber() != info._revisionNumber()) {
|
||||
sb.setStyleName(RelatedChanges.R.css().notCurrent());
|
||||
sb.setAttribute("title", Util.C.notCurrent());
|
||||
sb.append('\u25CF'); // Unicode 'BLACK CIRCLE'
|
||||
@@ -328,8 +328,8 @@ class RelatedChangesTab implements IsWidget {
|
||||
}
|
||||
|
||||
private String url() {
|
||||
if (info.has_change_number() && info.has_revision_number()) {
|
||||
PatchSet.Id id = info.patch_set_id();
|
||||
if (info.hasChangeNumber() && info.hasRevisionNumber()) {
|
||||
PatchSet.Id id = info.patchSetId();
|
||||
return "#" + PageLinks.toChange(
|
||||
id.getParentKey(),
|
||||
id.getId());
|
||||
|
||||
@@ -54,7 +54,7 @@ class ReplyAction {
|
||||
Widget replyButton,
|
||||
Widget quickApproveButton) {
|
||||
this.psId = new PatchSet.Id(
|
||||
info.legacy_id(),
|
||||
info.legacyId(),
|
||||
info.revisions().get(revision)._number());
|
||||
this.revision = revision;
|
||||
this.hasDraftComments = hasDraftComments;
|
||||
@@ -63,10 +63,10 @@ class ReplyAction {
|
||||
this.replyButton = replyButton;
|
||||
this.quickApproveButton = quickApproveButton;
|
||||
|
||||
boolean current = revision.equals(info.current_revision());
|
||||
allLabels = info.all_labels();
|
||||
permittedLabels = current && info.has_permitted_labels()
|
||||
? info.permitted_labels()
|
||||
boolean current = revision.equals(info.currentRevision());
|
||||
allLabels = info.allLabels();
|
||||
permittedLabels = current && info.hasPermittedLabels()
|
||||
? info.permittedLabels()
|
||||
: NativeMap.<JsArrayString> create();
|
||||
}
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@ class ReplyBox extends Composite {
|
||||
List<LabelAndValues> checkboxes = new ArrayList<>(labels.size());
|
||||
int row = 1;
|
||||
for (LabelAndValues lv : labels) {
|
||||
if (isCheckBox(lv.info.value_set())) {
|
||||
if (isCheckBox(lv.info.valueSet())) {
|
||||
checkboxes.add(lv);
|
||||
} else {
|
||||
renderRadio(row++, columns, lv);
|
||||
@@ -328,7 +328,7 @@ class ReplyBox extends Composite {
|
||||
fmt.setStyleName(row, labelHelpColumn, style.label_help());
|
||||
|
||||
ApprovalInfo self = Gerrit.isSignedIn()
|
||||
? lv.info.for_user(Gerrit.getUserAccount().getId().get())
|
||||
? lv.info.forUser(Gerrit.getUserAccount().getId().get())
|
||||
: null;
|
||||
|
||||
final LabelRadioGroup group =
|
||||
@@ -336,7 +336,7 @@ class ReplyBox extends Composite {
|
||||
for (int i = 0; i < columns.size(); i++) {
|
||||
Short v = columns.get(i);
|
||||
if (lv.permitted.contains(v)) {
|
||||
String text = lv.info.value_text(LabelValue.formatValue(v));
|
||||
String text = lv.info.valueText(LabelValue.formatValue(v));
|
||||
LabelRadioButton b = new LabelRadioButton(group, text, v);
|
||||
if ((self != null && v == self.value()) || (self == null && v.equals(dv))) {
|
||||
b.setValue(true);
|
||||
@@ -352,7 +352,7 @@ class ReplyBox extends Composite {
|
||||
|
||||
private void renderCheckBox(int row, LabelAndValues lv) {
|
||||
ApprovalInfo self = Gerrit.isSignedIn()
|
||||
? lv.info.for_user(Gerrit.getUserAccount().getId().get())
|
||||
? lv.info.forUser(Gerrit.getUserAccount().getId().get())
|
||||
: null;
|
||||
|
||||
final String id = lv.info.name();
|
||||
@@ -373,7 +373,7 @@ class ReplyBox extends Composite {
|
||||
|
||||
CellFormatter fmt = labelsTable.getCellFormatter();
|
||||
fmt.setStyleName(row, labelHelpColumn, style.label_help());
|
||||
labelsTable.setText(row, labelHelpColumn, lv.info.value_text("+1"));
|
||||
labelsTable.setText(row, labelHelpColumn, lv.info.valueText("+1"));
|
||||
}
|
||||
|
||||
private static boolean isCheckBox(Set<Short> values) {
|
||||
|
||||
@@ -48,7 +48,7 @@ class RevertAction {
|
||||
public void onSuccess(ChangeInfo result) {
|
||||
sent = true;
|
||||
hide();
|
||||
Gerrit.display(PageLinks.toChange(result.legacy_id()));
|
||||
Gerrit.display(PageLinks.toChange(result.legacyId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -100,7 +100,7 @@ public class Reviewers extends Composite {
|
||||
}
|
||||
|
||||
void set(ChangeInfo info) {
|
||||
this.changeId = info.legacy_id();
|
||||
this.changeId = info.legacyId();
|
||||
display(info);
|
||||
reviewerSuggestOracle.setChange(changeId);
|
||||
openForm.setVisible(Gerrit.isSignedIn());
|
||||
@@ -125,7 +125,7 @@ public class Reviewers extends Composite {
|
||||
|
||||
@UiHandler("addMe")
|
||||
void onAddMe(@SuppressWarnings("unused") ClickEvent e) {
|
||||
String accountId = String.valueOf(Gerrit.getUserAccountInfo()._account_id());
|
||||
String accountId = String.valueOf(Gerrit.getUserAccountInfo()._accountId());
|
||||
addReviewer(accountId, false);
|
||||
}
|
||||
|
||||
@@ -198,22 +198,22 @@ public class Reviewers extends Composite {
|
||||
private void display(ChangeInfo info) {
|
||||
Map<Integer, AccountInfo> r = new HashMap<>();
|
||||
Map<Integer, AccountInfo> cc = new HashMap<>();
|
||||
for (LabelInfo label : Natives.asList(info.all_labels().values())) {
|
||||
for (LabelInfo label : Natives.asList(info.allLabels().values())) {
|
||||
if (label.all() != null) {
|
||||
for (ApprovalInfo ai : Natives.asList(label.all())) {
|
||||
(ai.value() != 0 ? r : cc).put(ai._account_id(), ai);
|
||||
(ai.value() != 0 ? r : cc).put(ai._accountId(), ai);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Integer i : r.keySet()) {
|
||||
cc.remove(i);
|
||||
}
|
||||
cc.remove(info.owner()._account_id());
|
||||
cc.remove(info.owner()._accountId());
|
||||
|
||||
Set<Integer> removable = new HashSet<>();
|
||||
if (info.removable_reviewers() != null) {
|
||||
for (AccountInfo a : Natives.asList(info.removable_reviewers())) {
|
||||
removable.add(a._account_id());
|
||||
if (info.removableReviewers() != null) {
|
||||
for (AccountInfo a : Natives.asList(info.removableReviewers())) {
|
||||
removable.add(a._accountId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,8 +227,8 @@ public class Reviewers extends Composite {
|
||||
reviewersText.setInnerSafeHtml(rHtml);
|
||||
ccText.setInnerSafeHtml(ccHtml);
|
||||
if (Gerrit.isSignedIn()) {
|
||||
int currentUser = Gerrit.getUserAccountInfo()._account_id();
|
||||
boolean showAddMeButton = info.owner()._account_id() != currentUser
|
||||
int currentUser = Gerrit.getUserAccountInfo()._accountId();
|
||||
boolean showAddMeButton = info.owner()._accountId() != currentUser
|
||||
&& !cc.containsKey(currentUser)
|
||||
&& !r.containsKey(currentUser);
|
||||
addMe.setVisible(showAddMeButton);
|
||||
@@ -241,13 +241,13 @@ public class Reviewers extends Composite {
|
||||
LabelInfo label = change.label(name);
|
||||
if (label.all() != null) {
|
||||
for (ApprovalInfo ai : Natives.asList(label.all())) {
|
||||
int id = ai._account_id();
|
||||
int id = ai._accountId();
|
||||
VotableInfo ad = d.get(id);
|
||||
if (ad == null) {
|
||||
ad = new VotableInfo();
|
||||
d.put(id, ad);
|
||||
}
|
||||
if (ai.has_value()) {
|
||||
if (ai.hasValue()) {
|
||||
ad.votable(name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.google.gerrit.reviewdb.client.Change;
|
||||
class SubmitAction {
|
||||
static void call(ChangeInfo changeInfo, RevisionInfo revisionInfo) {
|
||||
if (ChangeGlue.onSubmitChange(changeInfo, revisionInfo)) {
|
||||
final Change.Id changeId = changeInfo.legacy_id();
|
||||
final Change.Id changeId = changeInfo.legacyId();
|
||||
ChangeApi.submit(
|
||||
changeId.get(), revisionInfo.name(),
|
||||
new GerritCallback<SubmitInfo>() {
|
||||
|
||||
@@ -68,10 +68,10 @@ class Topic extends Composite {
|
||||
}
|
||||
|
||||
void set(ChangeInfo info, String revision) {
|
||||
canEdit = info.has_actions() && info.actions().containsKey("topic");
|
||||
canEdit = info.hasActions() && info.actions().containsKey("topic");
|
||||
|
||||
psId = new PatchSet.Id(
|
||||
info.legacy_id(),
|
||||
info.legacyId(),
|
||||
info.revisions().get(revision)._number());
|
||||
|
||||
initTopicLink(info);
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract class UpdateAvailableBar extends Composite {
|
||||
HashSet<Integer> seen = new HashSet<>();
|
||||
StringBuilder r = new StringBuilder();
|
||||
for (MessageInfo m : newMessages) {
|
||||
int a = m.author() != null ? m.author()._account_id() : 0;
|
||||
int a = m.author() != null ? m.author()._accountId() : 0;
|
||||
if (seen.add(a)) {
|
||||
if (r.length() > 0) {
|
||||
r.append(", ");
|
||||
|
||||
@@ -51,7 +51,7 @@ public class ChangeApi {
|
||||
input.project(emptyToNull(project));
|
||||
input.branch(emptyToNull(branch));
|
||||
input.subject(emptyToNull(subject));
|
||||
input.base_change(emptyToNull(base));
|
||||
input.baseChange(emptyToNull(base));
|
||||
|
||||
if (Gerrit.getConfig().isAllowDraftChanges()) {
|
||||
input.status(Change.Status.DRAFT.toString());
|
||||
@@ -187,7 +187,7 @@ public class ChangeApi {
|
||||
/** Submit a specific revision of a change. */
|
||||
public static void submit(int id, String commit, AsyncCallback<SubmitInfo> cb) {
|
||||
SubmitInput in = SubmitInput.create();
|
||||
in.wait_for_merge(true);
|
||||
in.waitForMerge(true);
|
||||
call(id, commit, "submit").post(in, cb);
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ public class ChangeApi {
|
||||
public final native void branch(String b) /*-{ if(b)this.branch=b; }-*/;
|
||||
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 base_change(String b) /*-{ if(b)this.base_change=b; }-*/;
|
||||
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; }-*/;
|
||||
|
||||
protected CreateChangeInput() {
|
||||
@@ -281,7 +281,7 @@ public class ChangeApi {
|
||||
}
|
||||
|
||||
private static class SubmitInput extends JavaScriptObject {
|
||||
final native void wait_for_merge(boolean b) /*-{ this.wait_for_merge=b; }-*/;
|
||||
final native void waitForMerge(boolean b) /*-{ this.wait_for_merge=b; }-*/;
|
||||
|
||||
static SubmitInput create() {
|
||||
return (SubmitInput) createObject();
|
||||
|
||||
@@ -76,15 +76,15 @@ public class ChangeEditApi {
|
||||
public static void rename(int id, String path, String newPath,
|
||||
AsyncCallback<VoidResult> cb) {
|
||||
Input in = Input.create();
|
||||
in.old_path(path);
|
||||
in.new_path(newPath);
|
||||
in.oldPath(path);
|
||||
in.newPath(newPath);
|
||||
ChangeApi.edit(id).post(in, cb);
|
||||
}
|
||||
|
||||
/** Restore (undo delete/modify) a file in the pending edit. */
|
||||
public static void restore(int id, String path, AsyncCallback<VoidResult> cb) {
|
||||
Input in = Input.create();
|
||||
in.restore_path(path);
|
||||
in.restorePath(path);
|
||||
ChangeApi.edit(id).post(in, cb);
|
||||
}
|
||||
|
||||
@@ -101,9 +101,9 @@ public class ChangeEditApi {
|
||||
return createObject().cast();
|
||||
}
|
||||
|
||||
final native void restore_path(String p) /*-{ this.restore_path=p }-*/;
|
||||
final native void old_path(String p) /*-{ this.old_path=p }-*/;
|
||||
final native void new_path(String p) /*-{ this.new_path=p }-*/;
|
||||
final native void restorePath(String p) /*-{ this.restore_path=p }-*/;
|
||||
final native void oldPath(String p) /*-{ this.old_path=p }-*/;
|
||||
final native void newPath(String p) /*-{ this.new_path=p }-*/;
|
||||
|
||||
protected Input() {
|
||||
}
|
||||
|
||||
@@ -41,24 +41,24 @@ import java.util.TreeSet;
|
||||
|
||||
public class ChangeInfo extends JavaScriptObject {
|
||||
public final void init() {
|
||||
if (all_labels() != null) {
|
||||
all_labels().copyKeysIntoChildren("_name");
|
||||
if (allLabels() != null) {
|
||||
allLabels().copyKeysIntoChildren("_name");
|
||||
}
|
||||
}
|
||||
|
||||
public final Project.NameKey project_name_key() {
|
||||
public final Project.NameKey projectNameKey() {
|
||||
return new Project.NameKey(project());
|
||||
}
|
||||
|
||||
public final Change.Id legacy_id() {
|
||||
public final Change.Id legacyId() {
|
||||
return new Change.Id(_number());
|
||||
}
|
||||
|
||||
public final Timestamp created() {
|
||||
Timestamp ts = _get_cts();
|
||||
Timestamp ts = _getCts();
|
||||
if (ts == null) {
|
||||
ts = JavaSqlTimestamp_JsonSerializer.parseTimestamp(createdRaw());
|
||||
_set_cts(ts);
|
||||
_setCts(ts);
|
||||
}
|
||||
return ts;
|
||||
}
|
||||
@@ -66,18 +66,18 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
public final boolean hasEditBasedOnCurrentPatchSet() {
|
||||
JsArray<RevisionInfo> revList = revisions().values();
|
||||
RevisionInfo.sortRevisionInfoByNumber(revList);
|
||||
return revList.get(revList.length() - 1).is_edit();
|
||||
return revList.get(revList.length() - 1).isEdit();
|
||||
}
|
||||
|
||||
private final native Timestamp _get_cts() /*-{ return this._cts; }-*/;
|
||||
private final native void _set_cts(Timestamp ts) /*-{ this._cts = ts; }-*/;
|
||||
private final native Timestamp _getCts() /*-{ return this._cts; }-*/;
|
||||
private final native void _setCts(Timestamp ts) /*-{ this._cts = ts; }-*/;
|
||||
|
||||
public final Timestamp updated() {
|
||||
return JavaSqlTimestamp_JsonSerializer.parseTimestamp(updatedRaw());
|
||||
}
|
||||
|
||||
public final String id_abbreviated() {
|
||||
return new Change.Key(change_id()).abbreviate();
|
||||
public final String idAbbreviated() {
|
||||
return new Change.Key(changeId()).abbreviate();
|
||||
}
|
||||
|
||||
public final Change.Status status() {
|
||||
@@ -85,14 +85,14 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
}
|
||||
|
||||
public final Set<String> labels() {
|
||||
return all_labels().keySet();
|
||||
return allLabels().keySet();
|
||||
}
|
||||
|
||||
public final native String id() /*-{ return this.id; }-*/;
|
||||
public final native String project() /*-{ return this.project; }-*/;
|
||||
public final native String branch() /*-{ return this.branch; }-*/;
|
||||
public final native String topic() /*-{ return this.topic; }-*/;
|
||||
public final native String change_id() /*-{ return this.change_id; }-*/;
|
||||
public final native String changeId() /*-{ return this.change_id; }-*/;
|
||||
public final native boolean mergeable() /*-{ return this.mergeable || false; }-*/;
|
||||
public final native int insertions() /*-{ return this.insertions; }-*/;
|
||||
public final native int deletions() /*-{ return this.deletions; }-*/;
|
||||
@@ -103,30 +103,30 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
private final native String updatedRaw() /*-{ return this.updated; }-*/;
|
||||
public final native boolean starred() /*-{ return this.starred ? true : false; }-*/;
|
||||
public final native boolean reviewed() /*-{ return this.reviewed ? true : false; }-*/;
|
||||
public final native NativeMap<LabelInfo> all_labels() /*-{ return this.labels; }-*/;
|
||||
public final native NativeMap<LabelInfo> allLabels() /*-{ return this.labels; }-*/;
|
||||
public final native LabelInfo label(String n) /*-{ return this.labels[n]; }-*/;
|
||||
public final native String current_revision() /*-{ return this.current_revision; }-*/;
|
||||
public final native void set_current_revision(String r) /*-{ this.current_revision = r; }-*/;
|
||||
private final native void set_submittable(boolean x) /*-{ this.submittable = x; }-*/;
|
||||
public final native String currentRevision() /*-{ return this.current_revision; }-*/;
|
||||
public final native void setCurrentRevision(String r) /*-{ this.current_revision = r; }-*/;
|
||||
private final native void setSubmittable(boolean x) /*-{ this.submittable = x; }-*/;
|
||||
public final native NativeMap<RevisionInfo> revisions() /*-{ return this.revisions; }-*/;
|
||||
public final native RevisionInfo revision(String n) /*-{ return this.revisions[n]; }-*/;
|
||||
public final native JsArray<MessageInfo> messages() /*-{ return this.messages; }-*/;
|
||||
public final native void set_edit(EditInfo edit) /*-{ this.edit = edit; }-*/;
|
||||
public final native void setEdit(EditInfo edit) /*-{ this.edit = edit; }-*/;
|
||||
public final native EditInfo edit() /*-{ return this.edit; }-*/;
|
||||
public final native boolean has_edit() /*-{ return this.hasOwnProperty('edit') }-*/;
|
||||
public final native boolean hasEdit() /*-{ return this.hasOwnProperty('edit') }-*/;
|
||||
public final native JsArrayString hashtags() /*-{ return this.hashtags; }-*/;
|
||||
|
||||
public final native boolean has_permitted_labels()
|
||||
public final native boolean hasPermittedLabels()
|
||||
/*-{ return this.hasOwnProperty('permitted_labels') }-*/;
|
||||
public final native NativeMap<JsArrayString> permitted_labels()
|
||||
public final native NativeMap<JsArrayString> permittedLabels()
|
||||
/*-{ return this.permitted_labels; }-*/;
|
||||
public final native JsArrayString permitted_values(String n)
|
||||
public final native JsArrayString permittedValues(String n)
|
||||
/*-{ return this.permitted_labels[n]; }-*/;
|
||||
|
||||
public final native JsArray<AccountInfo> removable_reviewers()
|
||||
public final native JsArray<AccountInfo> removableReviewers()
|
||||
/*-{ return this.removable_reviewers; }-*/;
|
||||
|
||||
public final native boolean has_actions() /*-{ return this.hasOwnProperty('actions') }-*/;
|
||||
public final native boolean hasActions() /*-{ return this.hasOwnProperty('actions') }-*/;
|
||||
public final native NativeMap<ActionInfo> actions() /*-{ return this.actions; }-*/;
|
||||
|
||||
final native int _number() /*-{ return this._number; }-*/;
|
||||
@@ -151,14 +151,14 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
public final int getMissingLabelIndex() {
|
||||
int i = -1;
|
||||
int ret = -1;
|
||||
List<LabelInfo> labels = Natives.asList(all_labels().values());
|
||||
List<LabelInfo> labels = Natives.asList(allLabels().values());
|
||||
for (LabelInfo label : labels) {
|
||||
i++;
|
||||
if (!permitted_labels().containsKey(label.name())) {
|
||||
if (!permittedLabels().containsKey(label.name())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
JsArrayString values = permitted_values(label.name());
|
||||
JsArrayString values = permittedValues(label.name());
|
||||
if (values.length() == 0) {
|
||||
continue;
|
||||
}
|
||||
@@ -168,7 +168,7 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
if (ret != -1) {
|
||||
// more than one label is missing, so it's unclear which to quick
|
||||
// approve, return -1
|
||||
set_submittable(false);
|
||||
setSubmittable(false);
|
||||
return -1;
|
||||
} else {
|
||||
ret = i;
|
||||
@@ -181,11 +181,11 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
|
||||
case REJECT: // Submit cannot happen, do not quick approve.
|
||||
case IMPOSSIBLE:
|
||||
set_submittable(false);
|
||||
setSubmittable(false);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
set_submittable(ret == -1);
|
||||
setSubmittable(ret == -1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -213,10 +213,10 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
public final native AccountInfo disliked() /*-{ return this.disliked; }-*/;
|
||||
|
||||
public final native JsArray<ApprovalInfo> all() /*-{ return this.all; }-*/;
|
||||
public final ApprovalInfo for_user(int user) {
|
||||
public final ApprovalInfo forUser(int user) {
|
||||
JsArray<ApprovalInfo> all = all();
|
||||
for (int i = 0; all != null && i < all.length(); i++) {
|
||||
if (all.get(i)._account_id() == user) {
|
||||
if (all.get(i)._accountId() == user) {
|
||||
return all.get(i);
|
||||
}
|
||||
}
|
||||
@@ -227,7 +227,7 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
public final Set<String> values() {
|
||||
return Natives.keys(_values());
|
||||
}
|
||||
public final native String value_text(String n) /*-{ return this.values[n]; }-*/;
|
||||
public final native String valueText(String n) /*-{ return this.values[n]; }-*/;
|
||||
|
||||
public final native boolean optional() /*-{ return this.optional ? true : false; }-*/;
|
||||
public final native boolean blocking() /*-{ return this.blocking ? true : false; }-*/;
|
||||
@@ -240,11 +240,11 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
return 0;
|
||||
}-*/;
|
||||
|
||||
public final String max_value() {
|
||||
return LabelValue.formatValue(value_set().last());
|
||||
public final String maxValue() {
|
||||
return LabelValue.formatValue(valueSet().last());
|
||||
}
|
||||
|
||||
public final SortedSet<Short> value_set() {
|
||||
public final SortedSet<Short> valueSet() {
|
||||
SortedSet<Short> values = new TreeSet<>();
|
||||
for (String v : values()) {
|
||||
values.add(parseValue(v));
|
||||
@@ -266,7 +266,7 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
}
|
||||
|
||||
public static class ApprovalInfo extends AccountInfo {
|
||||
public final native boolean has_value() /*-{ return this.hasOwnProperty('value'); }-*/;
|
||||
public final native boolean hasValue() /*-{ return this.hasOwnProperty('value'); }-*/;
|
||||
public final native short value() /*-{ return this.value || 0; }-*/;
|
||||
|
||||
protected ApprovalInfo() {
|
||||
@@ -275,17 +275,17 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
|
||||
public static class EditInfo extends JavaScriptObject {
|
||||
public final native String name() /*-{ return this.name; }-*/;
|
||||
public final native String set_name(String n) /*-{ this.name = n; }-*/;
|
||||
public final native String base_revision() /*-{ return this.base_revision; }-*/;
|
||||
public final native String setName(String n) /*-{ this.name = n; }-*/;
|
||||
public final native String baseRevision() /*-{ return this.base_revision; }-*/;
|
||||
public final native CommitInfo commit() /*-{ return this.commit; }-*/;
|
||||
|
||||
public final native boolean has_actions() /*-{ return this.hasOwnProperty('actions') }-*/;
|
||||
public final native boolean hasActions() /*-{ return this.hasOwnProperty('actions') }-*/;
|
||||
public final native NativeMap<ActionInfo> actions() /*-{ return this.actions; }-*/;
|
||||
|
||||
public final native boolean has_fetch() /*-{ return this.hasOwnProperty('fetch') }-*/;
|
||||
public final native boolean hasFetch() /*-{ return this.hasOwnProperty('fetch') }-*/;
|
||||
public final native NativeMap<FetchInfo> fetch() /*-{ return this.fetch; }-*/;
|
||||
|
||||
public final native boolean has_files() /*-{ return this.hasOwnProperty('files') }-*/;
|
||||
public final native boolean hasFiles() /*-{ return this.hasOwnProperty('files') }-*/;
|
||||
public final native NativeMap<FileInfo> files() /*-{ return this.files; }-*/;
|
||||
|
||||
protected EditInfo() {
|
||||
@@ -307,19 +307,19 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
public final native int _number() /*-{ return this._number; }-*/;
|
||||
public final native String name() /*-{ return this.name; }-*/;
|
||||
public final native boolean draft() /*-{ return this.draft || false; }-*/;
|
||||
public final native boolean has_draft_comments() /*-{ return this.has_draft_comments || false; }-*/;
|
||||
public final native boolean is_edit() /*-{ return this._number == 0; }-*/;
|
||||
public final native boolean hasDraftComments() /*-{ return this.has_draft_comments || false; }-*/;
|
||||
public final native boolean isEdit() /*-{ return this._number == 0; }-*/;
|
||||
public final native CommitInfo commit() /*-{ return this.commit; }-*/;
|
||||
public final native void set_commit(CommitInfo c) /*-{ this.commit = c; }-*/;
|
||||
public final native String edit_base() /*-{ return this.edit_base; }-*/;
|
||||
public final native void setCommit(CommitInfo c) /*-{ this.commit = c; }-*/;
|
||||
public final native String editBase() /*-{ return this.edit_base; }-*/;
|
||||
|
||||
public final native boolean has_files() /*-{ return this.hasOwnProperty('files') }-*/;
|
||||
public final native boolean hasFiles() /*-{ return this.hasOwnProperty('files') }-*/;
|
||||
public final native NativeMap<FileInfo> files() /*-{ return this.files; }-*/;
|
||||
|
||||
public final native boolean has_actions() /*-{ return this.hasOwnProperty('actions') }-*/;
|
||||
public final native boolean hasActions() /*-{ return this.hasOwnProperty('actions') }-*/;
|
||||
public final native NativeMap<ActionInfo> actions() /*-{ return this.actions; }-*/;
|
||||
|
||||
public final native boolean has_fetch() /*-{ return this.hasOwnProperty('fetch') }-*/;
|
||||
public final native boolean hasFetch() /*-{ return this.hasOwnProperty('fetch') }-*/;
|
||||
public final native NativeMap<FetchInfo> fetch() /*-{ return this.fetch; }-*/;
|
||||
|
||||
public static void sortRevisionInfoByNumber(JsArray<RevisionInfo> list) {
|
||||
@@ -331,7 +331,7 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
}
|
||||
|
||||
private int num(RevisionInfo r) {
|
||||
return !r.is_edit() ? 2 * (r._number() - 1) + 1 : 2 * editParent;
|
||||
return !r.isEdit() ? 2 * (r._number() - 1) + 1 : 2 * editParent;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -340,8 +340,8 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
for (int i = 0; i < list.length(); i++) {
|
||||
// edit under revisions?
|
||||
RevisionInfo editInfo = list.get(i);
|
||||
if (editInfo.is_edit()) {
|
||||
String parentRevision = editInfo.edit_base();
|
||||
if (editInfo.isEdit()) {
|
||||
String parentRevision = editInfo.editBase();
|
||||
// find parent
|
||||
for (int j = 0; j < list.length(); j++) {
|
||||
RevisionInfo parentInfo = list.get(j);
|
||||
@@ -381,7 +381,7 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
public final native GitPerson committer() /*-{ return this.committer; }-*/;
|
||||
public final native String subject() /*-{ return this.subject; }-*/;
|
||||
public final native String message() /*-{ return this.message; }-*/;
|
||||
public final native JsArray<WebLinkInfo> web_links() /*-{ return this.web_links; }-*/;
|
||||
public final native JsArray<WebLinkInfo> webLinks() /*-{ return this.web_links; }-*/;
|
||||
|
||||
protected CommitInfo() {
|
||||
}
|
||||
@@ -415,7 +415,7 @@ public class ChangeInfo extends JavaScriptObject {
|
||||
}
|
||||
|
||||
public static class MergeableInfo extends JavaScriptObject {
|
||||
public final native String submit_type() /*-{ return this.submit_type }-*/;
|
||||
public final native String submitType() /*-{ return this.submit_type }-*/;
|
||||
public final native boolean mergeable() /*-{ return this.mergeable }-*/;
|
||||
|
||||
protected MergeableInfo() {
|
||||
|
||||
@@ -118,13 +118,13 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
|
||||
|
||||
@Override
|
||||
protected Object getRowItemKey(final ChangeInfo item) {
|
||||
return item.legacy_id();
|
||||
return item.legacyId();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onOpenRow(final int row) {
|
||||
final ChangeInfo c = getRowItem(row);
|
||||
final Change.Id id = c.legacy_id();
|
||||
final Change.Id id = c.legacyId();
|
||||
Gerrit.display(PageLinks.toChange(id));
|
||||
}
|
||||
|
||||
@@ -208,10 +208,10 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
|
||||
CellFormatter fmt = table.getCellFormatter();
|
||||
if (Gerrit.isSignedIn()) {
|
||||
table.setWidget(row, C_STAR, StarredChanges.createIcon(
|
||||
c.legacy_id(),
|
||||
c.legacyId(),
|
||||
c.starred()));
|
||||
}
|
||||
table.setWidget(row, C_ID, new TableChangeLink(String.valueOf(c.legacy_id()), c));
|
||||
table.setWidget(row, C_ID, new TableChangeLink(String.valueOf(c.legacyId()), c));
|
||||
|
||||
String subject = Util.cropSubject(c.subject());
|
||||
table.setWidget(row, C_SUBJECT, new TableChangeLink(subject, c));
|
||||
@@ -229,8 +229,8 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
|
||||
table.setText(row, C_OWNER, "");
|
||||
}
|
||||
|
||||
table.setWidget(row, C_PROJECT, new ProjectLink(c.project_name_key()));
|
||||
table.setWidget(row, C_BRANCH, new BranchLink(c.project_name_key(), c
|
||||
table.setWidget(row, C_PROJECT, new ProjectLink(c.projectNameKey()));
|
||||
table.setWidget(row, C_BRANCH, new BranchLink(c.projectNameKey(), c
|
||||
.status(), c.branch(), c.topic()));
|
||||
if (Gerrit.isSignedIn()
|
||||
&& Gerrit.getUserAccount().getGeneralPreferences()
|
||||
@@ -447,7 +447,7 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
|
||||
|
||||
private final class TableChangeLink extends ChangeLink {
|
||||
private TableChangeLink(final String text, final ChangeInfo c) {
|
||||
super(text, c.legacy_id());
|
||||
super(text, c.legacyId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -29,7 +29,7 @@ public class CommentInfo extends JavaScriptObject {
|
||||
n.path(path);
|
||||
n.side(side);
|
||||
if (range != null) {
|
||||
n.line(range.end_line());
|
||||
n.line(range.endLine());
|
||||
n.range(range);
|
||||
} else if (line > 0) {
|
||||
n.line(line);
|
||||
@@ -41,11 +41,11 @@ public class CommentInfo extends JavaScriptObject {
|
||||
CommentInfo n = createObject().cast();
|
||||
n.path(r.path());
|
||||
n.side(r.side());
|
||||
n.in_reply_to(r.id());
|
||||
if (r.has_range()) {
|
||||
n.line(r.range().end_line());
|
||||
n.inReplyTo(r.id());
|
||||
if (r.hasRange()) {
|
||||
n.line(r.range().endLine());
|
||||
n.range(r.range());
|
||||
} else if (r.has_line()) {
|
||||
} else if (r.hasLine()) {
|
||||
n.line(r.line());
|
||||
}
|
||||
return n;
|
||||
@@ -56,12 +56,12 @@ public class CommentInfo extends JavaScriptObject {
|
||||
n.path(s.path());
|
||||
n.side(s.side());
|
||||
n.id(s.id());
|
||||
n.in_reply_to(s.in_reply_to());
|
||||
n.inReplyTo(s.inReplyTo());
|
||||
n.message(s.message());
|
||||
if (s.has_range()) {
|
||||
n.line(s.range().end_line());
|
||||
if (s.hasRange()) {
|
||||
n.line(s.range().endLine());
|
||||
n.range(s.range());
|
||||
} else if (s.has_line()) {
|
||||
} else if (s.hasLine()) {
|
||||
n.line(s.line());
|
||||
}
|
||||
return n;
|
||||
@@ -71,7 +71,7 @@ public class CommentInfo extends JavaScriptObject {
|
||||
public final native void id(String i) /*-{ this.id = i }-*/;
|
||||
public final native void line(int n) /*-{ this.line = n }-*/;
|
||||
public final native void range(CommentRange r) /*-{ this.range = r }-*/;
|
||||
public final native void in_reply_to(String i) /*-{ this.in_reply_to = i }-*/;
|
||||
public final native void inReplyTo(String i) /*-{ this.in_reply_to = i }-*/;
|
||||
public final native void message(String m) /*-{ this.message = m }-*/;
|
||||
|
||||
public final void side(Side side) {
|
||||
@@ -81,8 +81,8 @@ public class CommentInfo extends JavaScriptObject {
|
||||
|
||||
public final native String path() /*-{ return this.path }-*/;
|
||||
public final native String id() /*-{ return this.id }-*/;
|
||||
public final native String in_reply_to() /*-{ return this.in_reply_to }-*/;
|
||||
public final native int patch_set() /*-{ return this.patch_set }-*/;
|
||||
public final native String inReplyTo() /*-{ return this.in_reply_to }-*/;
|
||||
public final native int patchSet() /*-{ return this.patch_set }-*/;
|
||||
|
||||
public final Side side() {
|
||||
String s = sideRaw();
|
||||
@@ -109,8 +109,8 @@ public class CommentInfo extends JavaScriptObject {
|
||||
|
||||
public final native AccountInfo author() /*-{ return this.author }-*/;
|
||||
public final native int line() /*-{ return this.line || 0 }-*/;
|
||||
public final native boolean has_line() /*-{ return this.hasOwnProperty('line') }-*/;
|
||||
public final native boolean has_range() /*-{ return this.hasOwnProperty('range') }-*/;
|
||||
public final native boolean hasLine() /*-{ return this.hasOwnProperty('line') }-*/;
|
||||
public final native boolean hasRange() /*-{ return this.hasOwnProperty('range') }-*/;
|
||||
public final native CommentRange range() /*-{ return this.range }-*/;
|
||||
public final native String message() /*-{ return this.message }-*/;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ public class QueryScreen extends PagedSingleListScreen implements
|
||||
if (isAttached()) {
|
||||
if (result.length() == 1 && isSingleQuery(query)) {
|
||||
ChangeInfo c = result.get(0);
|
||||
Change.Id id = c.legacy_id();
|
||||
Change.Id id = c.legacyId();
|
||||
Gerrit.display(PageLinks.toChange(id));
|
||||
} else {
|
||||
display(result);
|
||||
|
||||
@@ -124,7 +124,7 @@ class ChunkManager {
|
||||
padding = new ArrayList<>();
|
||||
paddingDivs = new ArrayList<>();
|
||||
|
||||
String diffColor = diff.meta_a() == null || diff.meta_b() == null
|
||||
String diffColor = diff.metaA() == null || diff.metaB() == null
|
||||
? DiffTable.style.intralineBg()
|
||||
: DiffTable.style.diff();
|
||||
|
||||
@@ -175,8 +175,8 @@ class ChunkManager {
|
||||
|
||||
colorLines(cmA, color, startA, aLen);
|
||||
colorLines(cmB, color, startB, bLen);
|
||||
markEdit(cmA, startA, a, region.edit_a());
|
||||
markEdit(cmB, startB, b, region.edit_b());
|
||||
markEdit(cmA, startA, a, region.editA());
|
||||
markEdit(cmB, startB, b, region.editB());
|
||||
addPadding(cmA, startA + aLen - 1, bLen - aLen);
|
||||
addPadding(cmB, startB + bLen - 1, aLen - bLen);
|
||||
addGutterTag(region, startA, startB);
|
||||
|
||||
@@ -218,8 +218,8 @@ class CommentManager {
|
||||
info,
|
||||
expandAll);
|
||||
|
||||
if (info.in_reply_to() != null) {
|
||||
PublishedBox r = published.get(info.in_reply_to());
|
||||
if (info.inReplyTo() != null) {
|
||||
PublishedBox r = published.get(info.inReplyTo());
|
||||
if (r != null) {
|
||||
r.setReplyBox(box);
|
||||
}
|
||||
|
||||
@@ -38,10 +38,10 @@ public class CommentRange extends JavaScriptObject {
|
||||
to.line() + 1, to.ch());
|
||||
}
|
||||
|
||||
public final native int start_line() /*-{ return this.start_line; }-*/;
|
||||
public final native int start_character() /*-{ return this.start_character; }-*/;
|
||||
public final native int end_line() /*-{ return this.end_line; }-*/;
|
||||
public final native int end_character() /*-{ return this.end_character; }-*/;
|
||||
public final native int startLine() /*-{ return this.start_line; }-*/;
|
||||
public final native int startCharacter() /*-{ return this.start_character; }-*/;
|
||||
public final native int endLine() /*-{ return this.end_line; }-*/;
|
||||
public final native int endCharacter() /*-{ return this.end_character; }-*/;
|
||||
|
||||
private final native void set(int sl, int sc, int el, int ec) /*-{
|
||||
this.start_line = sl;
|
||||
|
||||
@@ -30,24 +30,24 @@ public class DiffInfo extends JavaScriptObject {
|
||||
public static final String GITLINK = "x-git/gitlink";
|
||||
public static final String SYMLINK = "x-git/symlink";
|
||||
|
||||
public final native FileMeta meta_a() /*-{ return this.meta_a; }-*/;
|
||||
public final native FileMeta meta_b() /*-{ return this.meta_b; }-*/;
|
||||
public final native JsArrayString diff_header() /*-{ return this.diff_header; }-*/;
|
||||
public final native FileMeta metaA() /*-{ return this.meta_a; }-*/;
|
||||
public final native FileMeta metaB() /*-{ return this.meta_b; }-*/;
|
||||
public final native JsArrayString diffHeader() /*-{ return this.diff_header; }-*/;
|
||||
public final native JsArray<Region> content() /*-{ return this.content; }-*/;
|
||||
public final native JsArray<DiffWebLinkInfo> web_links() /*-{ return this.web_links; }-*/;
|
||||
public final native JsArray<DiffWebLinkInfo> webLinks() /*-{ return this.web_links; }-*/;
|
||||
public final native boolean binary() /*-{ return this.binary || false; }-*/;
|
||||
|
||||
public final List<WebLinkInfo> side_by_side_web_links() {
|
||||
public final List<WebLinkInfo> sideBySideWebLinks() {
|
||||
return filterWebLinks(DiffView.SIDE_BY_SIDE);
|
||||
}
|
||||
|
||||
public final List<WebLinkInfo> unified_web_links() {
|
||||
public final List<WebLinkInfo> unifiedWebLinks() {
|
||||
return filterWebLinks(DiffView.UNIFIED_DIFF);
|
||||
}
|
||||
|
||||
private final List<WebLinkInfo> filterWebLinks(DiffView diffView) {
|
||||
List<WebLinkInfo> filteredDiffWebLinks = new LinkedList<>();
|
||||
List<DiffWebLinkInfo> allDiffWebLinks = Natives.asList(web_links());
|
||||
List<DiffWebLinkInfo> allDiffWebLinks = Natives.asList(webLinks());
|
||||
if (allDiffWebLinks != null) {
|
||||
for (DiffWebLinkInfo webLink : allDiffWebLinks) {
|
||||
if (diffView == DiffView.SIDE_BY_SIDE
|
||||
@@ -63,22 +63,22 @@ public class DiffInfo extends JavaScriptObject {
|
||||
return filteredDiffWebLinks;
|
||||
}
|
||||
|
||||
public final ChangeType change_type() {
|
||||
return ChangeType.valueOf(change_typeRaw());
|
||||
public final ChangeType changeType() {
|
||||
return ChangeType.valueOf(changeTypeRaw());
|
||||
}
|
||||
private final native String change_typeRaw()
|
||||
private final native String changeTypeRaw()
|
||||
/*-{ return this.change_type }-*/;
|
||||
|
||||
public final IntraLineStatus intraline_status() {
|
||||
String s = intraline_statusRaw();
|
||||
public final IntraLineStatus intralineStatus() {
|
||||
String s = intralineStatusRaw();
|
||||
return s != null
|
||||
? IntraLineStatus.valueOf(s)
|
||||
: IntraLineStatus.OFF;
|
||||
}
|
||||
private final native String intraline_statusRaw()
|
||||
private final native String intralineStatusRaw()
|
||||
/*-{ return this.intraline_status }-*/;
|
||||
|
||||
public final boolean has_skip() {
|
||||
public final boolean hasSkip() {
|
||||
JsArray<Region> c = content();
|
||||
for (int i = 0; i < c.length(); i++) {
|
||||
if (c.get(i).skip() != 0) {
|
||||
@@ -88,7 +88,7 @@ public class DiffInfo extends JavaScriptObject {
|
||||
return false;
|
||||
}
|
||||
|
||||
public final String text_a() {
|
||||
public final String textA() {
|
||||
StringBuilder s = new StringBuilder();
|
||||
JsArray<Region> c = content();
|
||||
for (int i = 0; i < c.length(); i++) {
|
||||
@@ -103,7 +103,7 @@ public class DiffInfo extends JavaScriptObject {
|
||||
return s.toString();
|
||||
}
|
||||
|
||||
public final String text_b() {
|
||||
public final String textB() {
|
||||
StringBuilder s = new StringBuilder();
|
||||
JsArray<Region> c = content();
|
||||
for (int i = 0; i < c.length(); i++) {
|
||||
@@ -133,9 +133,9 @@ public class DiffInfo extends JavaScriptObject {
|
||||
|
||||
public static class FileMeta extends JavaScriptObject {
|
||||
public final native String name() /*-{ return this.name; }-*/;
|
||||
public final native String content_type() /*-{ return this.content_type; }-*/;
|
||||
public final native String contentType() /*-{ return this.content_type; }-*/;
|
||||
public final native int lines() /*-{ return this.lines || 0 }-*/;
|
||||
public final native JsArray<WebLinkInfo> web_links() /*-{ return this.web_links; }-*/;
|
||||
public final native JsArray<WebLinkInfo> webLinks() /*-{ return this.web_links; }-*/;
|
||||
|
||||
protected FileMeta() {
|
||||
}
|
||||
@@ -148,8 +148,8 @@ public class DiffInfo extends JavaScriptObject {
|
||||
public final native int skip() /*-{ return this.skip || 0; }-*/;
|
||||
public final native boolean common() /*-{ return this.common || false; }-*/;
|
||||
|
||||
public final native JsArray<Span> edit_a() /*-{ return this.edit_a }-*/;
|
||||
public final native JsArray<Span> edit_b() /*-{ return this.edit_b }-*/;
|
||||
public final native JsArray<Span> editA() /*-{ return this.edit_a }-*/;
|
||||
public final native JsArray<Span> editB() /*-{ return this.edit_b }-*/;
|
||||
|
||||
protected Region() {
|
||||
}
|
||||
|
||||
@@ -151,13 +151,13 @@ class DiffTable extends Composite {
|
||||
|
||||
void set(DiffPreferences prefs, JsArray<RevisionInfo> list, DiffInfo info,
|
||||
boolean editExists, int currentPatchSet, boolean open, boolean binary) {
|
||||
this.changeType = info.change_type();
|
||||
patchSetSelectBoxA.setUpPatchSetNav(list, info.meta_a(), editExists,
|
||||
this.changeType = info.changeType();
|
||||
patchSetSelectBoxA.setUpPatchSetNav(list, info.metaA(), editExists,
|
||||
currentPatchSet, open, binary);
|
||||
patchSetSelectBoxB.setUpPatchSetNav(list, info.meta_b(), editExists,
|
||||
patchSetSelectBoxB.setUpPatchSetNav(list, info.metaB(), editExists,
|
||||
currentPatchSet, open, binary);
|
||||
|
||||
JsArrayString hdr = info.diff_header();
|
||||
JsArrayString hdr = info.diffHeader();
|
||||
if (hdr != null) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
for (int i = 1; i < hdr.length(); i++) {
|
||||
|
||||
@@ -244,7 +244,7 @@ class DraftBox extends CommentBox {
|
||||
}
|
||||
|
||||
private void restoreSelection() {
|
||||
if (getFromTo() != null && comment.in_reply_to() == null) {
|
||||
if (getFromTo() != null && comment.inReplyTo() == null) {
|
||||
getCm().setSelection(getFromTo().from(), getFromTo().to());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@ import java.util.Comparator;
|
||||
|
||||
public class FileInfo extends JavaScriptObject {
|
||||
public final native String path() /*-{ return this.path; }-*/;
|
||||
public final native String old_path() /*-{ return this.old_path; }-*/;
|
||||
public final native int lines_inserted() /*-{ return this.lines_inserted || 0; }-*/;
|
||||
public final native int lines_deleted() /*-{ return this.lines_deleted || 0; }-*/;
|
||||
public final native String oldPath() /*-{ return this.old_path; }-*/;
|
||||
public final native int linesInserted() /*-{ return this.lines_inserted || 0; }-*/;
|
||||
public final native int linesDeleted() /*-{ return this.lines_deleted || 0; }-*/;
|
||||
public final native boolean binary() /*-{ return this.binary || false; }-*/;
|
||||
public final native String status() /*-{ return this.status; }-*/;
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ class PatchSetSelectBox extends Composite {
|
||||
linkPanel.add(createEditIcon());
|
||||
}
|
||||
}
|
||||
List<WebLinkInfo> webLinks = Natives.asList(meta.web_links());
|
||||
List<WebLinkInfo> webLinks = Natives.asList(meta.webLinks());
|
||||
if (webLinks != null) {
|
||||
for (WebLinkInfo webLink : webLinks) {
|
||||
linkPanel.add(webLink.toAnchor());
|
||||
|
||||
@@ -238,11 +238,11 @@ public class SideBySide extends Screen {
|
||||
changeStatus = info.status();
|
||||
info.revisions().copyKeysIntoChildren("name");
|
||||
if (edit != null) {
|
||||
edit.set_name(edit.commit().commit());
|
||||
info.set_edit(edit);
|
||||
edit.setName(edit.commit().commit());
|
||||
info.setEdit(edit);
|
||||
info.revisions().put(edit.name(), RevisionInfo.fromEdit(edit));
|
||||
}
|
||||
int currentPatchSet = info.revision(info.current_revision())._number();
|
||||
int currentPatchSet = info.revision(info.currentRevision())._number();
|
||||
JsArray<RevisionInfo> list = info.revisions().values();
|
||||
RevisionInfo.sortRevisionInfoByNumber(list);
|
||||
diffTable.set(prefs, list, diff, edit != null, currentPatchSet,
|
||||
@@ -570,8 +570,8 @@ public class SideBySide extends Screen {
|
||||
diffTable.addStyleName(DiffTable.style.showLineNumbers());
|
||||
}
|
||||
|
||||
cmA = newCM(diff.meta_a(), diff.text_a(), diffTable.cmA);
|
||||
cmB = newCM(diff.meta_b(), diff.text_b(), diffTable.cmB);
|
||||
cmA = newCM(diff.metaA(), diff.textA(), diffTable.cmA);
|
||||
cmB = newCM(diff.metaB(), diff.textB(), diffTable.cmB);
|
||||
|
||||
cmA.extras().side(DisplaySide.A);
|
||||
cmB.extras().side(DisplaySide.B);
|
||||
@@ -606,7 +606,7 @@ public class SideBySide extends Screen {
|
||||
chunkManager.getLineMapper());
|
||||
|
||||
prefsAction = new PreferencesAction(this, prefs);
|
||||
header.init(prefsAction, getLinks(), diff.side_by_side_web_links());
|
||||
header.init(prefsAction, getLinks(), diff.sideBySideWebLinks());
|
||||
scrollSynchronizer.setAutoHideDiffTableHeader(prefs.autoHideDiffTableHeader());
|
||||
|
||||
if (prefs.syntaxHighlighting() && fileSize.compareTo(FileSize.SMALL) > 0) {
|
||||
@@ -654,7 +654,7 @@ public class SideBySide extends Screen {
|
||||
}
|
||||
|
||||
DiffInfo.IntraLineStatus getIntraLineStatus() {
|
||||
return diff.intraline_status();
|
||||
return diff.intralineStatus();
|
||||
}
|
||||
|
||||
boolean canEnableRenderEntireFile(DiffPreferences prefs) {
|
||||
@@ -663,7 +663,7 @@ public class SideBySide extends Screen {
|
||||
}
|
||||
|
||||
String getContentType() {
|
||||
return getContentType(diff.meta_b());
|
||||
return getContentType(diff.metaB());
|
||||
}
|
||||
|
||||
void setThemeStyles(boolean d) {
|
||||
@@ -716,8 +716,8 @@ public class SideBySide extends Screen {
|
||||
@Override
|
||||
public void onSuccess(Void result) {
|
||||
if (prefs.syntaxHighlighting()) {
|
||||
cmA.setOption("mode", getContentType(diff.meta_a()));
|
||||
cmB.setOption("mode", getContentType(diff.meta_b()));
|
||||
cmA.setOption("mode", getContentType(diff.metaA()));
|
||||
cmB.setOption("mode", getContentType(diff.metaB()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -923,7 +923,7 @@ public class SideBySide extends Screen {
|
||||
int offset = 6;
|
||||
|
||||
// Adjust for merge commits, which have two parent lines
|
||||
if (diff.text_b().startsWith("Merge")) {
|
||||
if (diff.textB().startsWith("Merge")) {
|
||||
offset += 1;
|
||||
}
|
||||
|
||||
@@ -983,8 +983,8 @@ public class SideBySide extends Screen {
|
||||
|
||||
private String getContentType(DiffInfo.FileMeta meta) {
|
||||
if (prefs.syntaxHighlighting() && meta != null
|
||||
&& meta.content_type() != null) {
|
||||
ModeInfo m = ModeInfo.findMode(meta.content_type(), path);
|
||||
&& meta.contentType() != null) {
|
||||
ModeInfo m = ModeInfo.findMode(meta.contentType(), path);
|
||||
return m != null ? m.mime() : null;
|
||||
}
|
||||
return null;
|
||||
@@ -992,8 +992,8 @@ public class SideBySide extends Screen {
|
||||
|
||||
private void injectMode(DiffInfo diffInfo, AsyncCallback<Void> cb) {
|
||||
new ModeInjector()
|
||||
.add(getContentType(diffInfo.meta_a()))
|
||||
.add(getContentType(diffInfo.meta_b()))
|
||||
.add(getContentType(diffInfo.metaA()))
|
||||
.add(getContentType(diffInfo.metaB()))
|
||||
.inject(cb);
|
||||
}
|
||||
|
||||
@@ -1043,8 +1043,8 @@ public class SideBySide extends Screen {
|
||||
@Override
|
||||
public void onSuccess(DiffInfo info) {
|
||||
new ModeInjector()
|
||||
.add(getContentType(info.meta_a()))
|
||||
.add(getContentType(info.meta_b()))
|
||||
.add(getContentType(info.metaA()))
|
||||
.add(getContentType(info.metaB()))
|
||||
.inject(CallbackGroup.<Void> emptyCallback());
|
||||
}
|
||||
|
||||
@@ -1085,8 +1085,8 @@ public class SideBySide extends Screen {
|
||||
}
|
||||
|
||||
private static FileSize bucketFileSize(DiffInfo diff) {
|
||||
FileMeta a = diff.meta_a();
|
||||
FileMeta b = diff.meta_b();
|
||||
FileMeta a = diff.metaA();
|
||||
FileMeta b = diff.metaB();
|
||||
FileSize[] sizes = FileSize.values();
|
||||
for (int i = sizes.length - 1; 0 <= i; i--) {
|
||||
FileSize s = sizes[i];
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.google.gwt.core.client.JavaScriptObject;
|
||||
import com.google.gwt.core.client.JsArray;
|
||||
|
||||
public class EditFileInfo extends JavaScriptObject {
|
||||
public final native JsArray<DiffWebLinkInfo> web_links() /*-{ return this.web_links; }-*/;
|
||||
public final native JsArray<DiffWebLinkInfo> webLinks() /*-{ return this.web_links; }-*/;
|
||||
|
||||
protected EditFileInfo() {
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ public class EditScreen extends Screen {
|
||||
.get(group1.add(new AsyncCallback<DiffInfo>() {
|
||||
@Override
|
||||
public void onSuccess(DiffInfo diffInfo) {
|
||||
diffLinks = diffInfo.web_links();
|
||||
diffLinks = diffInfo.webLinks();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -377,7 +377,7 @@ public class EditScreen extends Screen {
|
||||
renderLinksToDiff();
|
||||
|
||||
if (editInfo != null) {
|
||||
renderLinks(Natives.asList(editInfo.web_links()));
|
||||
renderLinks(Natives.asList(editInfo.webLinks()));
|
||||
} else if (diffLinks != null) {
|
||||
renderLinks(Natives.asList(diffLinks));
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ public class GroupApi {
|
||||
} else {
|
||||
MemberInput input = MemberInput.create();
|
||||
for (String member : members) {
|
||||
input.add_member(member);
|
||||
input.addMember(member);
|
||||
}
|
||||
members(group).post(input, cb);
|
||||
}
|
||||
@@ -139,7 +139,7 @@ public class GroupApi {
|
||||
} else {
|
||||
MemberInput in = MemberInput.create();
|
||||
for (Integer id : ids) {
|
||||
in.add_member(id.toString());
|
||||
in.addMember(id.toString());
|
||||
}
|
||||
group(group).view("members.delete").post(in, cb);
|
||||
}
|
||||
@@ -172,7 +172,7 @@ public class GroupApi {
|
||||
} else {
|
||||
IncludedGroupInput input = IncludedGroupInput.create();
|
||||
for (String includedGroup : includedGroups) {
|
||||
input.add_group(includedGroup);
|
||||
input.addGroup(includedGroup);
|
||||
}
|
||||
groups(group).post(input, cb);
|
||||
}
|
||||
@@ -187,7 +187,7 @@ public class GroupApi {
|
||||
} else {
|
||||
IncludedGroupInput in = IncludedGroupInput.create();
|
||||
for (AccountGroup.UUID g : ids) {
|
||||
in.add_group(g.get());
|
||||
in.addGroup(g.get());
|
||||
}
|
||||
group(group).view("groups.delete").post(in, cb);
|
||||
}
|
||||
@@ -235,7 +235,7 @@ public class GroupApi {
|
||||
|
||||
private static class MemberInput extends JavaScriptObject {
|
||||
final native void init() /*-{ this.members = []; }-*/;
|
||||
final native void add_member(String n) /*-{ this.members.push(n); }-*/;
|
||||
final native void addMember(String n) /*-{ this.members.push(n); }-*/;
|
||||
|
||||
static MemberInput create() {
|
||||
MemberInput m = (MemberInput) createObject();
|
||||
@@ -249,7 +249,7 @@ public class GroupApi {
|
||||
|
||||
private static class IncludedGroupInput extends JavaScriptObject {
|
||||
final native void init() /*-{ this.groups = []; }-*/;
|
||||
final native void add_group(String n) /*-{ this.groups.push(n); }-*/;
|
||||
final native void addGroup(String n) /*-{ this.groups.push(n); }-*/;
|
||||
|
||||
static IncludedGroupInput create() {
|
||||
IncludedGroupInput g = (IncludedGroupInput) createObject();
|
||||
|
||||
@@ -345,7 +345,7 @@ public class CommentEditorPanel extends CommentPanel implements ClickHandler,
|
||||
if (c.getLine() > 0) {
|
||||
i.line(c.getLine());
|
||||
}
|
||||
i.in_reply_to(c.getParentUuid());
|
||||
i.inReplyTo(c.getParentUuid());
|
||||
i.message(c.getMessage());
|
||||
return i;
|
||||
}
|
||||
@@ -359,7 +359,7 @@ public class CommentEditorPanel extends CommentPanel implements ClickHandler,
|
||||
i.id()),
|
||||
i.line(),
|
||||
Gerrit.getUserAccount().getId(),
|
||||
i.in_reply_to(),
|
||||
i.inReplyTo(),
|
||||
i.updated());
|
||||
p.setMessage(i.message());
|
||||
p.setSide((short) (i.side() == Side.PARENT ? 0 : 1));
|
||||
|
||||
@@ -251,7 +251,7 @@ public class UnifiedPatchScreen extends Screen implements
|
||||
}
|
||||
|
||||
private List<WebLinkInfo> getWebLinks(DiffInfo diffInfo) {
|
||||
return diffInfo.unified_web_links();
|
||||
return diffInfo.unifiedWebLinks();
|
||||
}
|
||||
|
||||
private String getSideBySideDiffUrl() {
|
||||
|
||||
@@ -30,7 +30,7 @@ public class BranchInfo extends JavaScriptObject {
|
||||
public final native String revision() /*-{ return this.revision; }-*/;
|
||||
public final native boolean canDelete() /*-{ return this['can_delete'] ? true : false; }-*/;
|
||||
public final native NativeMap<ActionInfo> actions() /*-{ return this.actions }-*/;
|
||||
public final native JsArray<WebLinkInfo> web_links() /*-{ return this.web_links; }-*/;
|
||||
public final native JsArray<WebLinkInfo> webLinks() /*-{ return this.web_links; }-*/;
|
||||
|
||||
protected BranchInfo() {
|
||||
}
|
||||
|
||||
@@ -35,23 +35,23 @@ public class ConfigInfo extends JavaScriptObject {
|
||||
public final native String description()
|
||||
/*-{ return this.description }-*/;
|
||||
|
||||
public final native InheritedBooleanInfo require_change_id()
|
||||
public final native InheritedBooleanInfo requireChangeId()
|
||||
/*-{ return this.require_change_id; }-*/;
|
||||
|
||||
public final native InheritedBooleanInfo use_content_merge()
|
||||
public final native InheritedBooleanInfo useContentMerge()
|
||||
/*-{ return this.use_content_merge; }-*/;
|
||||
|
||||
public final native InheritedBooleanInfo use_contributor_agreements()
|
||||
public final native InheritedBooleanInfo useContributorAgreements()
|
||||
/*-{ return this.use_contributor_agreements; }-*/;
|
||||
|
||||
public final native InheritedBooleanInfo create_new_change_for_all_not_in_target()
|
||||
public final native InheritedBooleanInfo createNewChangeForAllNotInTarget()
|
||||
/*-{ return this.create_new_change_for_all_not_in_target; }-*/;
|
||||
|
||||
public final native InheritedBooleanInfo use_signed_off_by()
|
||||
public final native InheritedBooleanInfo useSignedOffBy()
|
||||
/*-{ return this.use_signed_off_by; }-*/;
|
||||
|
||||
public final SubmitType submit_type() {
|
||||
return SubmitType.valueOf(submit_typeRaw());
|
||||
public final SubmitType submitType() {
|
||||
return SubmitType.valueOf(submitTypeRaw());
|
||||
}
|
||||
|
||||
public final native NativeMap<NativeMap<ConfigParameterInfo>> pluginConfig()
|
||||
@@ -63,7 +63,7 @@ public class ConfigInfo extends JavaScriptObject {
|
||||
public final native NativeMap<ActionInfo> actions()
|
||||
/*-{ return this.actions; }-*/;
|
||||
|
||||
private final native String submit_typeRaw()
|
||||
private final native String submitTypeRaw()
|
||||
/*-{ return this.submit_type }-*/;
|
||||
|
||||
public final ProjectState state() {
|
||||
@@ -75,7 +75,7 @@ public class ConfigInfo extends JavaScriptObject {
|
||||
private final native String stateRaw()
|
||||
/*-{ return this.state }-*/;
|
||||
|
||||
public final native MaxObjectSizeLimitInfo max_object_size_limit()
|
||||
public final native MaxObjectSizeLimitInfo maxObjectSizeLimit()
|
||||
/*-{ return this.max_object_size_limit; }-*/;
|
||||
|
||||
private final native NativeMap<CommentLinkInfo> commentlinks0()
|
||||
@@ -131,13 +131,13 @@ public class ConfigInfo extends JavaScriptObject {
|
||||
public final native boolean value()
|
||||
/*-{ return this.value ? true : false; }-*/;
|
||||
|
||||
public final native boolean inherited_value()
|
||||
public final native boolean inheritedValue()
|
||||
/*-{ return this.inherited_value ? true : false; }-*/;
|
||||
|
||||
public final InheritableBoolean configured_value() {
|
||||
return InheritableBoolean.valueOf(configured_valueRaw());
|
||||
public final InheritableBoolean configuredValue() {
|
||||
return InheritableBoolean.valueOf(configuredValueRaw());
|
||||
}
|
||||
private final native String configured_valueRaw()
|
||||
private final native String configuredValueRaw()
|
||||
/*-{ return this.configured_value }-*/;
|
||||
|
||||
public final void setConfiguredValue(InheritableBoolean v) {
|
||||
@@ -152,8 +152,8 @@ public class ConfigInfo extends JavaScriptObject {
|
||||
|
||||
public static class MaxObjectSizeLimitInfo extends JavaScriptObject {
|
||||
public final native String value() /*-{ return this.value; }-*/;
|
||||
public final native String inherited_value() /*-{ return this.inherited_value; }-*/;
|
||||
public final native String configured_value() /*-{ return this.configured_value }-*/;
|
||||
public final native String inheritedValue() /*-{ return this.inherited_value; }-*/;
|
||||
public final native String configuredValue() /*-{ return this.configured_value }-*/;
|
||||
|
||||
protected MaxObjectSizeLimitInfo() {
|
||||
}
|
||||
@@ -179,8 +179,8 @@ public class ConfigInfo extends JavaScriptObject {
|
||||
|
||||
public static class ConfigParameterValue extends JavaScriptObject {
|
||||
final native void init() /*-{ this.values = []; }-*/;
|
||||
final native void add_value(String v) /*-{ this.values.push(v); }-*/;
|
||||
final native void set_value(String v) /*-{ if(v)this.value = v; }-*/;
|
||||
final native void addValue(String v) /*-{ this.values.push(v); }-*/;
|
||||
final native void setValue(String v) /*-{ if(v)this.value = v; }-*/;
|
||||
public static ConfigParameterValue create() {
|
||||
ConfigParameterValue v = createObject().cast();
|
||||
return v;
|
||||
@@ -189,13 +189,13 @@ public class ConfigInfo extends JavaScriptObject {
|
||||
public final ConfigParameterValue values(String[] values) {
|
||||
init();
|
||||
for (String v : values) {
|
||||
add_value(v);
|
||||
addValue(v);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public final ConfigParameterValue value(String v) {
|
||||
set_value(v);
|
||||
setValue(v);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ConfigInfoCache {
|
||||
}
|
||||
|
||||
public static void add(ChangeInfo info) {
|
||||
instance.changeToProject.put(info.legacy_id().get(), info.project());
|
||||
instance.changeToProject.put(info.legacyId().get(), info.project());
|
||||
}
|
||||
|
||||
private final LinkedHashMap<String, Entry> cache;
|
||||
|
||||
@@ -84,7 +84,7 @@ public class ProjectApi {
|
||||
} else {
|
||||
DeleteBranchesInput d = DeleteBranchesInput.create();
|
||||
for (String ref : refs) {
|
||||
d.add_branch(ref);
|
||||
d.addBranch(ref);
|
||||
}
|
||||
project(name).view("branches:delete").post(d, cb);
|
||||
}
|
||||
@@ -317,6 +317,6 @@ public class ProjectApi {
|
||||
}
|
||||
|
||||
final native void init() /*-{ this.branches = []; }-*/;
|
||||
final native void add_branch(String b) /*-{ this.branches.push(b); }-*/;
|
||||
final native void addBranch(String b) /*-{ this.branches.push(b); }-*/;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class ProjectInfo
|
||||
|
||||
public final native String name() /*-{ return this.name; }-*/;
|
||||
public final native String description() /*-{ return this.description; }-*/;
|
||||
public final native JsArray<WebLinkInfo> web_links() /*-{ return this.web_links; }-*/;
|
||||
public final native JsArray<WebLinkInfo> webLinks() /*-{ return this.web_links; }-*/;
|
||||
|
||||
public final ProjectState state() {
|
||||
return ProjectState.valueOf(getStringState());
|
||||
|
||||
@@ -71,8 +71,8 @@ public class AccountLinkPanel extends FlowPanel {
|
||||
return ai.email();
|
||||
} else if (ai.name() != null) {
|
||||
return ai.name();
|
||||
} else if (ai._account_id() != 0) {
|
||||
return "" + ai._account_id();
|
||||
} else if (ai._accountId() != 0) {
|
||||
return "" + ai._accountId();
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -51,10 +51,10 @@ public abstract class RebaseDialog extends CommentedActionDialog {
|
||||
String query = request.getQuery().toLowerCase();
|
||||
LinkedList<ChangeSuggestion> suggestions = new LinkedList<>();
|
||||
for (final ChangeInfo ci : changes) {
|
||||
if (changeId.equals(ci.legacy_id())) {
|
||||
if (changeId.equals(ci.legacyId())) {
|
||||
continue; // do not suggest current change
|
||||
}
|
||||
String id = String.valueOf(ci.legacy_id().get());
|
||||
String id = String.valueOf(ci.legacyId().get());
|
||||
if (id.contains(query) || ci.subject().toLowerCase().contains(query)) {
|
||||
suggestions.add(new ChangeSuggestion(ci));
|
||||
if (suggestions.size() >= 50) { // limit to 50 suggestions
|
||||
@@ -136,12 +136,12 @@ public abstract class RebaseDialog extends CommentedActionDialog {
|
||||
|
||||
@Override
|
||||
public String getDisplayString() {
|
||||
return String.valueOf(change.legacy_id().get()) + ": " + change.subject();
|
||||
return String.valueOf(change.legacyId().get()) + ": " + change.subject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getReplacementString() {
|
||||
return String.valueOf(change.legacy_id().get());
|
||||
return String.valueOf(change.legacyId().get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,8 +35,8 @@ public class TextMarker extends JavaScriptObject {
|
||||
|
||||
public static FromTo create(CommentRange range) {
|
||||
return create(
|
||||
Pos.create(range.start_line() - 1, range.start_character()),
|
||||
Pos.create(range.end_line() - 1, range.end_character()));
|
||||
Pos.create(range.startLine() - 1, range.startCharacter()),
|
||||
Pos.create(range.endLine() - 1, range.endCharacter()));
|
||||
}
|
||||
|
||||
public final native Pos from() /*-{ return this.from }-*/;
|
||||
|
||||
Reference in New Issue
Block a user