JBoss Tools SVN: r33735 - in trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test: international and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-08-09 16:15:03 -0400 (Tue, 09 Aug 2011)
New Revision: 33735
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/CDISeamCoreAllTests.java
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/international/SeamResourceBundlesTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/persistence/SeamPersistenceTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/persistence/SeamPersistenceTestSetup.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/servlet/SeamServletValidationTest.java
Log:
https://issues.jboss.org/browse/JBIDE-9394
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/CDISeamCoreAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/CDISeamCoreAllTests.java 2011-08-09 19:38:32 UTC (rev 33734)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/CDISeamCoreAllTests.java 2011-08-09 20:15:03 UTC (rev 33735)
@@ -35,12 +35,12 @@
suiteAll.addTestSuite(BundleModelTest.class);
TestSuite suite = new TestSuite("Seam Core Project Tests");
+ suite.addTestSuite(SeamServletValidationTest.class);
suiteAll.addTest(new SeamCoreTestSetup(suite));
- suiteAll.addTestSuite(SeamServletValidationTest.class);
-
+
suite = new TestSuite("Seam Persistence Project Tests");
+ suite.addTestSuite(SeamPersistenceTest.class);
suiteAll.addTest(new SeamPersistenceTestSetup(suite));
- suiteAll.addTestSuite(SeamPersistenceTest.class);
return suiteAll;
}
}
\ 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-08-09 19:38:32 UTC (rev 33734)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/SeamCoreTestSetup.java 2011-08-09 20:15:03 UTC (rev 33735)
@@ -15,6 +15,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.jboss.tools.jst.jsp.test.TestUtil;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
@@ -38,13 +39,13 @@
project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
if(!project.exists()) {
project = ResourcesUtils.importProject(PLUGIN_ID, PROJECT_PATH);
+ TestUtil._waitForValidation(project);
}
}
@Override
protected void tearDown() throws Exception {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
project.delete(true, true, null);
JobUtils.waitForIdle();
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamResourceBundlesTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamResourceBundlesTest.java 2011-08-09 19:38:32 UTC (rev 33734)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamResourceBundlesTest.java 2011-08-09 20:15:03 UTC (rev 33735)
@@ -15,10 +15,7 @@
import java.util.List;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.test.tck.TCKTest;
@@ -38,8 +35,6 @@
import org.jboss.tools.jst.text.ext.test.HyperlinkTestUtil.TestHyperlink;
import org.jboss.tools.jst.text.ext.test.HyperlinkTestUtil.TestRegion;
import org.jboss.tools.jst.web.kb.PageContextFactory;
-import org.jboss.tools.jst.web.kb.internal.validation.ValidatorManager;
-import org.jboss.tools.test.util.JobUtils;
import org.osgi.framework.Bundle;
/**
@@ -202,13 +197,7 @@
if (!FileUtil.copyFile(seamInternationalPageFrom, seamInternationalPageTo))
return false;
- ValidatorManager.setStatus(ValidatorManager.RUNNING);
- tckProject.refreshLocal(IResource.DEPTH_INFINITE, null);
- JobUtils.waitForIdle();
- tckProject.build(IncrementalProjectBuilder.CLEAN_BUILD, new NullProgressMonitor());
- JobUtils.waitForIdle();
- tckProject.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
- TestUtil.waitForValidation();
+ TestUtil.validate(tckProject);
caTest.setProject(tckProject);
return true;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/persistence/SeamPersistenceTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/persistence/SeamPersistenceTest.java 2011-08-09 19:38:32 UTC (rev 33734)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/persistence/SeamPersistenceTest.java 2011-08-09 20:15:03 UTC (rev 33735)
@@ -15,7 +15,6 @@
import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.test.DependentProjectTest;
import org.jboss.tools.jst.jsp.test.TestUtil;
-import org.jboss.tools.jst.web.kb.internal.validation.ValidatorManager;
import org.jboss.tools.test.util.ResourcesUtils;
public class SeamPersistenceTest extends TestCase {
@@ -24,12 +23,11 @@
public IProject getTestProject() throws IOException, CoreException, InvocationTargetException, InterruptedException {
if(project==null) {
- ValidatorManager.setStatus("INIT");
project = ResourcesPlugin.getWorkspace().getRoot().getProject(SeamPersistenceTestSetup.PROJECT_NAME);
if(!project.exists()) {
project = ResourcesUtils.importProject(SeamPersistenceTestSetup.PLUGIN_ID, SeamPersistenceTestSetup.PROJECT_PATH);
+ TestUtil.waitForValidation();
}
- TestUtil.waitForValidation();
}
return project;
}
@@ -51,5 +49,4 @@
Set<IBean> bs = cdi.getBeans(false, p);
assertFalse(bs.isEmpty());
}
-
-}
+}
\ 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/persistence/SeamPersistenceTestSetup.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/persistence/SeamPersistenceTestSetup.java 2011-08-09 19:38:32 UTC (rev 33734)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/persistence/SeamPersistenceTestSetup.java 2011-08-09 20:15:03 UTC (rev 33735)
@@ -14,6 +14,7 @@
import junit.framework.Test;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
@@ -38,13 +39,13 @@
project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
if(!project.exists()) {
project = ResourcesUtils.importProject(PLUGIN_ID, PROJECT_PATH);
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
}
}
@Override
protected void tearDown() throws Exception {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
project.delete(true, true, null);
JobUtils.waitForIdle();
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/servlet/SeamServletValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/servlet/SeamServletValidationTest.java 2011-08-09 19:38:32 UTC (rev 33734)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/servlet/SeamServletValidationTest.java 2011-08-09 20:15:03 UTC (rev 33735)
@@ -22,7 +22,6 @@
import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
import org.jboss.tools.cdi.seam.core.test.SeamCoreTestSetup;
import org.jboss.tools.jst.jsp.test.TestUtil;
-import org.jboss.tools.jst.web.kb.internal.validation.ValidatorManager;
import org.jboss.tools.test.util.ResourcesUtils;
import org.jboss.tools.tests.AbstractResourceMarkerTest;
@@ -35,12 +34,11 @@
public IProject getTestProject() throws IOException, CoreException, InvocationTargetException, InterruptedException {
if(project==null) {
- ValidatorManager.setStatus("INIT");
project = ResourcesPlugin.getWorkspace().getRoot().getProject(SeamCoreTestSetup.PROJECT_NAME);
if(!project.exists()) {
project = ResourcesUtils.importProject(SeamCoreTestSetup.PLUGIN_ID, SeamCoreTestSetup.PROJECT_PATH);
+ TestUtil.waitForValidation();
}
- TestUtil.waitForValidation();
}
return project;
}
14 years, 8 months
JBoss Tools SVN: r33734 - in trunk/cdi/tests: org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/project and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-08-09 15:38:32 -0400 (Tue, 09 Aug 2011)
New Revision: 33734
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/BeansXMLTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/DependentProjectTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/TwoWebContentFoldersTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/TypeTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/project/EnableCDISupportForWarTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigTestSetup.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigValidationTestSetup.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.ui.test/src/org/jboss/tools/cdi/seam/config/ui/test/SeamConfigContentAssistTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesTestSetup.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesValidationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/BeanNamingTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/DefaultBeanTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/ExactTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanValidationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/MessageLoggerTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamSolderTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamSolderTestSetup.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/ServiceHandlerTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/UnwrapsTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/VetoTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/InjectedPointHyperlinkTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/SeamGenericInjectedPointHyperlinkTest.java
Log:
https://issues.jboss.org/browse/JBIDE-9394
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/BeansXMLTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/BeansXMLTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/BeansXMLTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -6,9 +6,8 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
@@ -29,8 +28,7 @@
public void setUp() throws Exception {
project = ResourcesUtils.importProject(PLUGIN_ID, "/projects/CDITest1");
- project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
- JobUtils.waitForIdle();
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
}
public void testBeansXML() throws CoreException, IOException {
@@ -43,7 +41,7 @@
XModelObject o = findTag(beansXML, "drools:RuleResources");
assertNotNull(o);
-
+
o = findTag(beansXML, "drools:DroolsConfig/drools:ruleResources/s:Inject");
assertNotNull(o);
}
@@ -55,10 +53,10 @@
assertNotNull(beansXML);
assertEquals("FileCDIBeans", beansXML.getModelEntity().getName());
-
+
XModelObject scan = beansXML.getChildByPath("Scan");
assertNotNull(scan);
-
+
XModelObject include1 = scan.getChildByPath("cls1");
assertNotNull(include1);
assertEquals("CDIWeldInclude", include1.getModelEntity().getName());
@@ -86,12 +84,10 @@
String pattern4 = exclude4.getAttributeValue("name");
assertEquals("cls4", pattern4);
assertEquals("true", exclude4.getAttributeValue("is regular expression"));
-
}
public void tearDown() throws Exception {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
project.delete(true, true, null);
JobUtils.waitForIdle();
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
@@ -109,5 +105,4 @@
}
return null;
}
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/DependentProjectTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/DependentProjectTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/DependentProjectTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -1,6 +1,5 @@
package org.jboss.tools.cdi.core.test;
-
import java.io.IOException;
import java.util.Iterator;
import java.util.Set;
@@ -9,7 +8,6 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
@@ -28,13 +26,11 @@
import org.jboss.tools.cdi.core.IProducerMethod;
import org.jboss.tools.cdi.core.IQualifier;
import org.jboss.tools.cdi.core.IScope;
-import org.jboss.tools.cdi.core.test.tck.TCKTest;
import org.jboss.tools.cdi.internal.core.impl.ProducerMethod;
import org.jboss.tools.common.java.IAnnotationDeclaration;
import org.jboss.tools.jst.web.kb.IKbProject;
import org.jboss.tools.jst.web.kb.KbProjectFactory;
import org.jboss.tools.jst.web.kb.internal.KbProject;
-import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
/**
@@ -53,15 +49,14 @@
project2 = getTestProject(project2, "/projects/CDITest2", "CDITest2");
project3 = getTestProject(project3, "/projects/CDITest3", "CDITest3");
}
-
+
public static IProject getTestProject(IProject project, String projectPath, String projectName) {
if(project==null) {
try {
project = findTestProject(projectName);
if(project==null || !project.exists()) {
project = ResourcesUtils.importProject(PLUGIN_ID, projectPath);
- project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
- JobUtils.waitForIdle();
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
}
} catch (Exception e) {
e.printStackTrace();
@@ -123,15 +118,11 @@
assertNull(sd);
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
IFile scope2File = project1.getFile(new Path("src/cdi/test/Scope2.java"));
IFile scope21File = project1.getFile(new Path("src/cdi/test/Scope2.1"));
scope2File.setContents(scope21File.getContents(), IFile.FORCE, new NullProgressMonitor());
- JobUtils.waitForIdle();
- project1.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new NullProgressMonitor());
- JobUtils.waitForIdle();
+ project1.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
- JobUtils.waitForIdle();
producer = getProducer("/CDITest2/src/test/Test1.java");
scope = producer.getScope();
@@ -331,14 +322,11 @@
public void testCleanDependentProject() throws CoreException, IOException {
ICDIProject cdi2 = CDICorePlugin.getCDIProject(project2, true);
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
cdi2.getNature().getProject().build(IncrementalProjectBuilder.CLEAN_BUILD, new NullProgressMonitor());
- JobUtils.waitForIdle();
assertBeanIsPresent(cdi2, "cdi.test.MyBean", true);
ResourcesUtils.setBuildAutomatically(true);
- JobUtils.waitForIdle();
assertBeanIsPresent(cdi2, "cdi.test.MyBean", true);
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
@@ -365,7 +353,4 @@
fail("Can't find \"" + fieldName + "\" injection point filed in " + beanClassFilePath);
return null;
}
-
-
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/TwoWebContentFoldersTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/TwoWebContentFoldersTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/TwoWebContentFoldersTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -5,18 +5,12 @@
import junit.framework.TestCase;
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.ICDIProject;
-import org.jboss.tools.common.model.XModelObject;
-import org.jboss.tools.common.model.util.EclipseResourceUtil;
-import org.jboss.tools.common.model.util.XModelObjectLoaderUtil;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
@@ -33,9 +27,7 @@
public void setUp() throws Exception {
project = ResourcesUtils.importProject(PLUGIN_ID, "/projects/TwoWebContentFolders");
- JobUtils.waitForIdle();
- project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
- JobUtils.waitForIdle();
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
}
public void testBeansXMLInDifferentWebContentFolders() throws CoreException, IOException {
@@ -51,10 +43,8 @@
public void tearDown() throws Exception {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
project.delete(true, true, null);
JobUtils.waitForIdle();
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
}
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/TypeTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/TypeTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/TypeTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -3,9 +3,10 @@
import java.util.ConcurrentModificationException;
import java.util.Set;
+import junit.framework.TestCase;
+
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
@@ -15,8 +16,6 @@
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
-import junit.framework.TestCase;
-
public class TypeTest extends TestCase {
IProject project = null;
@@ -25,8 +24,7 @@
@Override
protected void setUp() throws Exception {
project = ResourcesUtils.importProject(DependentProjectsTestSetup.PLUGIN_ID, "/projects/TypeTest");
- project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
- JobUtils.waitForIdle();
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
}
public void testType() throws Exception {
@@ -82,10 +80,8 @@
public void tearDown() throws Exception {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
project.delete(true, true, null);
JobUtils.waitForIdle();
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
}
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/project/EnableCDISupportForWarTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/project/EnableCDISupportForWarTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/project/EnableCDISupportForWarTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -15,7 +15,8 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.jboss.tools.cdi.core.CDICorePlugin;
@@ -33,17 +34,16 @@
public void setUp() throws Exception {
project = ResourcesUtils.importProject(PLUGIN_ID, "/projects/warproject");
- project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
- JobUtils.waitForIdle();
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
}
protected String getBeansXmlPath() {
return "WebContent/WEB-INF/beans.xml";
}
- public void testEnableCDISupport() {
+ public void testEnableCDISupport() throws CoreException {
CDIUtil.enableCDI(project, true, new NullProgressMonitor());
- JobUtils.waitForIdle();
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
assertNotNull("CDI is not enabled", CDICorePlugin.getCDI(project, false));
IFile beansXml = project.getFile(new Path(getBeansXmlPath()));
@@ -51,13 +51,12 @@
assertTrue("Can't find beans.xml", beansXml.isAccessible());
CDIUtil.disableCDI(project);
- JobUtils.waitForIdle();
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
assertNull("CDI is enabled", CDICorePlugin.getCDI(project, false));
}
public void tearDown() throws Exception {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
project.delete(true, true, null);
JobUtils.waitForIdle();
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -11,6 +11,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.FileLocator;
@@ -101,6 +102,7 @@
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
if(project==null || !project.exists()) {
project = ResourcesUtils.importProject(b, PROJECT_PATH);
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
}
String projectPath = project.getLocation().toOSString();
String resourcePath = FileLocator.resolve(b.getEntry(TCK_RESOURCES_PREFIX)).getFile();
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -11,20 +11,17 @@
package org.jboss.tools.cdi.seam.config.core.test;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.Set;
import junit.framework.TestCase;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.jboss.tools.cdi.core.CDICorePlugin;
-import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.ICDIProject;
-import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IInjectionPointField;
-import org.jboss.tools.cdi.core.IProducer;
import org.jboss.tools.cdi.core.extension.feature.IBuildParticipantFeature;
import org.jboss.tools.cdi.core.test.DependentProjectTest;
import org.jboss.tools.cdi.seam.config.core.CDISeamConfigExtension;
@@ -58,6 +55,7 @@
project = findTestProject();
if(project==null || !project.exists()) {
project = ResourcesUtils.importProject(PLUGIN_ID, PROJECT_PATH);
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
}
} catch (Exception e) {
e.printStackTrace();
@@ -79,7 +77,6 @@
}
}
return null;
-
}
protected IInjectionPointField getInjectionPointField(ICDIProject cdi, String beanClassFilePath, String fieldName) {
@@ -106,5 +103,4 @@
}
return ds;
}
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigTestSetup.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigTestSetup.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigTestSetup.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -14,6 +14,7 @@
import junit.framework.Test;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
@@ -34,13 +35,13 @@
project = ResourcesPlugin.getWorkspace().getRoot().getProject(SeamConfigTest.PROJECT_NAME);
if(project == null || !project.exists()) {
project = ResourcesUtils.importProject(SeamConfigTest.PLUGIN_ID, SeamConfigTest.PROJECT_PATH);
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
}
}
@Override
protected void tearDown() throws Exception {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
project.delete(true, true, null);
JobUtils.waitForIdle();
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigValidationTestSetup.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigValidationTestSetup.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigValidationTestSetup.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -15,6 +15,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.jboss.tools.jst.jsp.test.TestUtil;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
@@ -34,13 +35,13 @@
project = ResourcesPlugin.getWorkspace().getRoot().getProject(SeamConfigValidationTest.PROJECT_NAME);
if(project == null || !project.exists()) {
project = ResourcesUtils.importProject(SeamConfigValidationTest.PLUGIN_ID, SeamConfigValidationTest.PROJECT_PATH);
+ TestUtil._waitForValidation(project);
}
}
@Override
protected void tearDown() throws Exception {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
project.delete(true, true, null);
JobUtils.waitForIdle();
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.config.ui.test/src/org/jboss/tools/cdi/seam/config/ui/test/SeamConfigContentAssistTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.config.ui.test/src/org/jboss/tools/cdi/seam/config/ui/test/SeamConfigContentAssistTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.config.ui.test/src/org/jboss/tools/cdi/seam/config/ui/test/SeamConfigContentAssistTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -1,6 +1,7 @@
package org.jboss.tools.cdi.seam.config.ui.test;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.ICDIProject;
@@ -26,6 +27,7 @@
project = findTestProject();
if(project==null || !project.exists()) {
project = ResourcesUtils.importProject(PLUGIN_ID, PROJECT_PATH);
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
}
} catch (Exception e) {
e.printStackTrace();
@@ -64,6 +66,4 @@
String text = "urn:java:org.jboss.beans.";
checkProposals(FILE_PATH, text, text.length(), proposals, false);
}
-
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesTestSetup.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesTestSetup.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesTestSetup.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -15,6 +15,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.jboss.tools.jst.jsp.test.TestUtil;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
@@ -38,13 +39,13 @@
project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
if(!project.exists()) {
project = ResourcesUtils.importProject(PLUGIN_ID, PROJECT_PATH);
+ TestUtil._waitForValidation(project);
}
}
@Override
protected void tearDown() throws Exception {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
project.delete(true, true, null);
JobUtils.waitForIdle();
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesValidationTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesValidationTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -38,6 +38,7 @@
project = ResourcesPlugin.getWorkspace().getRoot().getProject(SeamFacesTestSetup.PROJECT_NAME);
if(!project.exists()) {
project = ResourcesUtils.importProject(SeamFacesTestSetup.PLUGIN_ID, SeamFacesTestSetup.PROJECT_PATH);
+ TestUtil._waitForValidation(project);
}
TestUtil.waitForValidation();
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/META-INF/MANIFEST.MF 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/META-INF/MANIFEST.MF 2011-08-09 19:38:32 UTC (rev 33734)
@@ -20,6 +20,7 @@
org.eclipse.ltk.core.refactoring,
org.jboss.tools.jst.web.kb,
org.jboss.tools.cdi.xml,
- org.eclipse.jst.standard.schemas
+ org.eclipse.jst.standard.schemas,
+ org.jboss.tools.jst.jsp.test
Export-Package: org.jboss.tools.cdi.seam.solder.core.test
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/BeanNamingTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/BeanNamingTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/BeanNamingTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -34,7 +34,7 @@
public BeanNamingTest() {}
public void testNamedPackage() throws CoreException, IOException {
- ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
//1. package @Named; class not annotated
Set<IBean> bs = cdi.getBeans(new Path("/CDISolderTest/src/org/jboss/named/Dog.java"));
@@ -51,7 +51,7 @@
}
public void testFullyQualifiedPackage() throws CoreException {
- ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
//1. package @FullyQualified and @Named; class not annotated
Set<IBean> bs = cdi.getBeans(new Path("/CDISolderTest/src/org/jboss/fullyqualified/Cat.java"));
@@ -74,7 +74,7 @@
}
public void testFullyQualifiedProducers() {
- ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
//1. package @FullyQualified
Set<IBean> bs = cdi.getBeans(new Path("/CDISolderTest/src/org/jboss/fullyqualified/Elephant.java"));
@@ -138,7 +138,7 @@
}
public void testAnnotatedPackagesInJars() {
- ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
// Package @FullyQualified and @Named
@@ -168,7 +168,5 @@
IProducerMethod mb = (IProducerMethod)b;
IMember m = mb.getSourceMember();
assertEquals("getSong", m.getElementName());
-
}
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/DefaultBeanTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/DefaultBeanTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/DefaultBeanTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -10,21 +10,17 @@
******************************************************************************/
package org.jboss.tools.cdi.seam.solder.core.test;
-import java.io.IOException;
import java.util.Iterator;
import java.util.Set;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IField;
-import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.core.IClassBean;
-import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IInjectionPointField;
import org.jboss.tools.cdi.core.IProducerField;
import org.jboss.tools.cdi.core.IProducerMethod;
@@ -39,7 +35,7 @@
public DefaultBeanTest() {}
public void testDefaultBeanTest() throws CoreException {
- ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
// 1. For injection point with qualifier @Small, the only eligible bean is
// default class bean with qualifier @Small
@@ -133,7 +129,5 @@
bs = cdi.getBeans(true, injection);
assertEquals(1, bs.size());
assertTrue(!bs.contains(b));
-
}
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/ExactTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/ExactTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/ExactTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -33,7 +33,7 @@
public ExactTest() {}
public void testExact() throws CoreException, IOException {
- ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
Set<IBean> bs = cdi.getBeans(new Path("/CDISolderTest/src/org/jboss/exact/FishFactory.java"));
assertEquals(2, bs.size());
@@ -73,5 +73,4 @@
}
assertEquals(3, count);
}
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -39,7 +39,7 @@
public GenericBeanTest() {}
public void testGenericBeanEndPointInjections() throws CoreException {
- ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
/*
* Case 1. (default qualifier case)
@@ -109,11 +109,10 @@
assertTrue(gb instanceof IClassBean);
IClassBean gbc = (IClassBean)gb;
assertEquals("MyExtendedConfiguration", gbc.getBeanClass().getElementName());
-
}
public void testGenericBeanInjectionIntoGenericPoint() throws CoreException {
- ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
/*
* Injection point: in class MyGenericBean2
@@ -132,13 +131,11 @@
IProducerMethod m = (IProducerMethod)b;
assertEquals("createMyFirstBean", m.getMethod().getElementName());
}
-
-
}
public void testGenericTypeInjection() throws CoreException {
- ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
-
+ ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
+
/*
* Injection point: in class MyGenericBean2
* @Inject MyGenericType type;
@@ -156,7 +153,6 @@
IType t = ((IClassBean)b).getBeanClass();
assertEquals("org.jboss.generic.MyGenericType", t.getFullyQualifiedName());
}
-
}
//TODO - more tests
@@ -185,8 +181,8 @@
}
public void testVetoedGenericBeanInjectionIntoGenericPoint() throws CoreException {
- ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
-
+ ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
+
/*
* Injection point: in class MessageManager
* @Inject @Generic MessageQueue queue;
@@ -212,12 +208,11 @@
}
assertNotNull(beanToBeVetoed);
-
/*
* Replace DurableQueueConfiguration.java with vetoed version.
* After that there are only 2 configurations.
*/
- replaceFile(project, "src/org/jboss/generic2/DurableQueueConfiguration.vetoed",
+ replaceFile(getTestProject(), "src/org/jboss/generic2/DurableQueueConfiguration.vetoed",
"src/org/jboss/generic2/DurableQueueConfiguration.java");
beanToBeVetoed = null;
@@ -241,7 +236,7 @@
* Set original DurableQueueConfiguration.java back.
* Make sure that there are again 3 configurations.
*/
- replaceFile(project, "src/org/jboss/generic2/DurableQueueConfiguration.original",
+ replaceFile(getTestProject(), "src/org/jboss/generic2/DurableQueueConfiguration.original",
"src/org/jboss/generic2/DurableQueueConfiguration.java");
beanToBeVetoed = null;
@@ -266,5 +261,4 @@
static void replaceFile(IProject project, String sourcePath, String targetPath) throws CoreException {
GenericBeanValidationTest.writeFile(project, sourcePath, targetPath);
}
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanValidationTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanValidationTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -12,12 +12,12 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
import org.jboss.tools.cdi.seam.solder.core.validation.SeamSolderValidationMessages;
+import org.jboss.tools.jst.jsp.test.TestUtil;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
import org.jboss.tools.tests.AbstractResourceMarkerTest;
@@ -36,7 +36,7 @@
* BrokenGenericType is annotated @GenericType(MyGenericBean.class)
* Generic configuration types may not be generic beans.
*/
- IFile file = project.getFile(new Path("src/org/jboss/generic/BrokenGenericType.java"));
+ IFile file = getTestProject().getFile(new Path("src/org/jboss/generic/BrokenGenericType.java"));
AbstractResourceMarkerTest.assertMarkerIsCreated(file, SeamSolderValidationMessages.GENERIC_CONFIGURATION_TYPE_IS_A_GENERIC_BEAN, 5);
}
@@ -45,7 +45,7 @@
* BrokenGenericBean is annotated @GenericConfiguration(Override.class)
* Annotation type mismatch: 'Override' is not a generic configuration annotation.
*/
- IFile file = project.getFile(new Path("src/org/jboss/generic/BrokenGenericBean.java"));
+ IFile file = getTestProject().getFile(new Path("src/org/jboss/generic/BrokenGenericBean.java"));
AbstractResourceMarkerTest.assertMarkerIsCreated(file, SeamSolderValidationMessages.WRONG_GENERIC_CONFIGURATION_ANNOTATION_REFERENCE.substring(0, 25) + ".*", 8);
}
@@ -56,7 +56,7 @@
* There are 3 generic configuration points, two of them have same qualifier
* Assert that MessageLogger has error marker.
*/
- IFile file = project.getFile(new Path("src/org/jboss/generic2/MessageLogger.java"));
+ IFile file = getTestProject().getFile(new Path("src/org/jboss/generic2/MessageLogger.java"));
AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS + ".*", 15);
@@ -72,7 +72,7 @@
* Set original DurableQueueConfiguration.java back.
* After that there are only 2 configurations, with different qualifiers.
*/
- writeFile(project, "src/org/jboss/generic2/DurableQueueConfiguration.original",
+ writeFile(getTestProject(), "src/org/jboss/generic2/DurableQueueConfiguration.original",
"src/org/jboss/generic2/DurableQueueConfiguration.java");
AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS + ".*", 15);
@@ -86,7 +86,7 @@
* Assert that MessageLogger has error marker.
* in all cases bean is produced by MyGenericBean.createMyFirstBean()
*/
- IFile file = project.getFile(new Path("src/org/jboss/generic2/MessageLogger.java"));
+ IFile file = getTestProject().getFile(new Path("src/org/jboss/generic2/MessageLogger.java"));
AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS + ".*", 15);
@@ -94,7 +94,7 @@
* Replace DurableQueueConfiguration.java with not generic version.
* After that there are only 2 configurations.
*/
- writeFile(project, "src/org/jboss/generic2/DurableQueueConfiguration.notgeneric",
+ writeFile(getTestProject(), "src/org/jboss/generic2/DurableQueueConfiguration.notgeneric",
"src/org/jboss/generic2/DurableQueueConfiguration.java");
AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS + ".*");
@@ -103,7 +103,7 @@
* Set original DurableQueueConfiguration.java back.
* Assert that MessageLogger again has error marker.
*/
- writeFile(project, "src/org/jboss/generic2/DurableQueueConfiguration.original",
+ writeFile(getTestProject(), "src/org/jboss/generic2/DurableQueueConfiguration.original",
"src/org/jboss/generic2/DurableQueueConfiguration.java");
AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS + ".*", 15);
@@ -113,7 +113,7 @@
/*
* Generic configuration point DurableQueueConfiguration has correct type.
*/
- IFile file = project.getFile(new Path("src/org/jboss/generic2/DurableQueueConfiguration.java"));
+ IFile file = getTestProject().getFile(new Path("src/org/jboss/generic2/DurableQueueConfiguration.java"));
AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, SeamSolderValidationMessages.WRONG_TYPE_OF_GENERIC_CONFIGURATION_POINT + ".*");
@@ -121,7 +121,7 @@
* Remove DurableQueueConfiguration.java with vetoed version.
* Generic configuration point DurableQueueConfiguration has incorrect type.
*/
- writeFile(project, "src/org/jboss/generic2/DurableQueueConfiguration.wrongtype",
+ writeFile(getTestProject(), "src/org/jboss/generic2/DurableQueueConfiguration.wrongtype",
"src/org/jboss/generic2/DurableQueueConfiguration.java");
AbstractResourceMarkerTest.assertMarkerIsCreated(file, SeamSolderValidationMessages.WRONG_TYPE_OF_GENERIC_CONFIGURATION_POINT + ".*", 11);
@@ -130,7 +130,7 @@
* Set original DurableQueueConfiguration.java back.
* Generic configuration point DurableQueueConfiguration has correct type.
*/
- writeFile(project, "src/org/jboss/generic2/DurableQueueConfiguration.original",
+ writeFile(getTestProject(), "src/org/jboss/generic2/DurableQueueConfiguration.original",
"src/org/jboss/generic2/DurableQueueConfiguration.java");
AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, SeamSolderValidationMessages.WRONG_TYPE_OF_GENERIC_CONFIGURATION_POINT + ".*");
@@ -141,7 +141,7 @@
* ConfigurationPointProducer has no duplicate generic configuration points,
* because one of them has an additional qualifier.
*/
- IFile file = project.getFile(new Path("src/org/jboss/generic3/ConfigurationPointProducer.java"));
+ IFile file = getTestProject().getFile(new Path("src/org/jboss/generic3/ConfigurationPointProducer.java"));
AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, SeamSolderValidationMessages.AMBIGUOUS_GENERIC_CONFIGURATION_POINT.substring(0, 35) + ".*");
@@ -149,7 +149,7 @@
* Replace ConfigurationPointProducer with version where configuration points have same qualifiers.
* It has duplicate generic configuration points.
*/
- writeFile(project, "src/org/jboss/generic3/ConfigurationPointProducer.duplicates",
+ writeFile(getTestProject(), "src/org/jboss/generic3/ConfigurationPointProducer.duplicates",
"src/org/jboss/generic3/ConfigurationPointProducer.java");
AbstractResourceMarkerTest.assertMarkerIsCreated(file, SeamSolderValidationMessages.AMBIGUOUS_GENERIC_CONFIGURATION_POINT.substring(0, 35) + ".*", 19, 25);
@@ -158,7 +158,7 @@
* Set original ConfigurationPointProducer.java back.
* ConfigurationPointProducer has no duplicate generic configuration points.
*/
- writeFile(project, "src/org/jboss/generic3/ConfigurationPointProducer.original",
+ writeFile(getTestProject(), "src/org/jboss/generic3/ConfigurationPointProducer.original",
"src/org/jboss/generic3/ConfigurationPointProducer.java");
AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, SeamSolderValidationMessages.AMBIGUOUS_GENERIC_CONFIGURATION_POINT.substring(0, 35) + ".*");
@@ -166,13 +166,12 @@
// https://issues.jboss.org/browse/JBIDE-9255
public void testDuplicateNamedBeans() throws CoreException {
- IFile file = project.getFile(new Path("src/org/jboss/generic4/MyMessageQueues.java"));
+ IFile file = getTestProject().getFile(new Path("src/org/jboss/generic4/MyMessageQueues.java"));
AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.DUPLCICATE_EL_NAME.substring(0, 11) + ".*", 10, 17);
}
static void writeFile(IProject project, String sourcePath, String targetPath) throws CoreException {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
try {
IFile target = project.getFile(new Path(targetPath));
IFile source = project.getFile(new Path(sourcePath));
@@ -182,9 +181,7 @@
} else {
target.setContents(source.getContents(), true, false, new NullProgressMonitor());
}
- JobUtils.waitForIdle();
- project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new NullProgressMonitor());
- JobUtils.waitForIdle();
+ TestUtil.validate(target);
} finally {
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
JobUtils.waitForIdle();
@@ -193,18 +190,14 @@
void removeFile(String targetPath) throws CoreException {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
try {
- IFile target = project.getFile(new Path(targetPath));
- assertTrue(target.exists());
+ IFile target = getTestProject().getFile(new Path(targetPath));
+ assertTrue(target.exists());
target.delete(true, new NullProgressMonitor());
- JobUtils.waitForIdle();
- project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new NullProgressMonitor());
- JobUtils.waitForIdle();
+ TestUtil.validate(target);
} finally {
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
JobUtils.waitForIdle();
}
}
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/MessageLoggerTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/MessageLoggerTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/MessageLoggerTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -30,37 +30,34 @@
public MessageLoggerTest() {}
public void testMessageLogger() throws CoreException, IOException {
- ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
-
+ ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
+
IInjectionPointField logger = getInjectionPointField(cdi, "src/org/jboss/logger/LogAccess.java", "logger");
-
+
Set<IBean> bs = cdi.getBeans(false, logger);
assertEquals(1, bs.size());
-
+
IBean b = bs.iterator().next();
-
+
IType t = b.getBeanClass();
assertNotNull(t);
assertTrue(t.isInterface());
assertEquals("org.jboss.logger.MyLogger", t.getFullyQualifiedName());
-
}
public void testMessageBundle() throws CoreException, IOException {
- ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
-
+ ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
+
IInjectionPointField bundle = getInjectionPointField(cdi, "src/org/jboss/logger/LogAccess.java", "bundle");
-
+
Set<IBean> bs = cdi.getBeans(false, bundle);
assertEquals(1, bs.size());
-
+
IBean b = bs.iterator().next();
-
+
IType t = b.getBeanClass();
assertNotNull(t);
assertTrue(t.isInterface());
assertEquals("org.jboss.logger.MyBundle", t.getFullyQualifiedName());
-
}
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamSolderTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamSolderTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamSolderTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -13,13 +13,11 @@
import junit.framework.TestCase;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.core.IInjectionPointField;
import org.jboss.tools.cdi.core.test.DependentProjectTest;
-import org.jboss.tools.test.util.ResourcesUtils;
/**
*
@@ -31,30 +29,48 @@
protected static String PROJECT_NAME = "CDISolderTest";
protected static String PROJECT_PATH = "/projects/CDISolderTest";
- protected IProject project;
- protected ICDIProject cdiProject;
+ private ICDIProject cdiProject;
+ private IProject project;
- public SeamSolderTest() {
- project = getTestProject();
- cdiProject = CDICorePlugin.getCDIProject(project, false);
- }
-
public IProject getTestProject() {
- if(project==null) {
- try {
- project = findTestProject();
- if(project==null || !project.exists()) {
- project = ResourcesUtils.importProject(PLUGIN_ID, PROJECT_PATH);
- project.build(IncrementalProjectBuilder.FULL_BUILD, null);
- }
- } catch (Exception e) {
- e.printStackTrace();
- fail("Can't import CDI test project: " + e.getMessage());
- }
+ if(cdiProject==null) {
+ project = findTestProject();
+ cdiProject = CDICorePlugin.getCDIProject(project, true);
}
return project;
}
+ public ICDIProject getCDIProject() {
+ if(cdiProject==null) {
+ getTestProject();
+ }
+ return cdiProject;
+ }
+
+ // protected IProject project;
+// protected ICDIProject cdiProject;
+
+// public SeamSolderTest() {
+// project = getTestProject();
+// cdiProject = CDICorePlugin.getCDIProject(project, false);
+// }
+//
+// public IProject getTestProject() {
+// if(project==null) {
+// try {
+// project = findTestProject();
+// if(project==null || !project.exists()) {
+// project = ResourcesUtils.importProject(PLUGIN_ID, PROJECT_PATH);
+// project.build(IncrementalProjectBuilder.FULL_BUILD, null);
+// }
+// } catch (Exception e) {
+// e.printStackTrace();
+// fail("Can't import CDI test project: " + e.getMessage());
+// }
+// }
+// return project;
+// }
+
public static IProject findTestProject() {
return ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamSolderTestSetup.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamSolderTestSetup.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamSolderTestSetup.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -15,6 +15,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.jboss.tools.jst.jsp.test.TestUtil;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
@@ -34,13 +35,13 @@
project = ResourcesPlugin.getWorkspace().getRoot().getProject(SeamSolderTest.PROJECT_NAME);
if(project == null || !project.exists()) {
project = ResourcesUtils.importProject(SeamSolderTest.PLUGIN_ID, SeamSolderTest.PROJECT_PATH);
+ TestUtil._waitForValidation(project);
}
}
@Override
protected void tearDown() throws Exception {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
project.delete(true, true, null);
JobUtils.waitForIdle();
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/ServiceHandlerTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/ServiceHandlerTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/ServiceHandlerTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -14,16 +14,11 @@
import java.util.Set;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IType;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.ICDIProject;
-import org.jboss.tools.cdi.core.IClassBean;
-import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IInjectionPointField;
-import org.jboss.tools.cdi.core.IProducerMethod;
/**
*
@@ -35,20 +30,18 @@
public ServiceHandlerTest() {}
public void testMessageLogger() throws CoreException, IOException {
- ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
-
+ ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
+
IInjectionPointField logger = getInjectionPointField(cdi, "src/org/jboss/service/UserListManager.java", "userQuery");
-
+
Set<IBean> bs = cdi.getBeans(false, logger);
assertEquals(1, bs.size());
-
+
IBean b = bs.iterator().next();
-
+
IType t = b.getBeanClass();
assertNotNull(t);
assertTrue(t.isInterface());
assertEquals("org.jboss.service.UserQuery", t.getFullyQualifiedName());
-
}
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/UnwrapsTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/UnwrapsTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/UnwrapsTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -31,21 +31,19 @@
public UnwrapsTest() {}
public void testUnwraps() throws CoreException, IOException {
- ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
-
+ ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
+
IInjectionPointField logger = getInjectionPointField(cdi, "src/org/jboss/unwraps/Unwrapped.java", "permission");
-
+
Set<IBean> bs = cdi.getBeans(false, logger);
assertEquals(1, bs.size());
-
+
IBean b = bs.iterator().next();
-
+
assertTrue(b instanceof IProducerMethod);
-
+
IProducerMethod m = (IProducerMethod)b;
assertTrue(m.isAnnotationPresent(CDISeamSolderConstants.UNWRAPS_ANNOTATION_TYPE_NAME));
assertEquals("getPermission", m.getMethod().getElementName());
-
}
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/VetoTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/VetoTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/VetoTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.cdi.seam.solder.core.test;
-
import java.io.IOException;
import java.util.Set;
@@ -32,7 +31,7 @@
public VetoTest() {}
public void testVeto() throws CoreException, IOException {
- ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
//1. package annotated @Veto; class is not annotated with it
TypeDefinition d = cdi.getNature().getDefinitions().getTypeDefinition("org.jboss.vetoed.Tiger");
@@ -60,7 +59,7 @@
}
public void testRequires() throws CoreException, IOException {
- ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
//1. class annotated @Requires that references single non-available class
TypeDefinition d = cdi.getNature().getDefinitions().getTypeDefinition("org.jboss.requires.Bear");
@@ -93,7 +92,5 @@
//4. class annotated @Requires that references array of available classes
bs = cdi.getBeans("dragonfly", false);
assertEquals(1, bs.size()); //...CDI model has a bean named "dragonfly"
-
}
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/InjectedPointHyperlinkTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/InjectedPointHyperlinkTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/InjectedPointHyperlinkTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -14,7 +14,7 @@
public class InjectedPointHyperlinkTest extends SeamSolderTest {
public void testInjectedPointHyperlinkDetector() throws Exception {
- Set<IBean> beans = cdiProject.getBeans("/CDISolderTest/src/org/jboss/generic2/MessageManager.java", true);
+ Set<IBean> beans = getCDIProject().getBeans("/CDISolderTest/src/org/jboss/generic2/MessageManager.java", true);
IBean bean=null;
for(IBean b : beans){
bean = b;
@@ -44,8 +44,7 @@
regionList.add(new TestRegion(/*318, 6*/"policy", new TestHyperlink[]{
new TestHyperlink(InjectedPointHyperlink.class, CDIExtensionsMessages.CDI_INJECTED_POINT_HYPERLINK_OPEN_INJECT_BEAN+ " MessageManager.getPolicy()", bean),
})); // logger
-
- CDIHyperlinkTestUtil.checkRegions(project, "src/org/jboss/generic2/DurableMessageLogger.java", regionList, new InjectedPointHyperlinkDetector());
- }
-}
+ CDIHyperlinkTestUtil.checkRegions(getTestProject(), "src/org/jboss/generic2/DurableMessageLogger.java", regionList, new InjectedPointHyperlinkDetector());
+ }
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/SeamGenericInjectedPointHyperlinkTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/SeamGenericInjectedPointHyperlinkTest.java 2011-08-09 19:21:41 UTC (rev 33733)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/SeamGenericInjectedPointHyperlinkTest.java 2011-08-09 19:38:32 UTC (rev 33734)
@@ -10,30 +10,11 @@
******************************************************************************/
package org.jboss.tools.cdi.seam.text.ext.test;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector;
import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.jboss.tools.cdi.seam.config.core.test.SeamConfigTest;
import org.jboss.tools.cdi.seam.solder.core.test.SeamSolderTest;
-import org.jboss.tools.cdi.seam.text.ext.CDISeamExtPlugin;
import org.jboss.tools.cdi.seam.text.ext.hyperlink.GenericInjectedPointHyperlink;
import org.jboss.tools.cdi.seam.text.ext.hyperlink.GenericInjectedPointHyperlinkDetector;
import org.jboss.tools.cdi.seam.text.ext.hyperlink.GenericInjectedPointListHyperlink;
-import org.jboss.tools.cdi.seam.text.ext.hyperlink.SeamConfigInjectedPointHyperlink;
-import org.jboss.tools.cdi.seam.text.ext.hyperlink.SeamConfigInjectedPointHyperlinkDetector;
-import org.jboss.tools.cdi.text.ext.test.CDIHyperlinkTestUtil;
-import org.jboss.tools.common.util.FileUtil;
/**
*
@@ -48,7 +29,7 @@
public void testFieldInjection() throws Exception {
IHyperlink hyperlink = SeamConfigInjectedPointHyperlinkTest.checkHyperLinkInJava(
"src/org/jboss/generic/MyBeanInjections.java",
- project,
+ getTestProject(),
"first1", 1,
new GenericInjectedPointHyperlinkDetector(),
HYPERLINK_NAME);
@@ -60,7 +41,7 @@
public void testGenericInjection() throws Exception {
IHyperlink hyperlink = SeamConfigInjectedPointHyperlinkTest.checkHyperLinkInJava(
"src/org/jboss/generic/MyGenericBean.java",
- project,
+ getTestProject(),
"config", 1,
new GenericInjectedPointHyperlinkDetector(),
LIST_HYPERLYNK_NAME);
@@ -68,5 +49,4 @@
//
// SeamConfigInjectedPointHyperlinkTest.checkResult("MyConfigurationProducer.java", "getOneConfig");
}
-
-}
+}
\ No newline at end of file
14 years, 8 months
JBoss Tools SVN: r33733 - workspace/bfitzpat/SOA_5_2_Examples.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2011-08-09 15:21:41 -0400 (Tue, 09 Aug 2011)
New Revision: 33733
Modified:
workspace/bfitzpat/SOA_5_2_Examples/aggregator_eclipse.zip
Log:
SOA-2988 - adding src folder back to inbound_splitter subproject of aggregator
Modified: workspace/bfitzpat/SOA_5_2_Examples/aggregator_eclipse.zip
===================================================================
(Binary files differ)
14 years, 8 months
JBoss Tools SVN: r33732 - workspace/bfitzpat/SOA_5_2_Examples.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2011-08-09 15:06:30 -0400 (Tue, 09 Aug 2011)
New Revision: 33732
Modified:
workspace/bfitzpat/SOA_5_2_Examples/aggregator_eclipse.zip
Log:
SOA-2988 - removing src folder from inbound_splitter subproject of aggregator
Modified: workspace/bfitzpat/SOA_5_2_Examples/aggregator_eclipse.zip
===================================================================
(Binary files differ)
14 years, 8 months
JBoss Tools SVN: r33731 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi: internal/core/impl/definition and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-08-09 14:56:16 -0400 (Tue, 09 Aug 2011)
New Revision: 33731
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreNature.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java
Log:
JBIDE-9484
https://issues.jboss.org/browse/JBIDE-9484
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreNature.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreNature.java 2011-08-09 18:55:45 UTC (rev 33730)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreNature.java 2011-08-09 18:56:16 UTC (rev 33731)
@@ -151,17 +151,16 @@
List<TypeDefinition> ds = getDefinitions().getTypeDefinitions();
List<TypeDefinition> result = new ArrayList<TypeDefinition>();
result.addAll(ds);
- Set<IType> types = new HashSet<IType>();
+ Set<String> keys = new HashSet<String>();
for (TypeDefinition d: ds) {
- IType t = d.getType();
- if(t != null) types.add(t);
+ keys.add(d.getKey());
}
for (CDICoreNature p: ps) {
List<TypeDefinition> ds2 = p.getDefinitions().getTypeDefinitions();
for (TypeDefinition d: ds2) {
- IType t = d.getType();
- if(t != null && !types.contains(t)) {
- types.add(t);
+ String key = d.getKey();
+ if(!keys.contains(key)) {
+ keys.add(key);
result.add(d);
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java 2011-08-09 18:55:45 UTC (rev 33730)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java 2011-08-09 18:56:16 UTC (rev 33731)
@@ -95,6 +95,18 @@
return parametedType == null ? new HashSet<IParametedType>() : parametedType.getAllTypes();
}
+ /**
+ * Returns strings that uniquely identifies this definition
+ * @return
+ */
+ public String getKey() {
+ String result = getQualifiedName();
+ if(originalDefinition != null) {
+ result += ":" + originalDefinition.getStartPosition() + ":" + originalDefinition.getLength();
+ }
+ return result;
+ }
+
public String getContent() {
if(type == null || type.isBinary()) return null;
if(content == null && resource instanceof IFile && resource.getName().endsWith(".java")) {
14 years, 8 months
JBoss Tools SVN: r33730 - workspace/bfitzpat/SOA_5_2_Examples.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2011-08-09 14:55:45 -0400 (Tue, 09 Aug 2011)
New Revision: 33730
Modified:
workspace/bfitzpat/SOA_5_2_Examples/aggregator_eclipse.zip
workspace/bfitzpat/SOA_5_2_Examples/soa-p-5.2-samples.xml
Log:
SOA-2988 - correcting deployment settings for one of the aggregator projects and updating zip file sizes in the project examples xml
Modified: workspace/bfitzpat/SOA_5_2_Examples/aggregator_eclipse.zip
===================================================================
(Binary files differ)
Modified: workspace/bfitzpat/SOA_5_2_Examples/soa-p-5.2-samples.xml
===================================================================
--- workspace/bfitzpat/SOA_5_2_Examples/soa-p-5.2-samples.xml 2011-08-09 18:29:27 UTC (rev 33729)
+++ workspace/bfitzpat/SOA_5_2_Examples/soa-p-5.2-samples.xml 2011-08-09 18:55:45 UTC (rev 33730)
@@ -5,7 +5,7 @@
<included-projects>aggregator_aggregation_eclipse,aggregator_blue_service_eclipse,aggregator_eclipse_test,aggregator_green_service_eclipse,aggregator_inbound_splitter_eclipse,aggregator_red_service_eclipse</included-projects>
<shortDescription>aggregator_eclipse</shortDescription>
<description>The purpose of this particular example is to demonstrate the Enterprise Integration Patterns of Splitter and Aggregator. In addition, this example demonstrates the concepts of multiple JVMs, each running unique services but all working in concert, a federated model that shares a common registry and uses JMS between the JVMs.</description>
- <size>33848</size> <!-- size of the zip file -->
+ <size>75809</size> <!-- size of the zip file -->
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/bfitzpat/SOA_5_2_Exam...</url>
<fixes>
<fix type="wtpruntime">
@@ -22,7 +22,7 @@
<included-projects>business_service_eclipse,business_service_eclipse_test</included-projects>
<shortDescription>business_service_eclipse</shortDescription>
<description>This example demonstrates the how to access an EJB3 Stateless Session Bean from within an ESB Action. ESB Actions are primarily custom mediation components which allow you to introduce different specialized transformations, routing behaviors, orchestration, etc. The EJB3 is a simple "Hello World" annotated POJO.</description>
- <size>13239</size> <!-- size of the zip file -->
+ <size>17993</size> <!-- size of the zip file -->
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/bfitzpat/SOA_5_2_Exam...</url>
<fixes>
<fix type="wtpruntime">
@@ -39,7 +39,7 @@
<included-projects>custom_action_eclipse,custom_action_eclipse_test</included-projects>
<shortDescription>custom_action_eclipse</shortDescription>
<description>The purpose of the custom_action quickstart example is to show different ways of using Action classes.</description>
- <size>16398</size> <!-- size of the zip file -->
+ <size>19737</size> <!-- size of the zip file -->
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/bfitzpat/SOA_5_2_Exam...</url>
<fixes>
<fix type="wtpruntime">
@@ -56,7 +56,7 @@
<included-projects>fun_cbr_eclipse,fun_cbr_eclipse_test</included-projects>
<shortDescription>fun_cbr_eclipse</shortDescription>
<description>This example has three "teams" of order processors. All new orders that flow into the system can be evaluated via the XPath or Drools rule processors. These routing rules will determine which team receives the order for actually processing. In the case of the green team, the order is first transformed to a different format prior to routing.</description>
- <size>25866</size> <!-- size of the zip file -->
+ <size>31633</size> <!-- size of the zip file -->
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/bfitzpat/SOA_5_2_Exam...</url>
<fixes>
<fix type="wtpruntime">
@@ -73,7 +73,7 @@
<included-projects>helloworld_action_eclipse,helloworld_action_eclipse_test</included-projects>
<shortDescription>helloworld_action_eclipse</shortDescription>
<description>The purpose of the helloworld_action quickstart sample is to show the use of multiple action invocations from a single configuration. You can use a single Action class and make multiple method calls or use multiple Action classes</description>
- <size>8156</size> <!-- size of the zip file -->
+ <size>18894</size> <!-- size of the zip file -->
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/bfitzpat/SOA_5_2_Exam...</url>
<fixes>
<fix type="wtpruntime">
@@ -90,7 +90,7 @@
<included-projects>helloworld_eclipse,helloworld_eclipse_test</included-projects>
<shortDescription>helloworld_eclipse</shortDescription>
<description>The purpose of the helloworld quickstart sample is to prove that the ESB is properly configured and happy. As well as to demonstrate the needed minimal files to make a basic ESB component execute.</description>
- <size>6262</size> <!-- size of the zip file -->
+ <size>14056</size> <!-- size of the zip file -->
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/bfitzpat/SOA_5_2_Exam...</url>
<fixes>
<fix type="wtpruntime">
@@ -107,7 +107,7 @@
<included-projects>simple_cbr_eclipse,simple_cbr_eclipse_test</included-projects>
<shortDescription>simple_cbr_eclipse</shortDescription>
<description>The purpose of the simple_cbr quickstart is to demonstrate the Content Based Router in JBoss ESB.</description>
- <size>17630</size> <!-- size of the zip file -->
+ <size>24985</size> <!-- size of the zip file -->
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/bfitzpat/SOA_5_2_Exam...</url>
<fixes>
<fix type="wtpruntime">
@@ -124,7 +124,7 @@
<included-projects>static_router_eclipse,static_router_eclipse_test</included-projects>
<shortDescription>static_router_eclipse</shortDescription>
<description>This quick start will create a file on the FTP server and show the progress of the message through a static route. Intermediate files will be created in the directories under build/dirs/</description>
- <size>6194</size> <!-- size of the zip file -->
+ <size>9194</size> <!-- size of the zip file -->
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/bfitzpat/SOA_5_2_Exam...</url>
<fixes>
<fix type="wtpruntime">
@@ -141,7 +141,7 @@
<included-projects>transform_XML2POJO_eclipse,transform_XML2POJO_eclipse_test</included-projects>
<shortDescription>transform_XML2POJO_eclipse</shortDescription>
<description>The purpose of the simple_transformation quickstart sample is to illustrate the use of Smooks performing a simple transformation by converting a XML file into Java POJOs.</description>
- <size>23662</size> <!-- size of the zip file -->
+ <size>26927</size> <!-- size of the zip file -->
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/bfitzpat/SOA_5_2_Exam...</url>
<fixes>
<fix type="wtpruntime">
14 years, 8 months
JBoss Tools SVN: r33729 - trunk/jst/plugins/org.jboss.tools.jst.jsp.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-08-09 14:29:27 -0400 (Tue, 09 Aug 2011)
New Revision: 33729
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml
Log:
https://issues.jboss.org/browse/JBIDE-9445 , now enabled only from editor's context
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml 2011-08-09 18:19:36 UTC (rev 33728)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml 2011-08-09 18:29:27 UTC (rev 33729)
@@ -379,23 +379,22 @@
commandId="org.jboss.tools.jst.jsp.commands.i18"
id="org.jboss.tools.jst.jsp.menus.i18"
mnemonic="S">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeEditorId">
- <or>
- <equals
- value="org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor">
- </equals>
- <equals
- value="org.jboss.tools.jst.jsp.jspeditor.HTMLTextEditor">
- </equals>
- <equals
- value="org.jboss.tools.jst.jsp.jspeditor.DocBookEditor">
- </equals>
- </or>
- </with>
- </visibleWhen>
+ <visibleWhen checkEnabled="false">
+ <and>
+ <with variable="activeContexts">
+ <iterate operator="or">
+ <equals value="org.eclipse.wst.sse.ui.structuredTextEditorScope"/>
+ </iterate>
+ </with>
+ <with variable="activeEditorId">
+ <or>
+ <equals value="org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor" />
+ <equals value="org.jboss.tools.jst.jsp.jspeditor.HTMLTextEditor" />
+ <equals value="org.jboss.tools.jst.jsp.jspeditor.DocBookEditor" />
+ </or>
+ </with>
+ </and>
+ </visibleWhen>
</command>
</menuContribution>
<menuContribution
14 years, 8 months
JBoss Tools SVN: r33728 - trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-08-09 14:19:36 -0400 (Tue, 09 Aug 2011)
New Revision: 33728
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamSolderTest.java
Log:
https://issues.jboss.org/browse/JBIDE-9394
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamSolderTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamSolderTest.java 2011-08-09 18:04:28 UTC (rev 33727)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/SeamSolderTest.java 2011-08-09 18:19:36 UTC (rev 33728)
@@ -10,21 +10,14 @@
******************************************************************************/
package org.jboss.tools.cdi.seam.solder.core.test;
-import java.util.Iterator;
-import java.util.Set;
-
import junit.framework.TestCase;
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.osgi.internal.loader.buddy.DependentPolicy;
import org.jboss.tools.cdi.core.CDICorePlugin;
-import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.ICDIProject;
-import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IInjectionPointField;
-import org.jboss.tools.cdi.core.IProducer;
import org.jboss.tools.cdi.core.test.DependentProjectTest;
import org.jboss.tools.test.util.ResourcesUtils;
@@ -52,6 +45,7 @@
project = findTestProject();
if(project==null || !project.exists()) {
project = ResourcesUtils.importProject(PLUGIN_ID, PROJECT_PATH);
+ project.build(IncrementalProjectBuilder.FULL_BUILD, null);
}
} catch (Exception e) {
e.printStackTrace();
@@ -68,5 +62,4 @@
protected IInjectionPointField getInjectionPointField(ICDIProject cdi, String beanClassFilePath, String fieldName) {
return DependentProjectTest.getInjectionPointField(cdi, beanClassFilePath, fieldName);
}
-
-}
+}
\ No newline at end of file
14 years, 8 months
JBoss Tools SVN: r33727 - trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-08-09 14:04:28 -0400 (Tue, 09 Aug 2011)
New Revision: 33727
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigValidationTest.java
Log:
https://issues.jboss.org/browse/JBIDE-9394
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigValidationTest.java 2011-08-09 17:41:34 UTC (rev 33726)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/SeamConfigValidationTest.java 2011-08-09 18:04:28 UTC (rev 33727)
@@ -16,19 +16,15 @@
import org.eclipse.core.internal.preferences.EclipsePreferences;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.seam.config.core.CDISeamConfigPreferences;
import org.jboss.tools.cdi.seam.config.core.validation.SeamConfigValidationMessages;
import org.jboss.tools.common.preferences.SeverityPreferences;
-import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.jst.jsp.test.TestUtil;
import org.jboss.tools.test.util.ResourcesUtils;
import org.jboss.tools.tests.AbstractResourceMarkerTest;
@@ -59,6 +55,7 @@
project = findTestProject();
if(project==null || !project.exists()) {
project = ResourcesUtils.importProject(PLUGIN_ID, PROJECT_PATH);
+ TestUtil._waitForValidation(project);
}
} catch (Exception e) {
e.printStackTrace();
@@ -85,7 +82,7 @@
public void testMethodResolution() throws CoreException {
//It is unresolved member because no member with that name is found.
AbstractResourceMarkerTest.assertMarkerIsCreated(f, MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER, "v:method2"), 38);
-
+
AbstractResourceMarkerTest.assertMarkerIsNotCreated(f, MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_MEMBER, "v:method1"), 34);
AbstractResourceMarkerTest.assertMarkerIsNotCreated(f, MessageFormat.format(SeamConfigValidationMessages.UNRESOLVED_METHOD, "v:method1"), 34);
@@ -115,21 +112,13 @@
EclipsePreferences ps = (EclipsePreferences)CDISeamConfigPreferences.getInstance().getDefaultPreferences();
ps.put(CDISeamConfigPreferences.UNRESOLVED_MEMBER, SeverityPreferences.IGNORE);
- rebuild();
+ TestUtil._waitForValidation(project);
AbstractResourceMarkerTest.assertMarkerIsCreated(f, pattern1, 47);
AbstractResourceMarkerTest.assertMarkerIsNotCreated(f, pattern2, 38);
ps.put(CDISeamConfigPreferences.UNRESOLVED_MEMBER, SeverityPreferences.WARNING);
- rebuild();
+ TestUtil._waitForValidation(project);
AbstractResourceMarkerTest.assertMarkerIsCreated(f, pattern1, 47);
AbstractResourceMarkerTest.assertMarkerIsCreated(f, pattern2, 38);
}
-
- void rebuild() throws CoreException {
- project.build(IncrementalProjectBuilder.CLEAN_BUILD, new NullProgressMonitor());
- JobUtils.waitForIdle();
- project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
- JobUtils.waitForIdle();
- }
-
}
\ No newline at end of file
14 years, 8 months
JBoss Tools SVN: r33726 - trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/outline.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-08-09 13:41:34 -0400 (Tue, 09 Aug 2011)
New Revision: 33726
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/outline/OutlineLabelProvider.java
Log:
JBIDE-9498 NullPointerException in Freemarker IDE on certain files
fixed
Modified: trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/outline/OutlineLabelProvider.java
===================================================================
--- trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/outline/OutlineLabelProvider.java 2011-08-09 17:22:41 UTC (rev 33725)
+++ trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/outline/OutlineLabelProvider.java 2011-08-09 17:41:34 UTC (rev 33726)
@@ -38,21 +38,22 @@
}
public Image getImage(Object anElement) {
- if (null == anElement)
- return null;
+ Image result = null;
if (anElement instanceof Item) {
- return ImageManager.getImage(((Item) anElement).getTreeImage());
+ String imageName = ((Item) anElement).getTreeImage();
+ if(imageName != null) {
+ result = ImageManager.getImage(imageName);
+ }
}
- else {
- return null;
- }
+ return result;
}
public String getText(Object anElement) {
- if (anElement instanceof Item)
- return ((Item) anElement).getTreeDisplay();
- else
- return null;
+ String text = null;
+ if (anElement instanceof Item) {
+ text = ((Item) anElement).getTreeDisplay();
+ }
+ return text;
}
public void dispose() {
14 years, 8 months