Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2019-05-18 21:39:58 +0000
committerPaul Pazderski2019-05-19 23:44:04 +0000
commit8bc461175ceded9ec872cff17d84fbce8fc4795d (patch)
tree341effbc5c46d3376180e05cefa509d7d4ec270b /org.eclipse.search/search/org/eclipse/search/internal/core
parent9e7f66919496659795478f8cd80804da71498fff (diff)
downloadeclipse.platform.text-8bc461175ceded9ec872cff17d84fbce8fc4795d.tar.gz
eclipse.platform.text-8bc461175ceded9ec872cff17d84fbce8fc4795d.tar.xz
eclipse.platform.text-8bc461175ceded9ec872cff17d84fbce8fc4795d.zip
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: I3e7b6abb69a1894c402f9123417346a44fc0992a
Diffstat (limited to 'org.eclipse.search/search/org/eclipse/search/internal/core')
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/core/text/FileNamePatternSearchScope.java2
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/core/text/PatternConstructor.java148
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java2
3 files changed, 76 insertions, 76 deletions
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/core/text/FileNamePatternSearchScope.java b/org.eclipse.search/search/org/eclipse/search/internal/core/text/FileNamePatternSearchScope.java
index ec48bda03be..28cd5899a74 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/core/text/FileNamePatternSearchScope.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/core/text/FileNamePatternSearchScope.java
@@ -136,7 +136,7 @@ public class FileNamePatternSearchScope extends TextSearchScope {
* @return returns true if the file name is matching to a file name pattern
*/
private boolean matchesFileName(String fileName) {
- return getFileNameMatcher().reset(fileName).matches();
+ return getFileNameMatcher().reset(fileName).matches();
}
/**
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/core/text/PatternConstructor.java b/org.eclipse.search/search/org/eclipse/search/internal/core/text/PatternConstructor.java
index 5210d2505e5..f4b1a8b22a1 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/core/text/PatternConstructor.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/core/text/PatternConstructor.java
@@ -156,9 +156,9 @@ public class PatternConstructor {
}
- private static boolean isWordChar(char c) {
- return Character.isLetterOrDigit(c);
- }
+ private static boolean isWordChar(char c) {
+ return Character.isLetterOrDigit(c);
+ }
/**
* Creates a pattern element from an array of patterns in the old 'StringMatcher' format.
@@ -172,8 +172,8 @@ public class PatternConstructor {
StringBuilder pattern= new StringBuilder();
for (int i= 0; i < patterns.length; i++) {
if (i > 0) {
- // note that this works only as we know that the operands of the
- // or expression will be simple and need no brackets.
+ // note that this works only as we know that the operands of the
+ // or expression will be simple and need no brackets.
pattern.append('|');
}
appendAsRegEx(true, patterns[i], pattern);
@@ -183,75 +183,75 @@ public class PatternConstructor {
public static StringBuilder appendAsRegEx(boolean isStringMatcher, String pattern, StringBuilder buffer) {
- boolean isEscaped= false;
- for (int i = 0; i < pattern.length(); i++) {
- char c = pattern.charAt(i);
- switch(c) {
- // the backslash
- case '\\':
- // the backslash is escape char in string matcher
- if (isStringMatcher && !isEscaped) {
- isEscaped= true;
- }
- else {
- buffer.append("\\\\"); //$NON-NLS-1$
- isEscaped= false;
- }
- break;
- // characters that need to be escaped in the regex.
- case '(':
- case ')':
- case '{':
- case '}':
- case '.':
- case '[':
- case ']':
- case '$':
- case '^':
- case '+':
- case '|':
- if (isEscaped) {
- buffer.append("\\\\"); //$NON-NLS-1$
- isEscaped= false;
- }
- buffer.append('\\');
- buffer.append(c);
- break;
- case '?':
- if (isStringMatcher && !isEscaped) {
- buffer.append('.');
- }
- else {
- buffer.append('\\');
- buffer.append(c);
- isEscaped= false;
- }
- break;
- case '*':
- if (isStringMatcher && !isEscaped) {
- buffer.append(".*"); //$NON-NLS-1$
- }
- else {
- buffer.append('\\');
- buffer.append(c);
- isEscaped= false;
- }
- break;
- default:
- if (isEscaped) {
- buffer.append("\\\\"); //$NON-NLS-1$
- isEscaped= false;
- }
- buffer.append(c);
- break;
- }
- }
- if (isEscaped) {
- buffer.append("\\\\"); //$NON-NLS-1$
- isEscaped= false;
- }
- return buffer;
- }
+ boolean isEscaped= false;
+ for (int i = 0; i < pattern.length(); i++) {
+ char c = pattern.charAt(i);
+ switch(c) {
+ // the backslash
+ case '\\':
+ // the backslash is escape char in string matcher
+ if (isStringMatcher && !isEscaped) {
+ isEscaped= true;
+ }
+ else {
+ buffer.append("\\\\"); //$NON-NLS-1$
+ isEscaped= false;
+ }
+ break;
+ // characters that need to be escaped in the regex.
+ case '(':
+ case ')':
+ case '{':
+ case '}':
+ case '.':
+ case '[':
+ case ']':
+ case '$':
+ case '^':
+ case '+':
+ case '|':
+ if (isEscaped) {
+ buffer.append("\\\\"); //$NON-NLS-1$
+ isEscaped= false;
+ }
+ buffer.append('\\');
+ buffer.append(c);
+ break;
+ case '?':
+ if (isStringMatcher && !isEscaped) {
+ buffer.append('.');
+ }
+ else {
+ buffer.append('\\');
+ buffer.append(c);
+ isEscaped= false;
+ }
+ break;
+ case '*':
+ if (isStringMatcher && !isEscaped) {
+ buffer.append(".*"); //$NON-NLS-1$
+ }
+ else {
+ buffer.append('\\');
+ buffer.append(c);
+ isEscaped= false;
+ }
+ break;
+ default:
+ if (isEscaped) {
+ buffer.append("\\\\"); //$NON-NLS-1$
+ isEscaped= false;
+ }
+ buffer.append(c);
+ break;
+ }
+ }
+ if (isEscaped) {
+ buffer.append("\\\\"); //$NON-NLS-1$
+ isEscaped= false;
+ }
+ return buffer;
+ }
/**
* Interprets escaped characters in the given replace pattern.
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java b/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java
index d7cb7cca8fe..d54ca7c8626 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java
@@ -434,7 +434,7 @@ public class TextSearchVisitor {
System.out.println(Messages.format(
"[TextSearch] Search duration for {0} files in {1} jobs using {2} threads: {3}ms", args)); //$NON-NLS-1$
}
- }
+ }
}
public IStatus search(TextSearchScope scope, IProgressMonitor monitor) {

Back to the top