|
|
@@ -219,6 +219,16 @@ public final class LineContainsRegExp |
|
|
|
return negate; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Set the regular expression as an attribute. |
|
|
|
* @since Ant 1.9.10 |
|
|
|
*/ |
|
|
|
public void setRegexp(String pattern) { |
|
|
|
RegularExpression regexp = new RegularExpression(); |
|
|
|
regexp.setPattern(pattern); |
|
|
|
regexps.addElement(regexp); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Parses parameters to add user defined regular expressions. |
|
|
|
*/ |
|
|
@@ -227,10 +237,7 @@ public final class LineContainsRegExp |
|
|
|
if (params != null) { |
|
|
|
for (int i = 0; i < params.length; i++) { |
|
|
|
if (REGEXP_KEY.equals(params[i].getType())) { |
|
|
|
String pattern = params[i].getValue(); |
|
|
|
RegularExpression regexp = new RegularExpression(); |
|
|
|
regexp.setPattern(pattern); |
|
|
|
regexps.addElement(regexp); |
|
|
|
setRegexp(params[i].getValue()); |
|
|
|
} else if (NEGATE_KEY.equals(params[i].getType())) { |
|
|
|
setNegate(Project.toBoolean(params[i].getValue())); |
|
|
|
} else if (CS_KEY.equals(params[i].getType())) { |
|
|
|