diff --git a/Documentation/rest-api-accounts.txt b/Documentation/rest-api-accounts.txt index a320a542a4..6920c4c12a 100644 --- a/Documentation/rest-api-accounts.txt +++ b/Documentation/rest-api-accounts.txt @@ -1256,7 +1256,7 @@ link:#diff-preferences-info[DiffPreferencesInfo] entity. { "context": 10, "theme": "DEFAULT", - "ignore_whitespace": "IGNORE_ALL_SPACE", + "ignore_whitespace": "IGNORE_ALL", "intraline_difference": true, "line_length": 100, "show_tabs": true, @@ -1285,7 +1285,7 @@ link:#diff-preferences-input[DiffPreferencesInput] entity. { "context": 10, "theme": "ECLIPSE", - "ignore_whitespace": "IGNORE_ALL_SPACE", + "ignore_whitespace": "IGNORE_ALL", "intraline_difference": true, "line_length": 100, "show_line_endings": true, @@ -1309,7 +1309,7 @@ link:#diff-preferences-info[DiffPreferencesInfo] entity. { "context": 10, "theme": "ECLIPSE", - "ignore_whitespace": "IGNORE_ALL_SPACE", + "ignore_whitespace": "IGNORE_ALL", "intraline_difference": true, "line_length": 100, "show_line_endings": true, @@ -1666,8 +1666,8 @@ Whether all inline comments should be automatically expanded. |`ignore_whitespace` || Whether whitespace changes should be ignored and if yes, which whitespace changes should be ignored. + -Allowed values are `IGNORE_NONE`, `IGNORE_SPACE_AT_EOL`, -`IGNORE_SPACE_CHANGE`, `IGNORE_ALL_SPACE`. +Allowed values are `IGNORE_NONE`, `IGNORE_TRAILING`, +`IGNORE_LEADING_AND_TRAILING`, `IGNORE_ALL`. |`intraline_difference` |not set if `false`| Whether intraline differences should be highlighted. |`line_length` || @@ -1722,8 +1722,8 @@ Whether all inline comments should be automatically expanded. |`ignore_whitespace` |optional| Whether whitespace changes should be ignored and if yes, which whitespace changes should be ignored. + -Allowed values are `IGNORE_NONE`, `IGNORE_SPACE_AT_EOL`, -`IGNORE_SPACE_CHANGE`, `IGNORE_ALL_SPACE`. +Allowed values are `IGNORE_NONE`, `IGNORE_TRAILING`, +`IGNORE_LEADING_AND_TRAILING`, `IGNORE_ALL`. |`intraline_difference` |optional| Whether intraline differences should be highlighted. |`line_length` |optional| diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/DiffApi.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/DiffApi.java index 800da9182d..0d8e435cfd 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/DiffApi.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/DiffApi.java @@ -74,11 +74,11 @@ public class DiffApi { default: case IGNORE_NONE: return ignoreWhitespace(IgnoreWhitespace.NONE); - case IGNORE_SPACE_AT_EOL: + case IGNORE_TRAILING: return ignoreWhitespace(IgnoreWhitespace.TRAILING); - case IGNORE_SPACE_CHANGE: + case IGNORE_LEADING_AND_TRAILING: return ignoreWhitespace(IgnoreWhitespace.CHANGED); - case IGNORE_ALL_SPACE: + case IGNORE_ALL: return ignoreWhitespace(IgnoreWhitespace.ALL); } } diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/PreferencesBox.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/PreferencesBox.java index 3364490db7..4e1ad88a36 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/PreferencesBox.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/PreferencesBox.java @@ -16,10 +16,10 @@ package com.google.gerrit.client.diff; import static com.google.gerrit.reviewdb.client.AccountDiffPreference.DEFAULT_CONTEXT; import static com.google.gerrit.reviewdb.client.AccountDiffPreference.WHOLE_FILE_CONTEXT; -import static com.google.gerrit.reviewdb.client.AccountDiffPreference.Whitespace.IGNORE_ALL_SPACE; +import static com.google.gerrit.reviewdb.client.AccountDiffPreference.Whitespace.IGNORE_ALL; +import static com.google.gerrit.reviewdb.client.AccountDiffPreference.Whitespace.IGNORE_LEADING_AND_TRAILING; import static com.google.gerrit.reviewdb.client.AccountDiffPreference.Whitespace.IGNORE_NONE; -import static com.google.gerrit.reviewdb.client.AccountDiffPreference.Whitespace.IGNORE_SPACE_AT_EOL; -import static com.google.gerrit.reviewdb.client.AccountDiffPreference.Whitespace.IGNORE_SPACE_CHANGE; +import static com.google.gerrit.reviewdb.client.AccountDiffPreference.Whitespace.IGNORE_TRAILING; import static com.google.gwt.event.dom.client.KeyCodes.KEY_ESCAPE; import com.google.gerrit.client.Gerrit; @@ -546,14 +546,14 @@ public class PreferencesBox extends Composite { PatchUtil.C.whitespaceIGNORE_NONE(), IGNORE_NONE.name()); ignoreWhitespace.addItem( - PatchUtil.C.whitespaceIGNORE_SPACE_AT_EOL(), - IGNORE_SPACE_AT_EOL.name()); + PatchUtil.C.whitespaceIGNORE_TRAILING(), + IGNORE_TRAILING.name()); ignoreWhitespace.addItem( - PatchUtil.C.whitespaceIGNORE_SPACE_CHANGE(), - IGNORE_SPACE_CHANGE.name()); + PatchUtil.C.whitespaceIGNORE_LEADING_AND_TRAILING(), + IGNORE_LEADING_AND_TRAILING.name()); ignoreWhitespace.addItem( - PatchUtil.C.whitespaceIGNORE_ALL_SPACE(), - IGNORE_ALL_SPACE.name()); + PatchUtil.C.whitespaceIGNORE_ALL(), + IGNORE_ALL.name()); } private void initMode() { diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchConstants.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchConstants.java index 39aadc3393..422a4dd38e 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchConstants.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchConstants.java @@ -69,9 +69,9 @@ public interface PatchConstants extends Constants { String commentCancelEdit(); String whitespaceIGNORE_NONE(); - String whitespaceIGNORE_SPACE_AT_EOL(); - String whitespaceIGNORE_SPACE_CHANGE(); - String whitespaceIGNORE_ALL_SPACE(); + String whitespaceIGNORE_TRAILING(); + String whitespaceIGNORE_LEADING_AND_TRAILING(); + String whitespaceIGNORE_ALL(); String previousFileHelp(); String nextFileHelp(); diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchConstants.properties b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchConstants.properties index 2f68822825..aa6177b30f 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchConstants.properties +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchConstants.properties @@ -50,9 +50,9 @@ commentSaveDraft = Save draft comment commentCancelEdit = Cancel comment edit whitespaceIGNORE_NONE=None -whitespaceIGNORE_SPACE_AT_EOL=At Line End -whitespaceIGNORE_SPACE_CHANGE=Leading, At Line End -whitespaceIGNORE_ALL_SPACE=All +whitespaceIGNORE_TRAILING=At Line End +whitespaceIGNORE_LEADING_AND_TRAILING=Leading, At Line End +whitespaceIGNORE_ALL=All previousFileHelp = Previous file nextFileHelp = Next file diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchScriptSettingsPanel.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchScriptSettingsPanel.java index 264e043afc..e71a2f30be 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchScriptSettingsPanel.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchScriptSettingsPanel.java @@ -289,12 +289,12 @@ public class PatchScriptSettingsPanel extends Composite { private void initIgnoreWhitespace(ListBox ws) { ws.addItem(PatchUtil.C.whitespaceIGNORE_NONE(), // Whitespace.IGNORE_NONE.name()); - ws.addItem(PatchUtil.C.whitespaceIGNORE_SPACE_AT_EOL(), // - Whitespace.IGNORE_SPACE_AT_EOL.name()); - ws.addItem(PatchUtil.C.whitespaceIGNORE_SPACE_CHANGE(), // - Whitespace.IGNORE_SPACE_CHANGE.name()); - ws.addItem(PatchUtil.C.whitespaceIGNORE_ALL_SPACE(), // - Whitespace.IGNORE_ALL_SPACE.name()); + ws.addItem(PatchUtil.C.whitespaceIGNORE_TRAILING(), // + Whitespace.IGNORE_TRAILING.name()); + ws.addItem(PatchUtil.C.whitespaceIGNORE_LEADING_AND_TRAILING(), // + Whitespace.IGNORE_LEADING_AND_TRAILING.name()); + ws.addItem(PatchUtil.C.whitespaceIGNORE_ALL(), // + Whitespace.IGNORE_ALL.name()); } private void initContext(ListBox context) { diff --git a/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/client/AccountDiffPreference.java b/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/client/AccountDiffPreference.java index 7948080b76..cc0cbf03cd 100644 --- a/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/client/AccountDiffPreference.java +++ b/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/client/AccountDiffPreference.java @@ -32,9 +32,9 @@ public class AccountDiffPreference { public static enum Whitespace implements CodedEnum { IGNORE_NONE('N'), // - IGNORE_SPACE_AT_EOL('E'), // - IGNORE_SPACE_CHANGE('S'), // - IGNORE_ALL_SPACE('A'); + IGNORE_TRAILING('E'), // + IGNORE_LEADING_AND_TRAILING('S'), // + IGNORE_ALL('A'); private final char code; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/GetDiff.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/GetDiff.java index eef0533b06..bcc8cce613 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/GetDiff.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/GetDiff.java @@ -370,9 +370,9 @@ public class GetDiff implements RestReadView { enum IgnoreWhitespace { NONE(AccountDiffPreference.Whitespace.IGNORE_NONE), - TRAILING(AccountDiffPreference.Whitespace.IGNORE_SPACE_AT_EOL), - CHANGED(AccountDiffPreference.Whitespace.IGNORE_SPACE_CHANGE), - ALL(AccountDiffPreference.Whitespace.IGNORE_ALL_SPACE); + TRAILING(AccountDiffPreference.Whitespace.IGNORE_TRAILING), + CHANGED(AccountDiffPreference.Whitespace.IGNORE_LEADING_AND_TRAILING), + ALL(AccountDiffPreference.Whitespace.IGNORE_ALL); private final AccountDiffPreference.Whitespace whitespace; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchListLoader.java b/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchListLoader.java index 0e421dbe63..903bcc24f7 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchListLoader.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchListLoader.java @@ -129,13 +129,13 @@ public class PatchListLoader implements Callable { private static RawTextComparator comparatorFor(Whitespace ws) { switch (ws) { - case IGNORE_ALL_SPACE: + case IGNORE_ALL: return RawTextComparator.WS_IGNORE_ALL; - case IGNORE_SPACE_AT_EOL: + case IGNORE_TRAILING: return RawTextComparator.WS_IGNORE_TRAILING; - case IGNORE_SPACE_CHANGE: + case IGNORE_LEADING_AND_TRAILING: return RawTextComparator.WS_IGNORE_CHANGE; case IGNORE_NONE: