if (patternsType.equals("RegExp")) {
if (!ignorePattern.equals("") && (takePattern.equals(""))) {
fileFilter = new FileFilter();
fileFilter.setMatchType(FileFilter.MATCH_ALL);
fileFilter.setFilterType(FileFilter.EXCLUDE);
FileFilterRule[] rules = new FileFilterRule[] { new FileNameFileFilterRule(new TextValue(ignorePattern),
FileNameFileFilterRule.OP_MATCHES_REGEXP) };
fileFilter.setFileFilterRules(rules);
useFilter = true;
}
if (ignorePattern.equals("") && (!takePattern.equals(""))) {
fileFilter = new FileFilter();
fileFilter.setMatchType(FileFilter.MATCH_ALL);
fileFilter.setFilterType(FileFilter.INCLUDE);
FileFilterRule[] rules = new FileFilterRule[] { new FileNameFileFilterRule(new TextValue(takePattern),
FileNameFileFilterRule.OP_MATCHES_REGEXP) };
fileFilter.setFileFilterRules(rules);
useFilter = true;
}
if (!ignorePattern.equals("") && (!takePattern.equals(""))) {
fileFilter = new FileFilter();
fileFilter.setMatchType(FileFilter.MATCH_ALL);
fileFilter.setFilterType(FileFilter.EXCLUDE);
FileFilterRule[] rules = new FileFilterRule[] {
new FileNameFileFilterRule(new TextValue(ignorePattern), FileNameFileFilterRule.OP_MATCHES_REGEXP),
new FileNameFileFilterRule(new TextValue(takePattern), FileNameFileFilterRule.OP_DOESNT_MATCHES_REGEXP) };
fileFilter.setFileFilterRules(rules);
useFilter = true;
}
}
else {