[226597] What about subdirectories in validation exclude/include rules?
diff --git a/tests/org.eclipse.wst.common.tests.validation/plugin.xml b/tests/org.eclipse.wst.common.tests.validation/plugin.xml
index 83bc997..967ccfb 100644
--- a/tests/org.eclipse.wst.common.tests.validation/plugin.xml
+++ b/tests/org.eclipse.wst.common.tests.validation/plugin.xml
@@ -208,6 +208,32 @@
</validator>
</extension>
+ <extension
+ point="org.eclipse.wst.validation.validatorV2"
+ id="T1C" name="T1C">
+ <validator
+ build="false"
+ class="org.eclipse.wst.validation.tests.T1C"
+ manual="false">
+ <include>
+ <rules>
+ <fileext
+ ext="t1c">
+ </fileext>
+ </rules>
+ </include>
+ <exclude>
+ <rules>
+ <file
+ caseSensitive="false"
+ name="ignore"
+ type="folder">
+ </file>
+ </rules>
+ </exclude>
+ </validator>
+ </extension>
+
<extension
id="t2a"
name="T2A"
diff --git a/tests/org.eclipse.wst.common.tests.validation/src/org/eclipse/wst/validation/tests/testcase/TestSuite2.java b/tests/org.eclipse.wst.common.tests.validation/src/org/eclipse/wst/validation/tests/testcase/TestSuite2.java
index 1279d31..f5a143d 100644
--- a/tests/org.eclipse.wst.common.tests.validation/src/org/eclipse/wst/validation/tests/testcase/TestSuite2.java
+++ b/tests/org.eclipse.wst.common.tests.validation/src/org/eclipse/wst/validation/tests/testcase/TestSuite2.java
@@ -27,13 +27,15 @@
public class TestSuite2 extends TestCase {
private TestEnvironment _env;
- private IProject _testProject;
+ private IProject _testProject;
- private IFile _firstTest1;
- private IFile _secondTest1;
- private IFile _firstT1B;
+ private IFile _firstTest1;
+ private IFile _secondTest1;
+ private IFile _firstT1B;
- private IFile _firstTest2x;
+ private IFile _firstTest2x;
+
+ private IFile _firstT1C;
public static Test suite() {
return new TestSuite(TestSuite2.class);
@@ -66,6 +68,11 @@
_env.addFile(folder, "third.test4", "# Doesn't really matter\nWe just want to make the build a bit slower.");
_env.addFile(folder, "fourth.test4", "# Doesn't really matter");
_env.addFile(folder, "fifth.test5", "# Doesn't really matter");
+
+ IPath ignore = _env.addFolder(_testProject.getFullPath(), "ignore");
+ IPath nested = _env.addFolder(ignore, "nested");
+ _firstT1C = _env.addFile(nested, "first.t1c", "error - error");
+
}
/**
@@ -111,6 +118,8 @@
checkClear();
checkT1B();
checkGuardValidators();
+
+ checkT1C();
}
finally {
// workspace.removeResourceChangeListener(listener);
@@ -121,6 +130,11 @@
IMarker[] markers = _firstT1B.findMarkers(T1B.MarkerId, false, IResource.DEPTH_ZERO);
assertEquals("Number of T1B markers", 3, markers.length);
}
+
+ private void checkT1C() throws CoreException {
+ IMarker[] markers = _firstT1C.findMarkers(null, false, IResource.DEPTH_ZERO);
+ assertEquals("Number of T1C markers", 0, markers.length);
+ }
/**
* Check if the clear function worked.
diff --git a/tests/org.eclipse.wst.common.tests.validation/validators/org/eclipse/wst/validation/tests/T1C.java b/tests/org.eclipse.wst.common.tests.validation/validators/org/eclipse/wst/validation/tests/T1C.java
new file mode 100644
index 0000000..0c7ee62
--- /dev/null
+++ b/tests/org.eclipse.wst.common.tests.validation/validators/org/eclipse/wst/validation/tests/T1C.java
@@ -0,0 +1,29 @@
+package org.eclipse.wst.validation.tests;
+
+import org.eclipse.wst.common.tests.validation.Activator;
+
+/**
+ * A validator that is used to test the folder filters.
+ *
+ * It looks at files with a file extension of t1c.
+ * @author karasiuk
+ *
+ */
+public class T1C extends TestValidator {
+
+ public static String id(){
+ return Activator.PLUGIN_ID +".T1C";
+ }
+
+ @Override
+ public String getId() {
+ return id();
+ }
+
+ @Override
+ public String getName() {
+ return "T1C";
+ }
+
+
+}