Suppress unused argument warnings in unavoidable cases
It would be nice if Eclipse were smart enough to ignore unused argument warnings on @UiHandler and @Option methods, but alas it does not. Suppressing these is ugly, but based on all the cleanup in the previous commit, the benefit outweighs the cost. Change-Id: I743917787ffb53be034eee3af2c525652fc18cb0
This commit is contained in:
parent
b942d0b0a2
commit
c8d85ab5f4
gerrit-gwtui/src/main/java/com/google/gerrit/client
MessageOfTheDayBar.java
admin
AccessSectionEditor.javaPermissionEditor.javaPermissionRuleEditor.javaProjectAccessEditor.javaProjectAccessScreen.java
change
ActionMessageBox.javaActions.javaChangeScreen2.javaCommitBox.javaEditFileBox.javaEditMessageBox.javaHashtags.javaNewChangeScreenBar.javaReplyBox.javaReviewers.javaTopic.javaUpdateAvailableBar.java
diff
patches
gerrit-pgm/src/main/java/com/google/gerrit/pgm
gerrit-server/src
main/java/com/google/gerrit/rules
test/java/com/google/gerrit/rules
gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands
@ -67,7 +67,7 @@ class MessageOfTheDayBar extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("dismiss")
|
||||
void onDismiss(ClickEvent e) {
|
||||
void onDismiss(@SuppressWarnings("unused") ClickEvent e) {
|
||||
removeFromParent();
|
||||
|
||||
for (HostPageData.Message m : motd) {
|
||||
|
@ -109,17 +109,17 @@ public class AccessSectionEditor extends Composite implements
|
||||
}
|
||||
|
||||
@UiHandler("deleteSection")
|
||||
void onDeleteHover(MouseOverEvent event) {
|
||||
void onDeleteHover(@SuppressWarnings("unused") MouseOverEvent event) {
|
||||
normal.addClassName(AdminResources.I.css().deleteSectionHover());
|
||||
}
|
||||
|
||||
@UiHandler("deleteSection")
|
||||
void onDeleteNonHover(MouseOutEvent event) {
|
||||
void onDeleteNonHover(@SuppressWarnings("unused") MouseOutEvent event) {
|
||||
normal.removeClassName(AdminResources.I.css().deleteSectionHover());
|
||||
}
|
||||
|
||||
@UiHandler("deleteSection")
|
||||
void onDeleteSection(ClickEvent event) {
|
||||
void onDeleteSection(@SuppressWarnings("unused") ClickEvent event) {
|
||||
isDeleted = true;
|
||||
|
||||
if (name.isVisible()
|
||||
@ -139,7 +139,7 @@ public class AccessSectionEditor extends Composite implements
|
||||
}
|
||||
|
||||
@UiHandler("undoDelete")
|
||||
void onUndoDelete(ClickEvent event) {
|
||||
void onUndoDelete(@SuppressWarnings("unused") ClickEvent event) {
|
||||
isDeleted = false;
|
||||
deleted.getStyle().setDisplay(Display.NONE);
|
||||
normal.getStyle().setDisplay(Display.BLOCK);
|
||||
|
@ -145,31 +145,31 @@ public class PermissionEditor extends Composite implements Editor<Permission>,
|
||||
}
|
||||
|
||||
@UiHandler("deletePermission")
|
||||
void onDeleteHover(MouseOverEvent event) {
|
||||
void onDeleteHover(@SuppressWarnings("unused") MouseOverEvent event) {
|
||||
addStyleName(AdminResources.I.css().deleteSectionHover());
|
||||
}
|
||||
|
||||
@UiHandler("deletePermission")
|
||||
void onDeleteNonHover(MouseOutEvent event) {
|
||||
void onDeleteNonHover(@SuppressWarnings("unused") MouseOutEvent event) {
|
||||
removeStyleName(AdminResources.I.css().deleteSectionHover());
|
||||
}
|
||||
|
||||
@UiHandler("deletePermission")
|
||||
void onDeletePermission(ClickEvent event) {
|
||||
void onDeletePermission(@SuppressWarnings("unused") ClickEvent event) {
|
||||
isDeleted = true;
|
||||
normal.getStyle().setDisplay(Display.NONE);
|
||||
deleted.getStyle().setDisplay(Display.BLOCK);
|
||||
}
|
||||
|
||||
@UiHandler("undoDelete")
|
||||
void onUndoDelete(ClickEvent event) {
|
||||
void onUndoDelete(@SuppressWarnings("unused") ClickEvent event) {
|
||||
isDeleted = false;
|
||||
deleted.getStyle().setDisplay(Display.NONE);
|
||||
normal.getStyle().setDisplay(Display.BLOCK);
|
||||
}
|
||||
|
||||
@UiHandler("beginAddRule")
|
||||
void onBeginAddRule(ClickEvent event) {
|
||||
void onBeginAddRule(@SuppressWarnings("unused") ClickEvent event) {
|
||||
beginAddRule();
|
||||
}
|
||||
|
||||
@ -186,7 +186,7 @@ public class PermissionEditor extends Composite implements Editor<Permission>,
|
||||
}
|
||||
|
||||
@UiHandler("addRule")
|
||||
void onAddGroupByClick(ClickEvent event) {
|
||||
void onAddGroupByClick(@SuppressWarnings("unused") ClickEvent event) {
|
||||
GroupReference ref = groupToAdd.getValue();
|
||||
if (ref != null) {
|
||||
addGroup(ref);
|
||||
@ -204,12 +204,13 @@ public class PermissionEditor extends Composite implements Editor<Permission>,
|
||||
}
|
||||
|
||||
@UiHandler("groupToAdd")
|
||||
void onAbortAddGroup(CloseEvent<GroupReferenceBox> event) {
|
||||
void onAbortAddGroup(
|
||||
@SuppressWarnings("unused") CloseEvent<GroupReferenceBox> event) {
|
||||
hideAddGroup();
|
||||
}
|
||||
|
||||
@UiHandler("hideAddGroup")
|
||||
void hideAddGroup(ClickEvent event) {
|
||||
void hideAddGroup(@SuppressWarnings("unused") ClickEvent event) {
|
||||
hideAddGroup();
|
||||
}
|
||||
|
||||
|
@ -176,14 +176,14 @@ public class PermissionRuleEditor extends Composite implements
|
||||
}
|
||||
|
||||
@UiHandler("deleteRule")
|
||||
void onDeleteRule(ClickEvent event) {
|
||||
void onDeleteRule(@SuppressWarnings("unused") ClickEvent event) {
|
||||
isDeleted = true;
|
||||
normal.getStyle().setDisplay(Display.NONE);
|
||||
deleted.getStyle().setDisplay(Display.BLOCK);
|
||||
}
|
||||
|
||||
@UiHandler("undoDelete")
|
||||
void onUndoDelete(ClickEvent event) {
|
||||
void onUndoDelete(@SuppressWarnings("unused") ClickEvent event) {
|
||||
isDeleted = false;
|
||||
deleted.getStyle().setDisplay(Display.NONE);
|
||||
normal.getStyle().setDisplay(Display.BLOCK);
|
||||
|
@ -84,7 +84,7 @@ public class ProjectAccessEditor extends Composite implements
|
||||
}
|
||||
|
||||
@UiHandler("addSection")
|
||||
void onAddSection(ClickEvent event) {
|
||||
void onAddSection(@SuppressWarnings("unused") ClickEvent event) {
|
||||
int index = local.getList().size();
|
||||
local.getList().add(new AccessSection("refs/heads/*"));
|
||||
|
||||
|
@ -159,7 +159,7 @@ public class ProjectAccessScreen extends ProjectScreen {
|
||||
}
|
||||
|
||||
@UiHandler("edit")
|
||||
void onEdit(ClickEvent event) {
|
||||
void onEdit(@SuppressWarnings("unused") ClickEvent event) {
|
||||
resetEditors();
|
||||
|
||||
edit.setEnabled(false);
|
||||
@ -184,12 +184,12 @@ public class ProjectAccessScreen extends ProjectScreen {
|
||||
}
|
||||
|
||||
@UiHandler(value={"cancel1", "cancel2"})
|
||||
void onCancel(ClickEvent event) {
|
||||
void onCancel(@SuppressWarnings("unused") ClickEvent event) {
|
||||
Gerrit.display(PageLinks.toProjectAcceess(getProjectKey()));
|
||||
}
|
||||
|
||||
@UiHandler("commit")
|
||||
void onCommit(ClickEvent event) {
|
||||
void onCommit(@SuppressWarnings("unused") ClickEvent event) {
|
||||
final ProjectAccess access = driver.flush();
|
||||
|
||||
if (driver.hasErrors()) {
|
||||
@ -267,7 +267,7 @@ public class ProjectAccessScreen extends ProjectScreen {
|
||||
}
|
||||
|
||||
@UiHandler("review")
|
||||
void onReview(ClickEvent event) {
|
||||
void onReview(@SuppressWarnings("unused") ClickEvent event) {
|
||||
final ProjectAccess access = driver.flush();
|
||||
|
||||
if (driver.hasErrors()) {
|
||||
|
@ -98,7 +98,7 @@ abstract class ActionMessageBox extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("send")
|
||||
void onSend(ClickEvent e) {
|
||||
void onSend(@SuppressWarnings("unused") ClickEvent e) {
|
||||
send(message.getValue().trim());
|
||||
}
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ class Actions extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("followUp")
|
||||
void onFollowUp(ClickEvent e) {
|
||||
void onFollowUp(@SuppressWarnings("unused") ClickEvent e) {
|
||||
if (followUpAction == null) {
|
||||
followUpAction = new FollowUpAction(followUp, project,
|
||||
branch, key);
|
||||
@ -194,7 +194,7 @@ class Actions extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("abandon")
|
||||
void onAbandon(ClickEvent e) {
|
||||
void onAbandon(@SuppressWarnings("unused") ClickEvent e) {
|
||||
if (abandonAction == null) {
|
||||
abandonAction = new AbandonAction(abandon, changeId);
|
||||
}
|
||||
@ -202,37 +202,37 @@ class Actions extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("publish")
|
||||
void onPublish(ClickEvent e) {
|
||||
void onPublish(@SuppressWarnings("unused") ClickEvent e) {
|
||||
DraftActions.publish(changeId, revision);
|
||||
}
|
||||
|
||||
@UiHandler("deleteEdit")
|
||||
void onDeleteEdit(ClickEvent e) {
|
||||
void onDeleteEdit(@SuppressWarnings("unused") ClickEvent e) {
|
||||
EditActions.deleteEdit(changeId);
|
||||
}
|
||||
|
||||
@UiHandler("publishEdit")
|
||||
void onPublishEdit(ClickEvent e) {
|
||||
void onPublishEdit(@SuppressWarnings("unused") ClickEvent e) {
|
||||
EditActions.publishEdit(changeId);
|
||||
}
|
||||
|
||||
@UiHandler("rebaseEdit")
|
||||
void onRebaseEdit(ClickEvent e) {
|
||||
void onRebaseEdit(@SuppressWarnings("unused") ClickEvent e) {
|
||||
EditActions.rebaseEdit(changeId);
|
||||
}
|
||||
|
||||
@UiHandler("deleteRevision")
|
||||
void onDeleteRevision(ClickEvent e) {
|
||||
void onDeleteRevision(@SuppressWarnings("unused") ClickEvent e) {
|
||||
DraftActions.delete(changeId, revision);
|
||||
}
|
||||
|
||||
@UiHandler("deleteChange")
|
||||
void onDeleteChange(ClickEvent e) {
|
||||
void onDeleteChange(@SuppressWarnings("unused") ClickEvent e) {
|
||||
DraftActions.delete(changeId);
|
||||
}
|
||||
|
||||
@UiHandler("restore")
|
||||
void onRestore(ClickEvent e) {
|
||||
void onRestore(@SuppressWarnings("unused") ClickEvent e) {
|
||||
if (restoreAction == null) {
|
||||
restoreAction = new RestoreAction(restore, changeId);
|
||||
}
|
||||
@ -240,22 +240,22 @@ class Actions extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("rebase")
|
||||
void onRebase(ClickEvent e) {
|
||||
void onRebase(@SuppressWarnings("unused") ClickEvent e) {
|
||||
RebaseAction.call(changeId, revision);
|
||||
}
|
||||
|
||||
@UiHandler("submit")
|
||||
void onSubmit(ClickEvent e) {
|
||||
void onSubmit(@SuppressWarnings("unused") ClickEvent e) {
|
||||
SubmitAction.call(changeInfo, changeInfo.revision(revision));
|
||||
}
|
||||
|
||||
@UiHandler("cherrypick")
|
||||
void onCherryPick(ClickEvent e) {
|
||||
void onCherryPick(@SuppressWarnings("unused") ClickEvent e) {
|
||||
CherryPickAction.call(cherrypick, changeInfo, revision, project, message);
|
||||
}
|
||||
|
||||
@UiHandler("revert")
|
||||
void onRevert(ClickEvent e) {
|
||||
void onRevert(@SuppressWarnings("unused") ClickEvent e) {
|
||||
RevertAction.call(revert, changeId, revision, subject);
|
||||
}
|
||||
|
||||
|
@ -538,22 +538,22 @@ public class ChangeScreen2 extends Screen {
|
||||
}
|
||||
|
||||
@UiHandler("includedIn")
|
||||
void onIncludedIn(ClickEvent e) {
|
||||
void onIncludedIn(@SuppressWarnings("unused") ClickEvent e) {
|
||||
includedInAction.show();
|
||||
}
|
||||
|
||||
@UiHandler("download")
|
||||
void onDownload(ClickEvent e) {
|
||||
void onDownload(@SuppressWarnings("unused") ClickEvent e) {
|
||||
downloadAction.show();
|
||||
}
|
||||
|
||||
@UiHandler("patchSets")
|
||||
void onPatchSets(ClickEvent e) {
|
||||
void onPatchSets(@SuppressWarnings("unused") ClickEvent e) {
|
||||
patchSetsAction.show();
|
||||
}
|
||||
|
||||
@UiHandler("reply")
|
||||
void onReply(ClickEvent e) {
|
||||
void onReply(@SuppressWarnings("unused") ClickEvent e) {
|
||||
onReply();
|
||||
}
|
||||
|
||||
@ -572,17 +572,17 @@ public class ChangeScreen2 extends Screen {
|
||||
}
|
||||
|
||||
@UiHandler("editMessage")
|
||||
void onEditMessage(ClickEvent e) {
|
||||
void onEditMessage(@SuppressWarnings("unused") ClickEvent e) {
|
||||
editMessageAction.onEdit();
|
||||
}
|
||||
|
||||
@UiHandler("openAll")
|
||||
void onOpenAll(ClickEvent e) {
|
||||
void onOpenAll(@SuppressWarnings("unused") ClickEvent e) {
|
||||
files.openAll();
|
||||
}
|
||||
|
||||
@UiHandler("editMode")
|
||||
void onEditMode(ClickEvent e) {
|
||||
void onEditMode(@SuppressWarnings("unused") ClickEvent e) {
|
||||
fileTableMode = FileTable.Mode.EDIT;
|
||||
refreshFileTable();
|
||||
editMode.setVisible(false);
|
||||
@ -591,7 +591,7 @@ public class ChangeScreen2 extends Screen {
|
||||
}
|
||||
|
||||
@UiHandler("reviewMode")
|
||||
void onReviewMode(ClickEvent e) {
|
||||
void onReviewMode(@SuppressWarnings("unused") ClickEvent e) {
|
||||
fileTableMode = FileTable.Mode.REVIEW;
|
||||
refreshFileTable();
|
||||
editMode.setVisible(true);
|
||||
@ -600,7 +600,7 @@ public class ChangeScreen2 extends Screen {
|
||||
}
|
||||
|
||||
@UiHandler("addFile")
|
||||
void onAddFile(ClickEvent e) {
|
||||
void onAddFile(@SuppressWarnings("unused") ClickEvent e) {
|
||||
editFileAction.onEdit();
|
||||
}
|
||||
|
||||
@ -613,7 +613,7 @@ public class ChangeScreen2 extends Screen {
|
||||
}
|
||||
|
||||
@UiHandler("expandAll")
|
||||
void onExpandAll(ClickEvent e) {
|
||||
void onExpandAll(@SuppressWarnings("unused") ClickEvent e) {
|
||||
int n = history.getWidgetCount();
|
||||
for (int i = 0; i < n; i++) {
|
||||
((Message) history.getWidget(i)).setOpen(true);
|
||||
@ -623,7 +623,7 @@ public class ChangeScreen2 extends Screen {
|
||||
}
|
||||
|
||||
@UiHandler("collapseAll")
|
||||
void onCollapseAll(ClickEvent e) {
|
||||
void onCollapseAll(@SuppressWarnings("unused") ClickEvent e) {
|
||||
int n = history.getWidgetCount();
|
||||
for (int i = 0; i < n; i++) {
|
||||
((Message) history.getWidget(i)).setOpen(false);
|
||||
@ -633,7 +633,7 @@ public class ChangeScreen2 extends Screen {
|
||||
}
|
||||
|
||||
@UiHandler("diffBase")
|
||||
void onChangeRevision(ChangeEvent e) {
|
||||
void onChangeRevision(@SuppressWarnings("unused") ChangeEvent e) {
|
||||
int idx = diffBase.getSelectedIndex();
|
||||
if (0 <= idx) {
|
||||
String n = diffBase.getValue(idx);
|
||||
|
@ -87,7 +87,7 @@ class CommitBox extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("more")
|
||||
void onMore(ClickEvent e) {
|
||||
void onMore(@SuppressWarnings("unused") ClickEvent e) {
|
||||
if (expanded) {
|
||||
removeStyleName(style.expanded());
|
||||
addStyleName(style.collapsed());
|
||||
|
@ -80,7 +80,7 @@ class EditFileBox extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("save")
|
||||
void onSave(ClickEvent e) {
|
||||
void onSave(@SuppressWarnings("unused") ClickEvent e) {
|
||||
ChangeFileApi.putContent(id, file.getText(), content.getText(),
|
||||
new AsyncCallback<VoidResult>() {
|
||||
@Override
|
||||
@ -96,7 +96,7 @@ class EditFileBox extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("cancel")
|
||||
void onCancel(ClickEvent e) {
|
||||
void onCancel(@SuppressWarnings("unused") ClickEvent e) {
|
||||
hide();
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ class EditMessageBox extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("save")
|
||||
void onSave(ClickEvent e) {
|
||||
void onSave(@SuppressWarnings("unused") ClickEvent e) {
|
||||
save.setEnabled(false);
|
||||
ChangeApi.message(changeId.get(), revision, message.getText().trim(),
|
||||
new GerritCallback<JavaScriptObject>() {
|
||||
@ -93,7 +93,7 @@ class EditMessageBox extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("cancel")
|
||||
void onCancel(ClickEvent e) {
|
||||
void onCancel(@SuppressWarnings("unused") ClickEvent e) {
|
||||
message.setText("");
|
||||
hide();
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ public class Hashtags extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("openForm")
|
||||
void onOpenForm(ClickEvent e) {
|
||||
void onOpenForm(@SuppressWarnings("unused") ClickEvent e) {
|
||||
onOpenForm();
|
||||
}
|
||||
|
||||
@ -182,14 +182,14 @@ public class Hashtags extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("cancel")
|
||||
void onCancel(ClickEvent e) {
|
||||
void onCancel(@SuppressWarnings("unused") ClickEvent e) {
|
||||
openForm.setVisible(true);
|
||||
UIObject.setVisible(form, false);
|
||||
hashtagTextBox.setFocus(false);
|
||||
}
|
||||
|
||||
@UiHandler("add")
|
||||
void onAdd(ClickEvent e) {
|
||||
void onAdd(@SuppressWarnings("unused") ClickEvent e) {
|
||||
String hashtag = hashtagTextBox.getText();
|
||||
if (!hashtag.isEmpty()) {
|
||||
addHashtag(hashtag);
|
||||
|
@ -65,13 +65,13 @@ class NewChangeScreenBar extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("keepOld")
|
||||
void onKeepOld(ClickEvent e) {
|
||||
void onKeepOld(@SuppressWarnings("unused") ClickEvent e) {
|
||||
save(ChangeScreen.OLD_UI);
|
||||
Gerrit.display(PageLinks.toChange(id));
|
||||
}
|
||||
|
||||
@UiHandler("keepNew")
|
||||
void onKeepNew(ClickEvent e) {
|
||||
void onKeepNew(@SuppressWarnings("unused") ClickEvent e) {
|
||||
save(ChangeScreen.CHANGE_SCREEN2);
|
||||
}
|
||||
|
||||
|
@ -188,7 +188,7 @@ class ReplyBox extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("post")
|
||||
void onPost(ClickEvent e) {
|
||||
void onPost(@SuppressWarnings("unused") ClickEvent e) {
|
||||
postReview();
|
||||
}
|
||||
|
||||
@ -214,7 +214,7 @@ class ReplyBox extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("cancel")
|
||||
void onCancel(ClickEvent e) {
|
||||
void onCancel(@SuppressWarnings("unused") ClickEvent e) {
|
||||
message.setText("");
|
||||
hide();
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ public class Reviewers extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("openForm")
|
||||
void onOpenForm(ClickEvent e) {
|
||||
void onOpenForm(@SuppressWarnings("unused") ClickEvent e) {
|
||||
onOpenForm();
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ public class Reviewers extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("add")
|
||||
void onAdd(ClickEvent e) {
|
||||
void onAdd(@SuppressWarnings("unused") ClickEvent e) {
|
||||
String reviewer = suggestBox.getText();
|
||||
if (!reviewer.isEmpty()) {
|
||||
addReviewer(reviewer, false);
|
||||
@ -147,13 +147,13 @@ public class Reviewers extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("addme")
|
||||
void onAddMe(ClickEvent e) {
|
||||
void onAddMe(@SuppressWarnings("unused") ClickEvent e) {
|
||||
String accountId = String.valueOf(Gerrit.getUserAccountInfo()._account_id());
|
||||
addReviewer(accountId, false);
|
||||
}
|
||||
|
||||
@UiHandler("cancel")
|
||||
void onCancel(ClickEvent e) {
|
||||
void onCancel(@SuppressWarnings("unused") ClickEvent e) {
|
||||
openForm.setVisible(true);
|
||||
UIObject.setVisible(form, false);
|
||||
suggestBox.setFocus(false);
|
||||
|
@ -105,7 +105,7 @@ class Topic extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("cancel")
|
||||
void onCancel(ClickEvent e) {
|
||||
void onCancel(@SuppressWarnings("unused") ClickEvent e) {
|
||||
input.setFocus(false);
|
||||
UIObject.setVisible(form, false);
|
||||
}
|
||||
@ -121,7 +121,7 @@ class Topic extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("save")
|
||||
void onSave(ClickEvent e) {
|
||||
void onSave(@SuppressWarnings("unused") ClickEvent e) {
|
||||
ChangeApi.topic(
|
||||
psId.getParentKey().get(),
|
||||
input.getValue().trim(),
|
||||
|
@ -61,12 +61,12 @@ abstract class UpdateAvailableBar extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("show")
|
||||
void onShow(ClickEvent e) {
|
||||
void onShow(@SuppressWarnings("unused") ClickEvent e) {
|
||||
onShow();
|
||||
}
|
||||
|
||||
@UiHandler("ignore")
|
||||
void onIgnore(ClickEvent e) {
|
||||
void onIgnore(@SuppressWarnings("unused") ClickEvent e) {
|
||||
onIgnore(updated);
|
||||
removeFromParent();
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ class DraftBox extends CommentBox {
|
||||
}
|
||||
|
||||
@UiHandler("message")
|
||||
void onMessageDoubleClick(DoubleClickEvent e) {
|
||||
void onMessageDoubleClick(@SuppressWarnings("unused") DoubleClickEvent e) {
|
||||
setEdit(true);
|
||||
}
|
||||
|
||||
@ -389,7 +389,7 @@ class DraftBox extends CommentBox {
|
||||
}
|
||||
|
||||
@UiHandler("editArea")
|
||||
void onBlur(BlurEvent e) {
|
||||
void onBlur(@SuppressWarnings("unused") BlurEvent e) {
|
||||
resizeTimer.cancel();
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ class Header extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("preferences")
|
||||
void onPreferences(ClickEvent e) {
|
||||
void onPreferences(@SuppressWarnings("unused") ClickEvent e) {
|
||||
prefsAction.show();
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ class PatchSetSelectBox2 extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("icon")
|
||||
void onIconClick(ClickEvent e) {
|
||||
void onIconClick(@SuppressWarnings("unused") ClickEvent e) {
|
||||
parent.getCmFromSide(side).scrollToY(0);
|
||||
parent.getCommentManager().insertNewDraft(side, 0);
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ class PreferencesBox extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("ignoreWhitespace")
|
||||
void onIgnoreWhitespace(ChangeEvent e) {
|
||||
void onIgnoreWhitespace(@SuppressWarnings("unused") ChangeEvent e) {
|
||||
prefs.ignoreWhitespace(Whitespace.valueOf(
|
||||
ignoreWhitespace.getValue(ignoreWhitespace.getSelectedIndex())));
|
||||
view.reloadDiffInfo();
|
||||
@ -347,7 +347,7 @@ class PreferencesBox extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("mode")
|
||||
void onMode(ChangeEvent e) {
|
||||
void onMode(@SuppressWarnings("unused") ChangeEvent e) {
|
||||
final String m = mode.getValue(mode.getSelectedIndex());
|
||||
prefs.syntaxHighlighting(true);
|
||||
syntaxHighlighting.setValue(true, false);
|
||||
@ -389,7 +389,7 @@ class PreferencesBox extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("theme")
|
||||
void onTheme(ChangeEvent e) {
|
||||
void onTheme(@SuppressWarnings("unused") ChangeEvent e) {
|
||||
prefs.theme(Theme.valueOf(theme.getValue(theme.getSelectedIndex())));
|
||||
view.setThemeStyles(prefs.theme().isDark());
|
||||
view.operation(new Runnable() {
|
||||
@ -403,12 +403,12 @@ class PreferencesBox extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("apply")
|
||||
void onApply(ClickEvent e) {
|
||||
void onApply(@SuppressWarnings("unused") ClickEvent e) {
|
||||
close();
|
||||
}
|
||||
|
||||
@UiHandler("save")
|
||||
void onSave(ClickEvent e) {
|
||||
void onSave(@SuppressWarnings("unused") ClickEvent e) {
|
||||
AccountApi.putDiffPreferences(prefs, new GerritCallback<DiffPreferences>() {
|
||||
@Override
|
||||
public void onSuccess(DiffPreferences result) {
|
||||
|
@ -174,7 +174,7 @@ class SkipBar extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("skipNum")
|
||||
void onExpandAll(ClickEvent e) {
|
||||
void onExpandAll(@SuppressWarnings("unused") ClickEvent e) {
|
||||
expandAll();
|
||||
updateSelection();
|
||||
otherBar.updateSelection();
|
||||
@ -189,13 +189,13 @@ class SkipBar extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("upArrow")
|
||||
void onExpandBefore(ClickEvent e) {
|
||||
void onExpandBefore(@SuppressWarnings("unused") ClickEvent e) {
|
||||
expandBefore(NUM_ROWS_TO_EXPAND);
|
||||
cm.focus();
|
||||
}
|
||||
|
||||
@UiHandler("downArrow")
|
||||
void onExpandAfter(ClickEvent e) {
|
||||
void onExpandAfter(@SuppressWarnings("unused") ClickEvent e) {
|
||||
expandAfter();
|
||||
otherBar.expandAfter();
|
||||
manager.getOverviewBar().refresh();
|
||||
|
@ -230,12 +230,12 @@ public class PatchScriptSettingsPanel extends Composite {
|
||||
}
|
||||
|
||||
@UiHandler("update")
|
||||
void onUpdate(ClickEvent event) {
|
||||
void onUpdate(@SuppressWarnings("unused") ClickEvent event) {
|
||||
update();
|
||||
}
|
||||
|
||||
@UiHandler("save")
|
||||
void onSave(ClickEvent event) {
|
||||
void onSave(@SuppressWarnings("unused") ClickEvent event) {
|
||||
save();
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ public class Daemon extends SiteProgram {
|
||||
private Boolean httpd;
|
||||
|
||||
@Option(name = "--disable-httpd", usage = "Disable the internal HTTP daemon")
|
||||
void setDisableHttpd(final boolean arg) {
|
||||
void setDisableHttpd(@SuppressWarnings("unused") boolean arg) {
|
||||
httpd = false;
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ public class Daemon extends SiteProgram {
|
||||
private boolean sshd = true;
|
||||
|
||||
@Option(name = "--disable-sshd", usage = "Disable the internal SSH daemon")
|
||||
void setDisableSshd(final boolean arg) {
|
||||
void setDisableSshd(@SuppressWarnings("unused") boolean arg) {
|
||||
sshd = false;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,12 @@ public class StoredValue<T> {
|
||||
env.set(this, obj);
|
||||
}
|
||||
|
||||
/** Creates a value to store, returns null by default. */
|
||||
/**
|
||||
* Creates a value to store, returns null by default.
|
||||
*
|
||||
* @param engine Prolog engine.
|
||||
* @return new value.
|
||||
*/
|
||||
protected T createValue(Prolog engine) {
|
||||
return null;
|
||||
}
|
||||
|
@ -82,6 +82,11 @@ public abstract class PrologTestCase {
|
||||
machine = PrologMachineCopy.save(env);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up the Prolog environment.
|
||||
*
|
||||
* @param env Prolog environment.
|
||||
*/
|
||||
protected void setUpEnvironment(PrologEnvironment env) {
|
||||
}
|
||||
|
||||
|
@ -90,27 +90,27 @@ final class CreateProjectCommand extends SshCommand {
|
||||
private InheritableBoolean createNewChangeForAllNotInTarget = InheritableBoolean.INHERIT;
|
||||
|
||||
@Option(name = "--use-contributor-agreements", aliases = {"--ca"}, usage = "if contributor agreement is required")
|
||||
void setUseContributorArgreements(boolean on) {
|
||||
void setUseContributorArgreements(@SuppressWarnings("unused") boolean on) {
|
||||
contributorAgreements = InheritableBoolean.TRUE;
|
||||
}
|
||||
|
||||
@Option(name = "--use-signed-off-by", aliases = {"--so"}, usage = "if signed-off-by is required")
|
||||
void setUseSignedOffBy(boolean on) {
|
||||
void setUseSignedOffBy(@SuppressWarnings("unused") boolean on) {
|
||||
signedOffBy = InheritableBoolean.TRUE;
|
||||
}
|
||||
|
||||
@Option(name = "--use-content-merge", usage = "allow automatic conflict resolving within files")
|
||||
void setUseContentMerge(boolean on) {
|
||||
void setUseContentMerge(@SuppressWarnings("unused") boolean on) {
|
||||
contentMerge = InheritableBoolean.TRUE;
|
||||
}
|
||||
|
||||
@Option(name = "--require-change-id", aliases = {"--id"}, usage = "if change-id is required")
|
||||
void setRequireChangeId(boolean on) {
|
||||
void setRequireChangeId(@SuppressWarnings("unused") boolean on) {
|
||||
requireChangeID = InheritableBoolean.TRUE;
|
||||
}
|
||||
|
||||
@Option(name = "--create-new-change-for-all-not-in-target", aliases = {"--ncfa"}, usage = "if a new change will be created for every commit not in target branch")
|
||||
void setNewChangeForAllNotInTarget(boolean on) {
|
||||
void setNewChangeForAllNotInTarget(@SuppressWarnings("unused") boolean on) {
|
||||
createNewChangeForAllNotInTarget = InheritableBoolean.TRUE;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ final class PluginInstallCommand extends SshCommand {
|
||||
private String name;
|
||||
|
||||
@Option(name = "-")
|
||||
void useInput(boolean on) {
|
||||
void useInput(@SuppressWarnings("unused") boolean on) {
|
||||
source = "-";
|
||||
}
|
||||
|
||||
|
@ -66,42 +66,42 @@ final class SetProjectCommand extends SshCommand {
|
||||
private InheritableBoolean requireChangeID;
|
||||
|
||||
@Option(name = "--use-contributor-agreements", aliases = {"--ca"}, usage = "if contributor agreement is required")
|
||||
void setUseContributorArgreements(boolean on) {
|
||||
void setUseContributorArgreements(@SuppressWarnings("unused") boolean on) {
|
||||
contributorAgreements = InheritableBoolean.TRUE;
|
||||
}
|
||||
|
||||
@Option(name = "--no-contributor-agreements", aliases = {"--nca"}, usage = "if contributor agreement is not required")
|
||||
void setNoContributorArgreements(boolean on) {
|
||||
void setNoContributorArgreements(@SuppressWarnings("unused") boolean on) {
|
||||
contributorAgreements = InheritableBoolean.FALSE;
|
||||
}
|
||||
|
||||
@Option(name = "--use-signed-off-by", aliases = {"--so"}, usage = "if signed-off-by is required")
|
||||
void setUseSignedOffBy(boolean on) {
|
||||
void setUseSignedOffBy(@SuppressWarnings("unused") boolean on) {
|
||||
signedOffBy = InheritableBoolean.TRUE;
|
||||
}
|
||||
|
||||
@Option(name = "--no-signed-off-by", aliases = {"--nso"}, usage = "if signed-off-by is not required")
|
||||
void setNoSignedOffBy(boolean on) {
|
||||
void setNoSignedOffBy(@SuppressWarnings("unused") boolean on) {
|
||||
signedOffBy = InheritableBoolean.FALSE;
|
||||
}
|
||||
|
||||
@Option(name = "--use-content-merge", usage = "allow automatic conflict resolving within files")
|
||||
void setUseContentMerge(boolean on) {
|
||||
void setUseContentMerge(@SuppressWarnings("unused") boolean on) {
|
||||
contentMerge = InheritableBoolean.TRUE;
|
||||
}
|
||||
|
||||
@Option(name = "--no-content-merge", usage = "don't allow automatic conflict resolving within files")
|
||||
void setNoContentMerge(boolean on) {
|
||||
void setNoContentMerge(@SuppressWarnings("unused") boolean on) {
|
||||
contentMerge = InheritableBoolean.FALSE;
|
||||
}
|
||||
|
||||
@Option(name = "--require-change-id", aliases = {"--id"}, usage = "if change-id is required")
|
||||
void setRequireChangeId(boolean on) {
|
||||
void setRequireChangeId(@SuppressWarnings("unused") boolean on) {
|
||||
requireChangeID = InheritableBoolean.TRUE;
|
||||
}
|
||||
|
||||
@Option(name = "--no-change-id", aliases = {"--nid"}, usage = "if change-id is not required")
|
||||
void setNoChangeId(boolean on) {
|
||||
void setNoChangeId(@SuppressWarnings("unused") boolean on) {
|
||||
requireChangeID = InheritableBoolean.FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user