From de3c0c5ff08c928e6d1eb4fac2704bbb2d261669 Mon Sep 17 00:00:00 2001 From: Paul Pazderski Date: Sat, 18 May 2019 16:07:38 +0200 Subject: Bug 547304 - [cleanup] Fix wrong space/tab indentation This change fixes space or mixed tab/space indentations in all Java files. This also includes two or three space indentations and even fix most stray single spaces in indentations. The change includes only whitespace formatting and no code changes. Change-Id: I4149aaf4e48ccf7b49083f36d52e0c7a67433c7d --- .../compare/internal/core/patch/FileDiffResult.java | 2 +- .../compare/internal/core/patch/FilePatch2.java | 10 +++++----- .../org/eclipse/compare/internal/core/patch/Hunk.java | 12 ++++++------ .../compare/internal/core/patch/LineReader.java | 18 +++++++++--------- .../compare/internal/core/patch/PatchReader.java | 2 +- .../compare/rangedifferencer/DifferencesIterator.java | 8 ++++---- .../compare/rangedifferencer/RangeComparatorLCS.java | 2 +- 7 files changed, 27 insertions(+), 27 deletions(-) (limited to 'bundles/org.eclipse.compare.core/src') diff --git a/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/FileDiffResult.java b/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/FileDiffResult.java index 9b7b584dc..ab64d83a3 100644 --- a/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/FileDiffResult.java +++ b/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/FileDiffResult.java @@ -68,7 +68,7 @@ public class FileDiffResult implements IFilePatchResult { * @param content the contents being patched or null for an addition * @param monitor a progress monitor or null if no progress monitoring is desired */ - public void refresh(ReaderCreator content, IProgressMonitor monitor) { + public void refresh(ReaderCreator content, IProgressMonitor monitor) { this.fMatches= false; this.fDiffProblem= false; boolean create= false; diff --git a/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/FilePatch2.java b/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/FilePatch2.java index f66faad94..4160b131f 100644 --- a/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/FilePatch2.java +++ b/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/FilePatch2.java @@ -58,17 +58,17 @@ public class FilePatch2 implements IFilePatch2 { * @param newPath the path of the after state * @param newDate the timestamp of the after state */ - public FilePatch2(IPath oldPath, long oldDate, IPath newPath, long newDate) { + public FilePatch2(IPath oldPath, long oldDate, IPath newPath, long newDate) { this.fOldPath= oldPath; this.oldDate = oldDate; this.fNewPath= newPath; this.newDate = newDate; } - /** - * Return the parent project or null if there isn't one. - * @return the parent project or null - */ + /** + * Return the parent project or null if there isn't one. + * @return the parent project or null + */ public DiffProject getProject() { return this.fProject; } diff --git a/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/Hunk.java b/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/Hunk.java index 938d99774..2256d28b7 100644 --- a/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/Hunk.java +++ b/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/Hunk.java @@ -63,9 +63,9 @@ public class Hunk implements IHunk { public Hunk(FilePatch2 parent, int hunkType, int oldStart, int oldLength, int newStart, int newLength, String[] lines) { this.fParent = parent; - if (this.fParent != null) { - this.fParent.add(this); - } + if (this.fParent != null) { + this.fParent.add(this); + } this.hunkType = hunkType; this.fOldLength = oldLength; this.fOldStart = oldStart; @@ -74,9 +74,9 @@ public class Hunk implements IHunk { this.fLines = lines; } - public Hunk(FilePatch2 parent, Hunk toCopy) { - this(parent, toCopy.hunkType, toCopy.fOldStart, toCopy.fOldLength, toCopy.fNewStart, toCopy.fNewLength, toCopy.fLines); - } + public Hunk(FilePatch2 parent, Hunk toCopy) { + this(parent, toCopy.hunkType, toCopy.fOldStart, toCopy.fOldLength, toCopy.fNewStart, toCopy.fNewLength, toCopy.fLines); + } /* * Returns the contents of this hunk. diff --git a/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/LineReader.java b/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/LineReader.java index 7ae7880ff..f7732e063 100644 --- a/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/LineReader.java +++ b/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/LineReader.java @@ -121,15 +121,15 @@ public class LineReader { this.fIgnoreSingleCR= true; } - /** - * Reads a line of text. A line is considered to be terminated by any one - * of a line feed ('\n'), a carriage return ('\r'), or a carriage return - * followed immediately by a line-feed. - * @return A string containing the contents of the line including - * the line-termination characters, or null if the end of the - * stream has been reached - * @exception IOException If an I/O error occurs - */ + /** + * Reads a line of text. A line is considered to be terminated by any one + * of a line feed ('\n'), a carriage return ('\r'), or a carriage return + * followed immediately by a line-feed. + * @return A string containing the contents of the line including + * the line-termination characters, or null if the end of the + * stream has been reached + * @exception IOException If an I/O error occurs + */ String readLine() throws IOException { try { while (!this.fSawEOF) { diff --git a/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/PatchReader.java b/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/PatchReader.java index 058aedbc7..7bf46f7c5 100644 --- a/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/PatchReader.java +++ b/bundles/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/PatchReader.java @@ -671,7 +671,7 @@ public class PatchReader { while (st.hasMoreElements()) { String token= st.nextToken().trim(); if (token.length() > 0) - l.add(token); + l.add(token); } return l.toArray(new String[l.size()]); } diff --git a/bundles/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/DifferencesIterator.java b/bundles/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/DifferencesIterator.java index f7f919227..a7dd086bc 100644 --- a/bundles/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/DifferencesIterator.java +++ b/bundles/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/DifferencesIterator.java @@ -42,8 +42,8 @@ import java.util.List; } /* - * Returns the number of RangeDifferences - */ + * Returns the number of RangeDifferences + */ int getCount() { return this.fRange.size(); } @@ -72,8 +72,8 @@ import java.util.List; } /* - * Removes all RangeDifferences - */ + * Removes all RangeDifferences + */ void removeAll() { this.fRange.clear(); } diff --git a/bundles/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/RangeComparatorLCS.java b/bundles/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/RangeComparatorLCS.java index ba0f856fb..7949b3a03 100644 --- a/bundles/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/RangeComparatorLCS.java +++ b/bundles/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/RangeComparatorLCS.java @@ -151,7 +151,7 @@ import org.eclipse.core.runtime.*; * @param length The number of non-empty (i.e non-zero) entries in LCS * @param comparator The comparator used to generate the LCS */ - private void compactAndShiftLCS(int[] lcsSide, int length, + private void compactAndShiftLCS(int[] lcsSide, int length, IRangeComparator comparator) { // If the LCS is empty, just return if (length == 0) -- cgit v1.2.3