Author: akazakov
Date: 2011-10-26 20:54:11 -0400 (Wed, 26 Oct 2011)
New Revision: 36031
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreRootTest/
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreRootTest/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreRootTest/.project
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreRootTest/bin/
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreRootTest/src/
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/SeamCoreTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/SeamCoreTestSetup.java
Log:
https://issues.jboss.org/browse/JBIDE-9952 CDI validator should validate resource in the
context of its project
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreRootTest/.classpath
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreRootTest/.classpath
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreRootTest/.classpath 2011-10-27
00:54:11 UTC (rev 36031)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/SeamCoreTest"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreRootTest/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreRootTest/.project
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreRootTest/.project
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreRootTest/.project 2011-10-27
00:54:11 UTC (rev 36031)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>SeamCoreRootTest</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.cdi.core.cdibuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ <nature>org.jboss.tools.cdi.core.cdinature</nature>
+ </natures>
+</projectDescription>
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/SeamCoreRootTest/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/SeamCoreTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/SeamCoreTest.java 2011-10-26
23:48:26 UTC (rev 36030)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/SeamCoreTest.java 2011-10-27
00:54:11 UTC (rev 36031)
@@ -14,24 +14,13 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
-import org.jboss.tools.common.base.test.validation.TestUtil;
-import org.jboss.tools.test.util.ResourcesUtils;
/**
* @author Alexey Kazakov
*/
public class SeamCoreTest extends TestCase {
- protected IProject project;
-
protected IProject getTestProject() throws Exception {
- if(project==null) {
- project =
ResourcesPlugin.getWorkspace().getRoot().getProject(SeamCoreTestSetup.PROJECT_NAME);
- if(!project.exists()) {
- project = ResourcesUtils.importProject(SeamCoreTestSetup.PLUGIN_ID,
SeamCoreTestSetup.PROJECT_PATH);
- TestUtil.waitForValidation();
- }
- }
- return project;
+ return
ResourcesPlugin.getWorkspace().getRoot().getProject(SeamCoreTestSetup.PROJECT_NAME);
}
}
\ No newline at end of file
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/SeamCoreTestSetup.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/SeamCoreTestSetup.java 2011-10-26
23:48:26 UTC (rev 36030)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/SeamCoreTestSetup.java 2011-10-27
00:54:11 UTC (rev 36031)
@@ -27,8 +27,11 @@
public static final String PLUGIN_ID = "org.jboss.tools.cdi.seam.core.test";
public static final String PROJECT_NAME = "SeamCoreTest";
public static final String PROJECT_PATH = "/projects/SeamCoreTest";
+ public static final String ROOT_PROJECT_NAME = "SeamCoreRootTest";
+ public static final String ROOT_PROJECT_PATH = "/projects/SeamCoreRootTest";
protected IProject project;
+ protected IProject rootProject;
public SeamCoreTestSetup(Test test) {
super(test);
@@ -40,6 +43,10 @@
if(!project.exists()) {
project = ResourcesUtils.importProject(PLUGIN_ID, PROJECT_PATH);
TestUtil._waitForValidation(project);
+ rootProject = ResourcesUtils.importProject(PLUGIN_ID, ROOT_PROJECT_PATH);
+ TestUtil._waitForValidation(rootProject);
+ } else {
+ assertTrue(ResourcesPlugin.getWorkspace().getRoot().getProject(ROOT_PROJECT_NAME).exists());
}
}
@@ -47,6 +54,7 @@
protected void tearDown() throws Exception {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
project.delete(true, true, null);
+ rootProject.delete(true, true, null);
JobUtils.waitForIdle();
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
}