Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrooks2010-09-20 17:22:51 -0400
committerRyan D. Brooks2010-09-20 17:22:51 -0400
commit0b84fc0c6296a175c1b65d985fe6ca408deb092e (patch)
treedc6055e574761c8ed0a16b62b9cb7cc80b6a01d0 /plugins
parent74225843949515181df78245bfcb31147a805ba9 (diff)
downloadorg.eclipse.osee-0b84fc0c6296a175c1b65d985fe6ca408deb092e.tar.gz
org.eclipse.osee-0b84fc0c6296a175c1b65d985fe6ca408deb092e.tar.xz
org.eclipse.osee-0b84fc0c6296a175c1b65d985fe6ca408deb092e.zip
refactor: Add convenience constructor to Find
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.framework.core.test/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/Find.java7
2 files changed, 6 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.test/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.framework.core.test/META-INF/MANIFEST.MF
index 519ac4e593..bbc54f3a93 100644
--- a/plugins/org.eclipse.osee.framework.core.test/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.framework.core.test/META-INF/MANIFEST.MF
@@ -9,3 +9,4 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.junit4;bundle-version="4.5.0"
Export-Package: org.eclipse.osee.framework.core.test,
org.eclipse.osee.framework.core.test.mocks
+Import-Package: org.eclipse.osee.framework.jdk.core.text.tool
diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/Find.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/Find.java
index e3b884afb7..1146447307 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/Find.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/Find.java
@@ -58,6 +58,10 @@ public class Find {
this.matcherUsed = new boolean[matchers.length];
}
+ public Find(Collection<String> patterns, Collection<File> files) {
+ this(patterns, files, simpleToBuffer);
+ }
+
private static FileToBufferConvert simpleToBuffer = new SimpleFileToBufferConvert();
private static ArrayList<String> toList(String pattern) {
@@ -67,8 +71,7 @@ public class Find {
}
public Find(String pattern, File topLevelSearchDir, String fileNamePattern) {
- this(toList(pattern), Lib.recursivelyListFiles(topLevelSearchDir, Pattern.compile(fileNamePattern)),
- simpleToBuffer);
+ this(toList(pattern), Lib.recursivelyListFiles(topLevelSearchDir, Pattern.compile(fileNamePattern)));
}
public static void main(String[] args) throws IOException {

Back to the top