1 | void verifySettings() {↵ | | 1 | void verifySettings() {↵
|
2 | if (userProvidedExpression == null) {↵ | | 2 | if (contains == null) {↵
|
3 | setError("The expression attribute is required");↵ | | 3 | setError("The text attribute is required");↵
|
4 | }↵ | | 4 | }↵
|
5 | }↵ | | 5 | }↵
|
|
6 | /**↵ | | 6 | /**↵
|
7 | * Tests a regular expression against each line of text in the↵ | | 7 | * The heart of the matter. This is where the selector gets to decide↵
|
8 | file.↵ | | 8 | * on the inclusion of a file in a particular fileset.↵
|
9 | *↵ | | 9 | *↵
|
10 | * @param basedir the base directory the scan is being done from↵ | | 10 | * @param basedir the base directory the scan is being done from↵
|
11 | * @param filename is the name of the file to check↵ | | 11 | * @param filename is the name of the file to check↵
|
12 | * @param file is a java.io.File object the selector can use↵ | | 12 | * @param file is a java.io.File object the selector can use↵
|
13 | * @return whether the file should be selected or not↵ | | 13 | * @return whether the file should be selected or not↵
|
14 | */↵ | | 14 | */↵
|
15 | public boolean isSelected(File basedir, String filename, File file) {↵ | | 15 | public boolean isSelected(File basedir, String filename, File file) {↵
|
16 | return isSelected(new FileResource(file));↵ | | 16 | return isSelected(new FileResource(file));↵
|
17 | | | 17 |
|