Code cleanup.
diff --git a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/commands/semicolon/CommentNodesFinder.java b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/commands/semicolon/CommentNodesFinder.java
index 86494d5..9c1e065 100644
--- a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/commands/semicolon/CommentNodesFinder.java
+++ b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/commands/semicolon/CommentNodesFinder.java
@@ -54,7 +54,7 @@
}
String[] comment = rawComment.split(lineSeparator());
for (String line : comment) {
- for (Pattern pattern : compile(patternsToMatch, target)) {
+ for (Pattern pattern : compile(patternsToMatch)) {
Matcher matcher = pattern.matcher(line);
if (matcher.matches()) {
return pair(currentNode, matcher);
@@ -65,7 +65,7 @@
return null;
}
- private List<Pattern> compile(String[] patterns, EObject target) {
+ private List<Pattern> compile(String[] patterns) {
List<Pattern> compiled = newArrayList();
for (final String s : patterns) {
Pattern p = null;
@@ -85,8 +85,8 @@
return compile(key);
}
- static Pattern compile(String s) {
- return Pattern.compile(MATCH_ANYTHING + s + MATCH_ANYTHING, CASE_INSENSITIVE);
+ static Pattern compile(String regex) {
+ return Pattern.compile(MATCH_ANYTHING + regex + MATCH_ANYTHING, CASE_INSENSITIVE);
}
}
}