JBoss Tools SVN: r43008 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-08-13 17:45:50 -0400 (Mon, 13 Aug 2012)
New Revision: 43008
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
Log:
JBIDE-12417
https://issues.jboss.org/browse/JBIDE-12417
Replaced Set by Collection in local variables in tests wherever it is possible.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2012-08-13 21:45:20 UTC (rev 43007)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2012-08-13 21:45:50 UTC (rev 43008)
@@ -1132,7 +1132,7 @@
* - there are multiple disposer methods for a single producer method
*/
for (IBeanMethod disposerMethod : disposerMethods) {
- Set<ITextSourceReference> disposerDeclarations = CDIUtil.getAnnotationPossitions(disposerMethod, CDIConstants.DISPOSES_ANNOTATION_TYPE_NAME);
+ Collection<ITextSourceReference> disposerDeclarations = CDIUtil.getAnnotationPossitions(disposerMethod, CDIConstants.DISPOSES_ANNOTATION_TYPE_NAME);
for (ITextSourceReference declaration : disposerDeclarations) {
addProblem(CDIValidationMessages.MULTIPLE_DISPOSERS_FOR_PRODUCER, CDIPreferences.MULTIPLE_DISPOSERS_FOR_PRODUCER, declaration, bean.getResource(), MULTIPLE_DISPOSERS_FOR_PRODUCER_ID);
}
12 years, 5 months
JBoss Tools SVN: r43007 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-08-13 17:45:20 -0400 (Mon, 13 Aug 2012)
New Revision: 43007
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
Log:
JBIDE-12417
https://issues.jboss.org/browse/JBIDE-12417
Replaced Set by Collection in local variables in tests wherever it is possible.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2012-08-13 21:27:57 UTC (rev 43006)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2012-08-13 21:45:20 UTC (rev 43007)
@@ -14,6 +14,7 @@
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -214,13 +215,13 @@
* @param beans
* @param element
*/
- public static IInjectionPoint findInjectionPoint(Set<IBean> beans, IJavaElement element, int position) {
+ public static IInjectionPoint findInjectionPoint(Collection<IBean> beans, IJavaElement element, int position) {
if (!(element instanceof IField) && !(element instanceof IMethod) && !(element instanceof ILocalVariable)) {
return null;
}
for (IBean bean : beans) {
- Set<IInjectionPoint> injectionPoints = bean.getInjectionPoints();
+ Collection<IInjectionPoint> injectionPoints = bean.getInjectionPoints();
for (IInjectionPoint iPoint : injectionPoints) {
if (element != null && iPoint.isDeclaredFor(element)) {
return iPoint;
@@ -315,12 +316,12 @@
return null;
}
if (!scopeTypeName.equals(scope.getSourceType().getFullyQualifiedName())) {
- Set<IScopeDeclaration> scopeDeclarations = scoped.getScopeDeclarations();
+ Collection<IScopeDeclaration> scopeDeclarations = scoped.getScopeDeclarations();
if (!scopeDeclarations.isEmpty()) {
return scopeDeclarations.iterator().next();
}
if (scoped instanceof IStereotyped) {
- Set<IStereotypeDeclaration> stereoTypeDeclarations = ((IStereotyped) scoped).getStereotypeDeclarations();
+ Collection<IStereotypeDeclaration> stereoTypeDeclarations = ((IStereotyped) scoped).getStereotypeDeclarations();
for (IStereotypeDeclaration stereotypeDeclaration : stereoTypeDeclarations) {
IStereotype stereotype = stereotypeDeclaration.getStereotype();
IScope stereotypeScope = stereotype.getScope();
@@ -346,13 +347,13 @@
public static IAnnotationDeclaration getScopeDeclaration(IBean bean, String scopeTypeName) {
IScope scope = bean.getScope();
if (scopeTypeName.equals(scope.getSourceType().getFullyQualifiedName())) {
- Set<IScopeDeclaration> scopeDeclarations = bean.getScopeDeclarations();
+ Collection<IScopeDeclaration> scopeDeclarations = bean.getScopeDeclarations();
for (IScopeDeclaration scopeDeclaration : scopeDeclarations) {
if (scopeTypeName.equals(scopeDeclaration.getScope().getSourceType().getFullyQualifiedName())) {
return scopeDeclaration;
}
}
- Set<IStereotypeDeclaration> stereoTypeDeclarations = bean.getStereotypeDeclarations();
+ Collection<IStereotypeDeclaration> stereoTypeDeclarations = bean.getStereotypeDeclarations();
for (IStereotypeDeclaration stereotypeDeclaration : stereoTypeDeclarations) {
IScope stereotypeScope = stereotypeDeclaration.getStereotype().getScope();
if (stereotypeScope != null && scopeTypeName.equals(stereotypeScope.getSourceType().getFullyQualifiedName())) {
@@ -382,7 +383,7 @@
}
}
if(annotated instanceof IStereotyped) {
- Set<IStereotypeDeclaration> stereoTypeDeclarations = ((IStereotyped)annotated).getStereotypeDeclarations();
+ Collection<IStereotypeDeclaration> stereoTypeDeclarations = ((IStereotyped)annotated).getStereotypeDeclarations();
for (IStereotypeDeclaration stereotypeDeclaration : stereoTypeDeclarations) {
if(getAnnotationDeclaration(stereotypeDeclaration.getStereotype(), annotation) != null) {
return stereotypeDeclaration;
@@ -468,7 +469,7 @@
if (qualifierDeclaration != null) {
return qualifierDeclaration;
}
- Set<IStereotypeDeclaration> stereotypeDeclarations = stereotyped.getStereotypeDeclarations();
+ Collection<IStereotypeDeclaration> stereotypeDeclarations = stereotyped.getStereotypeDeclarations();
for (IStereotypeDeclaration declaration : stereotypeDeclarations) {
if (getQualifiedStereotypeDeclaration(declaration.getStereotype(), qualifierTypeName) != null) {
return declaration;
@@ -494,9 +495,9 @@
* @param annotationTypeName
* @return
*/
- public static Set<ITextSourceReference> getAnnotationPossitions(IBeanMethod method, String annotationTypeName) {
+ public static Collection<ITextSourceReference> getAnnotationPossitions(IBeanMethod method, String annotationTypeName) {
List<IParameter> params = method.getParameters();
- Set<ITextSourceReference> declarations = new HashSet<ITextSourceReference>();
+ Collection<ITextSourceReference> declarations = new HashSet<ITextSourceReference>();
for (IParameter param : params) {
ITextSourceReference declaration = param.getAnnotationPosition(annotationTypeName);
if (declaration != null) {
12 years, 5 months
JBoss Tools SVN: r43006 - in trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test: .settings and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-08-13 17:27:57 -0400 (Mon, 13 Aug 2012)
New Revision: 43006
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/.settings/
trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/.settings/org.eclipse.jdt.core.prefs
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/InjectedPointHyperlinkTest.java
Log:
JBIDE-12417
https://issues.jboss.org/browse/JBIDE-12417
Replaced Set by Collection in local variables in tests wherever it is possible.
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/.classpath 2012-08-13 21:27:11 UTC (rev 43005)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/.classpath 2012-08-13 21:27:57 UTC (rev 43006)
@@ -1,7 +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 kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/.settings/org.eclipse.jdt.core.prefs 2012-08-13 21:27:57 UTC (rev 43006)
@@ -0,0 +1,8 @@
+#Fri Nov 04 10:56:09 PDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
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 2012-08-13 21:27:11 UTC (rev 43005)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/InjectedPointHyperlinkTest.java 2012-08-13 21:27:57 UTC (rev 43006)
@@ -11,7 +11,7 @@
package org.jboss.tools.cdi.seam.text.ext.test;
import java.util.ArrayList;
-import java.util.Set;
+import java.util.Collection;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.seam.solder.core.test.SeamSolderTest;
@@ -25,7 +25,7 @@
public class InjectedPointHyperlinkTest extends SeamSolderTest {
public void testInjectedPointHyperlinkDetector() throws Exception {
- Set<IBean> beans = getCDIProject().getBeans("/CDISolderTest/src/org/jboss/generic2/MessageManager.java", true);
+ Collection<IBean> beans = getCDIProject().getBeans("/CDISolderTest/src/org/jboss/generic2/MessageManager.java", true);
IBean bean=null;
for(IBean b : beans){
bean = b;
12 years, 5 months
JBoss Tools SVN: r43005 - in trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test: .settings and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-08-13 17:27:11 -0400 (Mon, 13 Aug 2012)
New Revision: 43005
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/.settings/
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/.settings/org.eclipse.jdt.core.prefs
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/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/MessageLoggerTest.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.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/BeanNamingTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/DefaultBeanTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/ExactTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/GenericBeanTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/MessageLoggerTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/ServiceHandlerTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/UnwrapsTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/VetoTest.java
Log:
JBIDE-12417
https://issues.jboss.org/browse/JBIDE-12417
Replaced Set by Collection in local variables in tests wherever it is possible.
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/.settings/org.eclipse.jdt.core.prefs 2012-08-13 21:27:11 UTC (rev 43005)
@@ -0,0 +1,8 @@
+#Fri Nov 04 10:56:09 PDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
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 2012-08-13 19:09:17 UTC (rev 43004)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/BeanNamingTest.java 2012-08-13 21:27:11 UTC (rev 43005)
@@ -11,7 +11,7 @@
package org.jboss.tools.cdi.seam.solder.core.test;
import java.io.IOException;
-import java.util.Set;
+import java.util.Collection;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
@@ -37,7 +37,7 @@
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"));
+ Collection<IBean> bs = cdi.getBeans(new Path("/CDISolderTest/src/org/jboss/named/Dog.java"));
assertFalse(bs.isEmpty());
IBean b = findBeanByMemberName(bs, "Dog");
assertNotNull(b);
@@ -54,7 +54,7 @@
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"));
+ Collection<IBean> bs = cdi.getBeans(new Path("/CDISolderTest/src/org/jboss/fullyqualified/Cat.java"));
assertFalse(bs.isEmpty());
IBean b = bs.iterator().next();
assertEquals("org.jboss.fullyqualified.cat", b.getName());
@@ -76,7 +76,7 @@
public void testFullyQualifiedProducers() {
ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
//1. package @FullyQualified
- Set<IBean> bs = cdi.getBeans(new Path("/CDISolderTest/src/org/jboss/fullyqualified/Elephant.java"));
+ Collection<IBean> bs = cdi.getBeans(new Path("/CDISolderTest/src/org/jboss/fullyqualified/Elephant.java"));
//1.1 producer method @Named
IBean b = findBeanByMemberName(bs, "getTail");
@@ -122,7 +122,7 @@
assertEquals("org.jboss.fullyqualified.black-eye", b.getName());
}
- private IBean findBeanByMemberName(Set<IBean> bs, String memberName) {
+ private IBean findBeanByMemberName(Collection<IBean> bs, String memberName) {
for (IBean b: bs) {
if(b instanceof IClassBean) {
if(memberName.equals(((IClassBean)b).getBeanClass().getElementName())) {
@@ -144,7 +144,7 @@
// Package @FullyQualified and @Named
// 1. Class @Named("bird-of-prey")
- Set<IBean> bs = cdi.getBeans("org.jboss.birds.bird-of-prey", false);
+ Collection<IBean> bs = cdi.getBeans("org.jboss.birds.bird-of-prey", false);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
assertTrue(b instanceof IClassBean);
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 2012-08-13 19:09:17 UTC (rev 43004)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/DefaultBeanTest.java 2012-08-13 21:27:11 UTC (rev 43005)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.cdi.seam.solder.core.test;
+import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
@@ -49,7 +50,7 @@
public void testLegalTypesOfDefaultProducerBeanWithoutDefaultBeanAnnotation() throws CoreException {
ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
IInjectionPointField injection = getInjectionPointField(cdi, "src/org/jboss/defaultbean/producer/Test1.java", "a");
- Set<IBean> bs = cdi.getBeans(false, injection);
+ Collection<IBean> bs = cdi.getBeans(false, injection);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
assertTrue(b instanceof IProducerField);
@@ -91,7 +92,7 @@
// default class bean with qualifier @Small
IInjectionPointField injection = getInjectionPointField(cdi, javaPath, "small");
- Set<IBean> bs = cdi.getBeans(false, injection);
+ Collection<IBean> bs = cdi.getBeans(false, injection);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
assertTrue(b instanceof IClassBean);
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 2012-08-13 19:09:17 UTC (rev 43004)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/ExactTest.java 2012-08-13 21:27:11 UTC (rev 43005)
@@ -11,7 +11,7 @@
package org.jboss.tools.cdi.seam.solder.core.test;
import java.io.IOException;
-import java.util.Set;
+import java.util.Collection;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
@@ -35,7 +35,7 @@
public void testExact() throws CoreException, IOException {
ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
- Set<IBean> bs = cdi.getBeans(new Path("/CDISolderTest/src/org/jboss/exact/FishFactory.java"));
+ Collection<IBean> bs = cdi.getBeans(new Path("/CDISolderTest/src/org/jboss/exact/FishFactory.java"));
assertEquals(2, bs.size());
IClassBean cls = null;
IProducerMethod mtd = null;
@@ -48,10 +48,10 @@
}
assertNotNull(cls);
assertNotNull(mtd);
- Set<IInjectionPoint> points = cls.getInjectionPoints();
+ Collection<IInjectionPoint> points = cls.getInjectionPoints();
int count = 0;
for (IInjectionPoint p: points) {
- Set<IBean> injected = cdi.getBeans(false, p);
+ Collection<IBean> injected = cdi.getBeans(false, p);
IMember member = p.getSourceMember();
if(member.getElementName().equals("peacefulFish")) {
assertEquals(1, injected.size());
@@ -77,7 +77,7 @@
public void testExactInDependentProject() throws CoreException, IOException {
ICDIProject cdi = getDependentCDIProject();
- Set<IBean> bs = cdi.getBeans(new Path("/CDISolderTest/src/org/jboss/exact/FishFactory.java"));
+ Collection<IBean> bs = cdi.getBeans(new Path("/CDISolderTest/src/org/jboss/exact/FishFactory.java"));
assertEquals(2, bs.size());
}
}
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 2012-08-13 19:09:17 UTC (rev 43004)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/GenericBeanTest.java 2012-08-13 21:27:11 UTC (rev 43005)
@@ -10,9 +10,9 @@
******************************************************************************/
package org.jboss.tools.cdi.seam.solder.core.test;
+import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
-import java.util.Set;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
@@ -50,7 +50,7 @@
*/
IInjectionPointField injection = getInjectionPointField(cdi, "src/org/jboss/generic/MyBeanInjections.java", "first1");
- Set<IBean> bs = cdi.getBeans(false, injection);
+ Collection<IBean> bs = cdi.getBeans(false, injection);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
assertTrue(b instanceof IProducerMethod);
@@ -121,10 +121,10 @@
* each has that injection point;
* in all cases bean is produced by MyGenericBean.createMyFirstBean()
*/
- Set<IInjectionPointField> injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic/MyGenericBean2.java", "c");
+ Collection<IInjectionPointField> injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic/MyGenericBean2.java", "c");
assertEquals(5, injections.size());
for (IInjectionPointField injection: injections) {
- Set<IBean> bs = cdi.getBeans(false, injection);
+ Collection<IBean> bs = cdi.getBeans(false, injection);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
assertTrue(b instanceof IProducerMethod);
@@ -143,10 +143,10 @@
* each has that injection point;
* in all cases we insert a dummy bean of type org.jboss.generic.MyGenericType
*/
- Set<IInjectionPointField> injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic/MyGenericBean2.java", "type");
+ Collection<IInjectionPointField> injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic/MyGenericBean2.java", "type");
assertEquals(5, injections.size());
for (IInjectionPointField injection: injections) {
- Set<IBean> bs = cdi.getBeans(false, injection);
+ Collection<IBean> bs = cdi.getBeans(false, injection);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
assertTrue(b instanceof IClassBean);
@@ -156,10 +156,10 @@
}
//TODO - more tests
- protected Set<IInjectionPointField> getGenericInjectionPointField(ICDIProject cdi, String beanClassFilePath, String fieldName) {
- Set<IInjectionPointField> result = new HashSet<IInjectionPointField>();
+ protected Collection<IInjectionPointField> getGenericInjectionPointField(ICDIProject cdi, String beanClassFilePath, String fieldName) {
+ Collection<IInjectionPointField> result = new HashSet<IInjectionPointField>();
IFile file = cdi.getNature().getProject().getFile(beanClassFilePath);
- Set<IBean> beans = cdi.getBeans(file.getFullPath());
+ Collection<IBean> beans = cdi.getBeans(file.getFullPath());
Iterator<IBean> it = beans.iterator();
while(it.hasNext()) {
IBean b = it.next();
@@ -167,7 +167,7 @@
}
for (IBean b: beans) {
- Set<IInjectionPoint> injections = b.getInjectionPoints();
+ Collection<IInjectionPoint> injections = b.getInjectionPoints();
for (IInjectionPoint injectionPoint : injections) {
if(injectionPoint instanceof IInjectionPointField) {
IInjectionPointField field = (IInjectionPointField)injectionPoint;
@@ -191,10 +191,10 @@
* in all cases bean is produced by MyGenericBean.createMyFirstBean()
*/
IClassBean beanToBeVetoed = null;
- Set<IInjectionPointField> injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic2/MessageManager.java", "queue");
+ Collection<IInjectionPointField> injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic2/MessageManager.java", "queue");
assertEquals(3, injections.size());
for (IInjectionPointField injection: injections) {
- Set<IBean> bs = cdi.getBeans(false, injection);
+ Collection<IBean> bs = cdi.getBeans(false, injection);
assertTrue(bs.size() >= 1);
for (IBean b: bs) {
assertTrue(b instanceof GenericBeanProducerMethod);
@@ -219,7 +219,7 @@
injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic2/MessageManager.java", "queue");
assertEquals(2, injections.size());
for (IInjectionPointField injection: injections) {
- Set<IBean> bs = cdi.getBeans(false, injection);
+ Collection<IBean> bs = cdi.getBeans(false, injection);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
assertTrue(b instanceof GenericBeanProducerMethod);
@@ -243,7 +243,7 @@
injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic2/MessageManager.java", "queue");
assertEquals(3, injections.size());
for (IInjectionPointField injection: injections) {
- Set<IBean> bs = cdi.getBeans(false, injection);
+ Collection<IBean> bs = cdi.getBeans(false, injection);
assertTrue(bs.size() >= 1);
for (IBean b: bs) {
assertTrue(b instanceof GenericBeanProducerMethod);
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 2012-08-13 19:09:17 UTC (rev 43004)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/MessageLoggerTest.java 2012-08-13 21:27:11 UTC (rev 43005)
@@ -11,7 +11,7 @@
package org.jboss.tools.cdi.seam.solder.core.test;
import java.io.IOException;
-import java.util.Set;
+import java.util.Collection;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IType;
@@ -34,7 +34,7 @@
IInjectionPointField logger = getInjectionPointField(cdi, "src/org/jboss/logger/LogAccess.java", "logger");
- Set<IBean> bs = cdi.getBeans(false, logger);
+ Collection<IBean> bs = cdi.getBeans(false, logger);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
@@ -50,7 +50,7 @@
IInjectionPointField bundle = getInjectionPointField(cdi, "src/org/jboss/logger/LogAccess.java", "bundle");
- Set<IBean> bs = cdi.getBeans(false, bundle);
+ Collection<IBean> bs = cdi.getBeans(false, bundle);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
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 2012-08-13 19:09:17 UTC (rev 43004)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/ServiceHandlerTest.java 2012-08-13 21:27:11 UTC (rev 43005)
@@ -11,7 +11,7 @@
package org.jboss.tools.cdi.seam.solder.core.test;
import java.io.IOException;
-import java.util.Set;
+import java.util.Collection;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IType;
@@ -34,7 +34,7 @@
IInjectionPointField logger = getInjectionPointField(cdi, "src/org/jboss/service/UserListManager.java", "userQuery");
- Set<IBean> bs = cdi.getBeans(false, logger);
+ Collection<IBean> bs = cdi.getBeans(false, logger);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
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 2012-08-13 19:09:17 UTC (rev 43004)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/UnwrapsTest.java 2012-08-13 21:27:11 UTC (rev 43005)
@@ -11,7 +11,7 @@
package org.jboss.tools.cdi.seam.solder.core.test;
import java.io.IOException;
-import java.util.Set;
+import java.util.Collection;
import org.eclipse.core.runtime.CoreException;
import org.jboss.tools.cdi.core.CDICorePlugin;
@@ -35,7 +35,7 @@
IInjectionPointField logger = getInjectionPointField(cdi, "src/org/jboss/unwraps/Unwrapped.java", "permission");
- Set<IBean> bs = cdi.getBeans(false, logger);
+ Collection<IBean> bs = cdi.getBeans(false, logger);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
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 2012-08-13 19:09:17 UTC (rev 43004)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/VetoTest.java 2012-08-13 21:27:11 UTC (rev 43005)
@@ -11,7 +11,7 @@
package org.jboss.tools.cdi.seam.solder.core.test;
import java.io.IOException;
-import java.util.Set;
+import java.util.Collection;
import org.eclipse.core.runtime.CoreException;
import org.jboss.tools.cdi.core.CDIConstants;
@@ -40,7 +40,7 @@
assertNotNull(a);
Object name = a.getMemberValue(null);
assertEquals("tiger", name); //...and it is annotated with @Named("tiger")
- Set<IBean> bs = cdi.getBeans("tiger", false);
+ Collection<IBean> bs = cdi.getBeans("tiger", false);
assertTrue(bs.isEmpty()); //...CDI model does not have a bean named "tiger"
bs = cdi.getBeans(d.getResource().getFullPath());
assertTrue(bs.isEmpty()); //...and does not loaded any beans form its resource
@@ -68,7 +68,7 @@
assertNotNull(a);
Object name = a.getMemberValue(null);
assertEquals("bear", name); //...and it is annotated with @Named("bear")
- Set<IBean> bs = cdi.getBeans("bear", false);
+ Collection<IBean> bs = cdi.getBeans("bear", false);
assertTrue(bs.isEmpty()); //...CDI model does not have a bean named "bear"
bs = cdi.getBeans(d.getResource().getFullPath());
assertTrue(bs.isEmpty()); //...and does not loaded any beans form its resource
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/BeanNamingTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/BeanNamingTest.java 2012-08-13 19:09:17 UTC (rev 43004)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/BeanNamingTest.java 2012-08-13 21:27:11 UTC (rev 43005)
@@ -11,7 +11,7 @@
package org.jboss.tools.cdi.seam.solder.core.test.v30;
import java.io.IOException;
-import java.util.Set;
+import java.util.Collection;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
@@ -37,7 +37,7 @@
ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
//1. package @Named; class not annotated
- Set<IBean> bs = cdi.getBeans(new Path("/CDISolderTest30/src/org/jboss/named/Dog.java"));
+ Collection<IBean> bs = cdi.getBeans(new Path("/CDISolderTest30/src/org/jboss/named/Dog.java"));
assertFalse(bs.isEmpty());
IBean b = findBeanByMemberName(bs, "Dog");
assertNotNull(b);
@@ -54,7 +54,7 @@
ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
//1. package @FullyQualified and @Named; class not annotated
- Set<IBean> bs = cdi.getBeans(new Path("/CDISolderTest30/src/org/jboss/fullyqualified/Cat.java"));
+ Collection<IBean> bs = cdi.getBeans(new Path("/CDISolderTest30/src/org/jboss/fullyqualified/Cat.java"));
assertFalse(bs.isEmpty());
IBean b = bs.iterator().next();
assertEquals("org.jboss.fullyqualified.cat", b.getName());
@@ -76,7 +76,7 @@
public void testFullyQualifiedProducers() {
ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
//1. package @FullyQualified
- Set<IBean> bs = cdi.getBeans(new Path("/CDISolderTest30/src/org/jboss/fullyqualified/Elephant.java"));
+ Collection<IBean> bs = cdi.getBeans(new Path("/CDISolderTest30/src/org/jboss/fullyqualified/Elephant.java"));
//1.1 producer method @Named
IBean b = findBeanByMemberName(bs, "getTail");
@@ -122,7 +122,7 @@
assertEquals("org.jboss.fullyqualified.black-eye", b.getName());
}
- private IBean findBeanByMemberName(Set<IBean> bs, String memberName) {
+ private IBean findBeanByMemberName(Collection<IBean> bs, String memberName) {
for (IBean b: bs) {
if(b instanceof IClassBean) {
if(memberName.equals(((IClassBean)b).getBeanClass().getElementName())) {
@@ -143,7 +143,7 @@
// Package @FullyQualified and @Named
// 1. Class @Named("bird-of-prey")
- Set<IBean> bs = cdi.getBeans("org.jboss.birds.bird-of-prey", false);
+ Collection<IBean> bs = cdi.getBeans("org.jboss.birds.bird-of-prey", false);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
assertTrue(b instanceof IClassBean);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/DefaultBeanTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/DefaultBeanTest.java 2012-08-13 19:09:17 UTC (rev 43004)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/DefaultBeanTest.java 2012-08-13 21:27:11 UTC (rev 43005)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.cdi.seam.solder.core.test.v30;
+import java.util.Collection;
import java.util.Iterator;
import java.util.Set;
@@ -58,7 +59,7 @@
// default class bean with qualifier @Small
IInjectionPointField injection = getInjectionPointField(cdi, javaPath, "small");
- Set<IBean> bs = cdi.getBeans(false, injection);
+ Collection<IBean> bs = cdi.getBeans(false, injection);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
assertTrue(b instanceof IClassBean);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/ExactTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/ExactTest.java 2012-08-13 19:09:17 UTC (rev 43004)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/ExactTest.java 2012-08-13 21:27:11 UTC (rev 43005)
@@ -11,7 +11,7 @@
package org.jboss.tools.cdi.seam.solder.core.test.v30;
import java.io.IOException;
-import java.util.Set;
+import java.util.Collection;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
@@ -35,7 +35,7 @@
public void testExact() throws CoreException, IOException {
ICDIProject cdi = CDICorePlugin.getCDIProject(getTestProject(), true);
- Set<IBean> bs = cdi.getBeans(new Path("/CDISolderTest30/src/org/jboss/exact/FishFactory.java"));
+ Collection<IBean> bs = cdi.getBeans(new Path("/CDISolderTest30/src/org/jboss/exact/FishFactory.java"));
assertEquals(2, bs.size());
IClassBean cls = null;
IProducerMethod mtd = null;
@@ -48,10 +48,10 @@
}
assertNotNull(cls);
assertNotNull(mtd);
- Set<IInjectionPoint> points = cls.getInjectionPoints();
+ Collection<IInjectionPoint> points = cls.getInjectionPoints();
int count = 0;
for (IInjectionPoint p: points) {
- Set<IBean> injected = cdi.getBeans(false, p);
+ Collection<IBean> injected = cdi.getBeans(false, p);
IMember member = p.getSourceMember();
if(member.getElementName().equals("peacefulFish")) {
assertEquals(1, injected.size());
@@ -77,7 +77,7 @@
public void testExactInDependentProject() throws CoreException, IOException {
ICDIProject cdi = getDependentCDIProject();
- Set<IBean> bs = cdi.getBeans(new Path("/CDISolderTest30/src/org/jboss/exact/FishFactory.java"));
+ Collection<IBean> bs = cdi.getBeans(new Path("/CDISolderTest30/src/org/jboss/exact/FishFactory.java"));
assertEquals(2, bs.size());
}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/GenericBeanTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/GenericBeanTest.java 2012-08-13 19:09:17 UTC (rev 43004)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/GenericBeanTest.java 2012-08-13 21:27:11 UTC (rev 43005)
@@ -10,9 +10,9 @@
******************************************************************************/
package org.jboss.tools.cdi.seam.solder.core.test.v30;
+import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
-import java.util.Set;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
@@ -50,7 +50,7 @@
*/
IInjectionPointField injection = getInjectionPointField(cdi, "src/org/jboss/generic/MyBeanInjections.java", "first1");
- Set<IBean> bs = cdi.getBeans(false, injection);
+ Collection<IBean> bs = cdi.getBeans(false, injection);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
assertTrue(b instanceof IProducerMethod);
@@ -121,10 +121,10 @@
* each has that injection point;
* in all cases bean is produced by MyGenericBean.createMyFirstBean()
*/
- Set<IInjectionPointField> injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic/MyGenericBean2.java", "c");
+ Collection<IInjectionPointField> injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic/MyGenericBean2.java", "c");
assertEquals(5, injections.size());
for (IInjectionPointField injection: injections) {
- Set<IBean> bs = cdi.getBeans(false, injection);
+ Collection<IBean> bs = cdi.getBeans(false, injection);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
assertTrue(b instanceof IProducerMethod);
@@ -143,10 +143,10 @@
* each has that injection point;
* in all cases we insert a dummy bean of type org.jboss.generic.MyGenericType
*/
- Set<IInjectionPointField> injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic/MyGenericBean2.java", "type");
+ Collection<IInjectionPointField> injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic/MyGenericBean2.java", "type");
assertEquals(5, injections.size());
for (IInjectionPointField injection: injections) {
- Set<IBean> bs = cdi.getBeans(false, injection);
+ Collection<IBean> bs = cdi.getBeans(false, injection);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
assertTrue(b instanceof IClassBean);
@@ -156,10 +156,10 @@
}
//TODO - more tests
- protected Set<IInjectionPointField> getGenericInjectionPointField(ICDIProject cdi, String beanClassFilePath, String fieldName) {
- Set<IInjectionPointField> result = new HashSet<IInjectionPointField>();
+ protected Collection<IInjectionPointField> getGenericInjectionPointField(ICDIProject cdi, String beanClassFilePath, String fieldName) {
+ Collection<IInjectionPointField> result = new HashSet<IInjectionPointField>();
IFile file = cdi.getNature().getProject().getFile(beanClassFilePath);
- Set<IBean> beans = cdi.getBeans(file.getFullPath());
+ Collection<IBean> beans = cdi.getBeans(file.getFullPath());
Iterator<IBean> it = beans.iterator();
while(it.hasNext()) {
IBean b = it.next();
@@ -167,7 +167,7 @@
}
for (IBean b: beans) {
- Set<IInjectionPoint> injections = b.getInjectionPoints();
+ Collection<IInjectionPoint> injections = b.getInjectionPoints();
for (IInjectionPoint injectionPoint : injections) {
if(injectionPoint instanceof IInjectionPointField) {
IInjectionPointField field = (IInjectionPointField)injectionPoint;
@@ -191,10 +191,10 @@
* in all cases bean is produced by MyGenericBean.createMyFirstBean()
*/
IClassBean beanToBeVetoed = null;
- Set<IInjectionPointField> injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic2/MessageManager.java", "queue");
+ Collection<IInjectionPointField> injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic2/MessageManager.java", "queue");
assertEquals(3, injections.size());
for (IInjectionPointField injection: injections) {
- Set<IBean> bs = cdi.getBeans(false, injection);
+ Collection<IBean> bs = cdi.getBeans(false, injection);
assertTrue(bs.size() >= 1);
for (IBean b: bs) {
assertTrue(b instanceof GenericBeanProducerMethod);
@@ -219,7 +219,7 @@
injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic2/MessageManager.java", "queue");
assertEquals(2, injections.size());
for (IInjectionPointField injection: injections) {
- Set<IBean> bs = cdi.getBeans(false, injection);
+ Collection<IBean> bs = cdi.getBeans(false, injection);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
assertTrue(b instanceof GenericBeanProducerMethod);
@@ -243,7 +243,7 @@
injections = getGenericInjectionPointField(cdi, "src/org/jboss/generic2/MessageManager.java", "queue");
assertEquals(3, injections.size());
for (IInjectionPointField injection: injections) {
- Set<IBean> bs = cdi.getBeans(false, injection);
+ Collection<IBean> bs = cdi.getBeans(false, injection);
assertTrue(bs.size() >= 1);
for (IBean b: bs) {
assertTrue(b instanceof GenericBeanProducerMethod);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/MessageLoggerTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/MessageLoggerTest.java 2012-08-13 19:09:17 UTC (rev 43004)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/MessageLoggerTest.java 2012-08-13 21:27:11 UTC (rev 43005)
@@ -11,7 +11,7 @@
package org.jboss.tools.cdi.seam.solder.core.test.v30;
import java.io.IOException;
-import java.util.Set;
+import java.util.Collection;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IType;
@@ -34,7 +34,7 @@
IInjectionPointField logger = getInjectionPointField(cdi, "src/org/jboss/logger/LogAccess.java", "logger");
- Set<IBean> bs = cdi.getBeans(false, logger);
+ Collection<IBean> bs = cdi.getBeans(false, logger);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
@@ -50,7 +50,7 @@
IInjectionPointField bundle = getInjectionPointField(cdi, "src/org/jboss/logger/LogAccess.java", "bundle");
- Set<IBean> bs = cdi.getBeans(false, bundle);
+ Collection<IBean> bs = cdi.getBeans(false, bundle);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/ServiceHandlerTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/ServiceHandlerTest.java 2012-08-13 19:09:17 UTC (rev 43004)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/ServiceHandlerTest.java 2012-08-13 21:27:11 UTC (rev 43005)
@@ -11,7 +11,7 @@
package org.jboss.tools.cdi.seam.solder.core.test.v30;
import java.io.IOException;
-import java.util.Set;
+import java.util.Collection;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IType;
@@ -34,7 +34,7 @@
IInjectionPointField logger = getInjectionPointField(cdi, "src/org/jboss/service/UserListManager.java", "userQuery");
- Set<IBean> bs = cdi.getBeans(false, logger);
+ Collection<IBean> bs = cdi.getBeans(false, logger);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/UnwrapsTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/UnwrapsTest.java 2012-08-13 19:09:17 UTC (rev 43004)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/UnwrapsTest.java 2012-08-13 21:27:11 UTC (rev 43005)
@@ -11,7 +11,7 @@
package org.jboss.tools.cdi.seam.solder.core.test.v30;
import java.io.IOException;
-import java.util.Set;
+import java.util.Collection;
import org.eclipse.core.runtime.CoreException;
import org.jboss.tools.cdi.core.CDICorePlugin;
@@ -19,7 +19,6 @@
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.core.IInjectionPointField;
import org.jboss.tools.cdi.core.IProducerMethod;
-import org.jboss.tools.cdi.seam.solder.core.CDISeamSolderConstants;
import org.jboss.tools.cdi.seam.solder.core.CDISeamSolderConstants30;
/**
@@ -36,7 +35,7 @@
IInjectionPointField logger = getInjectionPointField(cdi, "src/org/jboss/unwraps/Unwrapped.java", "permission");
- Set<IBean> bs = cdi.getBeans(false, logger);
+ Collection<IBean> bs = cdi.getBeans(false, logger);
assertEquals(1, bs.size());
IBean b = bs.iterator().next();
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/VetoTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/VetoTest.java 2012-08-13 19:09:17 UTC (rev 43004)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/v30/VetoTest.java 2012-08-13 21:27:11 UTC (rev 43005)
@@ -11,7 +11,7 @@
package org.jboss.tools.cdi.seam.solder.core.test.v30;
import java.io.IOException;
-import java.util.Set;
+import java.util.Collection;
import org.eclipse.core.runtime.CoreException;
import org.jboss.tools.cdi.core.CDIConstants;
@@ -40,7 +40,7 @@
assertNotNull(a);
Object name = a.getMemberValue(null);
assertEquals("tiger", name); //...and it is annotated with @Named("tiger")
- Set<IBean> bs = cdi.getBeans("tiger", false);
+ Collection<IBean> bs = cdi.getBeans("tiger", false);
assertTrue(bs.isEmpty()); //...CDI model does not have a bean named "tiger"
bs = cdi.getBeans(d.getResource().getFullPath());
assertTrue(bs.isEmpty()); //...and does not loaded any beans form its resource
@@ -68,7 +68,7 @@
assertNotNull(a);
Object name = a.getMemberValue(null);
assertEquals("bear", name); //...and it is annotated with @Named("bear")
- Set<IBean> bs = cdi.getBeans("bear", false);
+ Collection<IBean> bs = cdi.getBeans("bear", false);
assertTrue(bs.isEmpty()); //...CDI model does not have a bean named "bear"
bs = cdi.getBeans(d.getResource().getFullPath());
assertTrue(bs.isEmpty()); //...and does not loaded any beans form its resource
12 years, 5 months
JBoss Tools SVN: r43004 - trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2012-08-13 15:09:17 -0400 (Mon, 13 Aug 2012)
New Revision: 43004
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java
Log:
JBIDE-10611
As-you-type CDI validation
Number of Java Element validation calls is reduced (because when at least one String is validated, according Java Element is automatically validated as well)
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java 2012-08-13 17:21:34 UTC (rev 43003)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java 2012-08-13 19:09:17 UTC (rev 43004)
@@ -427,9 +427,11 @@
fValidatorManager.validateString(
Arrays.asList(fPartitionsToProcess.toArray(new IRegion[fPartitionsToProcess.size()])),
fHelper, fReporter);
- }
-
- if (isJavaElementValidationRequired()) {
+ } else if (isJavaElementValidationRequired()) {
+ // The 'else' is added here due to not to validate
+ // an element in case of at lease one string is validated,
+ // because the string validation performs the validation of an element
+ // as well
fReporter.clearAlwaysRemoveAnnotations();
fValidatorManager.validateJavaElement(
Arrays.asList(
12 years, 5 months
JBoss Tools SVN: r43003 - in trunk: bpel/tests/org.jboss.tools.bpel.ui.bot.test and 19 other directories.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-08-13 13:21:34 -0400 (Mon, 13 Aug 2012)
New Revision: 43003
Modified:
trunk/bpel/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/pom.xml
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/pom.xml
trunk/build/parent/pom.xml
trunk/build/tycho-plugins/repository-utils/
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/pom.xml
trunk/central/tests/org.jboss.tools.central.test.ui.bot/pom.xml
trunk/common/
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/pom.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/pom.xml
trunk/jbpm/
trunk/jsf/tests/pom.xml
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/pom.xml
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml
trunk/seam/tests/pom.xml
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/pom.xml
trunk/vpe/tests/pom.xml
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/pom.xml
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/pom.xml
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/pom.xml
Log:
JBIDE-12422: Use surefire.timeout to configure timeout rather than hardcoding a forkedProcessTimeout value
Property changes on: trunk/bpel
___________________________________________________________________
Added: svn:ignore
+ target
Modified: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/pom.xml
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/pom.xml 2012-08-13 17:15:57 UTC (rev 43002)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/pom.xml 2012-08-13 17:21:34 UTC (rev 43003)
@@ -16,6 +16,7 @@
<coverage.filter>org.jboss.tools.bpel.runtimes*</coverage.filter>
<emma.instrument.bundles>org.jboss.tools.bpel.runtimes</emma.instrument.bundles>
<systemProperties>-Dswtbot.test.properties.file=./org.jboss.tools.bpel.ui.bot.test.properties</systemProperties>
+ <surefire.timeout>10800</surefire.timeout>
</properties>
<build>
@@ -113,7 +114,6 @@
<testClass>org.jboss.tools.bpel.ui.bot.test.suite.BPELAllTest</testClass>
<useUIThread>false</useUIThread>
<skip>${swtbot.test.skip}</skip>
- <forkedProcessTimeoutInSeconds>10800</forkedProcessTimeoutInSeconds>
<dependencies combine.children="append">
<!-- BPEL feature -->
<dependency>
Modified: trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/pom.xml
===================================================================
--- trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/pom.xml 2012-08-13 17:15:57 UTC (rev 43002)
+++ trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/pom.xml 2012-08-13 17:21:34 UTC (rev 43003)
@@ -13,6 +13,7 @@
<packaging>eclipse-test-plugin</packaging>
<properties>
<systemProperties>-Dswtbot.test.skip=false -Dtest.configurations.dir=resources/</systemProperties>
+ <surefire.timeout>3600</surefire.timeout>
</properties>
<build>
<plugins>
@@ -24,7 +25,6 @@
<useUIThread>false</useUIThread>
<testSuite>org.jboss.tools.drools.ui.bot.test</testSuite>
<testClass>org.jboss.tools.drools.ui.bot.test.DroolsAllBotTests</testClass>
- <forkedProcessTimeoutInSeconds>3600</forkedProcessTimeoutInSeconds>
<dependencies combine.children="append">
<dependency>
<type>p2-installable-unit</type>
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2012-08-13 17:15:57 UTC (rev 43002)
+++ trunk/build/parent/pom.xml 2012-08-13 17:21:34 UTC (rev 43003)
@@ -72,7 +72,9 @@
<!-- 5. extra requirements (for 3rd party "Extras" site) -->
<jboss-requirements-composite-extras-mirror>http://download.jboss.org/jbosstools/updates/juno/extras/</jboss-requirements-composite-extras-mirror>
-
+
+ <!-- Tests Timeout in seconds -->
+ <surefire.timeout>2400</surefire.timeout>
<!-- Default coverage filter, to be overriden when necessary -->
<coverage.filter>org.jboss.tools.*</coverage.filter>
@@ -173,9 +175,6 @@
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tychoVersion}</version>
<configuration>
- <!-- timeout in seconds -->
- <surefire.timeout>2400</surefire.timeout>
- <forkedProcessTimeoutInSeconds>2400</forkedProcessTimeoutInSeconds>
<useUIHarness>true</useUIHarness>
<useUIThread>true</useUIThread>
<!-- THE FOLLOWING LINE MUST NOT BE BROKEN BY AUTOFORMATTING -->
Property changes on: trunk/build/tycho-plugins/repository-utils
___________________________________________________________________
Added: svn:ignore
+ target
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml 2012-08-13 17:15:57 UTC (rev 43002)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml 2012-08-13 17:21:34 UTC (rev 43003)
@@ -13,6 +13,7 @@
<properties>
<additionalSystemProperties></additionalSystemProperties>
<systemProperties>${additionalSystemProperties} -Dswtbot.test.properties.file=${project.basedir}/properties/swtbot.properties</systemProperties>
+ <surefire.timeout>10800</surefire.timeout>
</properties>
<build>
@@ -51,7 +52,6 @@
<useUIThread>false</useUIThread>
<skip>${swtbot.test.skip}</skip>
<!-- Kill swt bot test take more than 3 hours minutes (10800 seconds) to finish -->
- <forkedProcessTimeoutInSeconds>10800</forkedProcessTimeoutInSeconds>
<dependencies combine.children="append">
<dependency>
<type>p2-installable-unit</type>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/pom.xml 2012-08-13 17:15:57 UTC (rev 43002)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/pom.xml 2012-08-13 17:21:34 UTC (rev 43003)
@@ -13,6 +13,7 @@
<properties>
<additionalSystemProperties></additionalSystemProperties>
<systemProperties>${additionalSystemProperties} -Dswtbot.test.properties.file=${project.basedir}/properties/swtbot.properties</systemProperties>
+ <surefire.timeout>10800</surefire.timeout>
</properties>
<profiles>
<profile>
@@ -57,8 +58,6 @@
<testClass>org.jboss.tools.cdi.seam3.bot.test.CDISeam3AllBotTests</testClass>
<useUIThread>false</useUIThread>
<skip>${swtbot.test.skip}</skip>
- <!-- Kill swt bot test take more than 3 hours minutes (10800 seconds) to finish -->
- <forkedProcessTimeoutInSeconds>10800</forkedProcessTimeoutInSeconds>
<dependencies combine.children="append">
<dependency>
<type>p2-installable-unit</type>
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/pom.xml
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/pom.xml 2012-08-13 17:15:57 UTC (rev 43002)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/pom.xml 2012-08-13 17:21:34 UTC (rev 43003)
@@ -17,6 +17,7 @@
<jbosstools.test.jbossas.home>${requirementsDirectory}/jboss-as-7.1.1.Final</jbosstools.test.jbossas.home>
<!-- for debugging ucomment and comment next line <systemProperties>-Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y -Djbosstools.test.jbossas.home=${jbosstools.test.jbossas.home} -Dswtbot.test.properties.file=${swtbot.properties}</systemProperties> -->
<systemProperties>${additionalSystemProperties} -Djbosstools.test.jbossas.home=${jbosstools.test.jbossas.home} -Dtest.configurations.dir=${test.configurations.dir} -Deap.maven.config.file=${eap.maven.config.file}</systemProperties>
+ <surefire.timeout>10800</surefire.timeout>
</properties>
<profiles>
@@ -63,7 +64,6 @@
<testClass>org.jboss.tools.central.test.ui.bot.CentralAllBotTests</testClass>
<useUIThread>false</useUIThread>
<skip>${swtbot.test.skip}</skip>
- <forkedProcessTimeoutInSeconds>10800</forkedProcessTimeoutInSeconds>
<dependencies combine.children="append">
<dependency>
<type>p2-installable-unit</type>
Property changes on: trunk/common
___________________________________________________________________
Modified: svn:ignore
- test
+ test
target
Modified: trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/pom.xml
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/pom.xml 2012-08-13 17:15:57 UTC (rev 43002)
+++ trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/pom.xml 2012-08-13 17:21:34 UTC (rev 43003)
@@ -15,8 +15,8 @@
<jbosstools.test.jbossesb.home>${requirementsDirectory}/jbossesb-4.11</jbosstools.test.jbossesb.home>
<jbosstools.test.jbosssoa.home>${requirementsDirectory}/jboss-soa-p-5.3/jboss-soa-p-5/jboss-as</jbosstools.test.jbosssoa.home>
<swtbot.test.properties.file>./org.jboss.tools.esb.ui.bot.test.properties</swtbot.test.properties.file>
- <systemProperties>-Djbosstools.test.jbossesb.home=${jbosstools.test.jbossesb.home} -Djbosstools.test.jbosssoa.home=${jbosstools.test.jbosssoa.home} -Dswtbot.test.properties.file=${swtbot.test.properties.file}
- </systemProperties>
+ <systemProperties>-Djbosstools.test.jbossesb.home=${jbosstools.test.jbossesb.home} -Djbosstools.test.jbosssoa.home=${jbosstools.test.jbosssoa.home} -Dswtbot.test.properties.file=${swtbot.test.properties.file}</systemProperties>
+ <surefire.timeout>7200</surefire.timeout>
</properties>
<build>
@@ -59,7 +59,6 @@
<skip>${swtbot.test.skip}</skip>
<testSuite>org.jboss.tools.esb.ui.bot.test</testSuite>
<testClass>org.jboss.tools.esb.ui.bot.tests.ESBAllBotTests</testClass>
- <forkedProcessTimeoutInSeconds>7200</forkedProcessTimeoutInSeconds>
</configuration>
</plugin>
</plugins>
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/pom.xml
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/pom.xml 2012-08-13 17:15:57 UTC (rev 43002)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/pom.xml 2012-08-13 17:21:34 UTC (rev 43003)
@@ -14,6 +14,7 @@
<properties>
<coverage.filter>org.hibernate.eclipse*</coverage.filter>
<emma.instrument.bundles>org.hibernate.eclipse.console</emma.instrument.bundles>
+ <surefire.timeout>3600</surefire.timeout>
</properties>
<build>
@@ -27,9 +28,6 @@
<bundle>org.hibernate.eclipse</bundle>
<bundle>org.hibernate.eclipse.libs</bundle>
</explodedBundles>
- <!-- timeout in seconds; default 1800 -->
- <surefire.timeout>3600</surefire.timeout>
- <forkedProcessTimeoutInSeconds>3600</forkedProcessTimeoutInSeconds>
</configuration>
</plugin>
</plugins>
Property changes on: trunk/jbpm
___________________________________________________________________
Added: svn:ignore
+ target
Modified: trunk/jsf/tests/pom.xml
===================================================================
--- trunk/jsf/tests/pom.xml 2012-08-13 17:15:57 UTC (rev 43002)
+++ trunk/jsf/tests/pom.xml 2012-08-13 17:21:34 UTC (rev 43003)
@@ -11,6 +11,10 @@
<name>jsf.tests</name>
<packaging>pom</packaging>
+
+ <properties>
+ <surefire.timeout>3600</surefire.timeout>
+ </properties>
<profiles>
<profile>
@@ -70,10 +74,6 @@
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
<product>org.jboss.tools.tests.product</product>
- <!-- default is 1800 sec = 30 min -->
- <surefire.timeout>3600</surefire.timeout>
- <forkedProcessTimeoutInSeconds>3600</forkedProcessTimeoutInSeconds>
-
<explodedBundles>
<bundle>org.jboss.tools.vpe</bundle>
<bundle>org.mozilla.xulrunner.cocoa.macosx</bundle>
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/pom.xml
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/pom.xml 2012-08-13 17:15:57 UTC (rev 43002)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/pom.xml 2012-08-13 17:21:34 UTC (rev 43003)
@@ -16,6 +16,7 @@
<properties>
<systemProperties>-Dtest.configurations.dir=${configurations.dir}</systemProperties>
+ <surefire.timeout>10800</surefire.timeout>
</properties>
<build>
@@ -24,8 +25,6 @@
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
- <!-- Kill swt bot test take more than 3 hours minutes (10800 seconds) to finish -->
- <forkedProcessTimeoutInSeconds>10800</forkedProcessTimeoutInSeconds>
<skip>${swtbot.test.skip}</skip>
<useUIThread>false</useUIThread>
<testSuite>org.jboss.tools.openshift.ui.bot.test</testSuite>
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml 2012-08-13 17:15:57 UTC (rev 43002)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml 2012-08-13 17:21:34 UTC (rev 43003)
@@ -22,6 +22,7 @@
<additionalSystemProperties></additionalSystemProperties>
<systemProperties>${additionalSystemProperties} -Djbosstools.test.jboss-gatein.home=${jbosstools.test.jboss-gatein.home} -Djbosstools.test.jboss-seam-2.2.home=${jbosstools.test.jboss-seam-2.2.home} -Djbosstools.test.jboss-portal.home=${jbosstools.test.jboss-portal.home} -Djbosstools.test.jboss-seam-2.0.home=${jbosstools.test.jboss-seam-2.0.home} -Djbosstools.test.jboss-portlet-bridge.home=${jbosstools.test.jboss-portlet-bridge.home} -Dtest.configurations.dir=${configurations.dir} -Dorg.eclipse.swtbot.screenshots.dir=${project.build.directory}/screenshots</systemProperties>
<test.class>org.jboss.tools.portlet.ui.bot.test.AllTestsSuite</test.class>
+ <surefire.timeout>7200</surefire.timeout>
</properties>
<profiles>
@@ -107,8 +108,6 @@
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
<useUIThread>false</useUIThread>
- <surefire.timeout>7200</surefire.timeout>
- <forkedProcessTimeoutInSeconds>7200</forkedProcessTimeoutInSeconds>
<testSuite>org.jboss.tools.portlet.ui.bot.test</testSuite>
<testClass>${test.class}</testClass>
<skip>${swtbot.test.skip}</skip>
Modified: trunk/seam/tests/pom.xml
===================================================================
--- trunk/seam/tests/pom.xml 2012-08-13 17:15:57 UTC (rev 43002)
+++ trunk/seam/tests/pom.xml 2012-08-13 17:21:34 UTC (rev 43003)
@@ -46,6 +46,10 @@
<module>org.jboss.tools.seamfp.core.test</module>
<module>org.jboss.tools.seamfp.ui.test</module>
</modules>
+
+ <properties>
+ <surefire.timeout>1800</surefire.timeout>
+ </properties>
<build>
<plugins>
<plugin>
@@ -53,10 +57,6 @@
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
<product>org.jboss.tools.tests.product</product>
- <!-- default is 1800 sec = 30 min -->
- <surefire.timeout>1800</surefire.timeout>
- <forkedProcessTimeoutInSeconds>1800</forkedProcessTimeoutInSeconds>
-
<explodedBundles>
<bundle>org.jboss.tools.vpe</bundle>
<bundle>org.mozilla.xulrunner.cocoa.macosx</bundle>
Modified: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/pom.xml
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/pom.xml 2012-08-13 17:15:57 UTC (rev 43002)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/pom.xml 2012-08-13 17:21:34 UTC (rev 43003)
@@ -13,6 +13,7 @@
<properties>
<coverage.filter>org.jboss.tools*</coverage.filter>
<emma.instrument.bundles>org.jboss.tools.struts,org.jboss.tools.struts.text.ext,org.jboss.tools.struts.vpe.struts</emma.instrument.bundles>
+ <surefire.timeout>3600</surefire.timeout>
</properties>
<build>
<plugins>
@@ -20,9 +21,6 @@
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
- <!-- timeout in seconds (60 mins) -->
- <surefire.timeout>3600</surefire.timeout>
- <forkedProcessTimeoutInSeconds>3600</forkedProcessTimeoutInSeconds>
<product>org.jboss.tools.tests</product>
<explodedBundles>
<bundle>org.jboss.tools.vpe</bundle>
Modified: trunk/vpe/tests/pom.xml
===================================================================
--- trunk/vpe/tests/pom.xml 2012-08-13 17:15:57 UTC (rev 43002)
+++ trunk/vpe/tests/pom.xml 2012-08-13 17:21:34 UTC (rev 43003)
@@ -59,6 +59,10 @@
</profile>
</profiles>
+ <properties>
+ <surefire.timeout>3600</surefire.timeout>
+ </properties>
+
<build>
<plugins>
<plugin>
@@ -66,9 +70,6 @@
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
<product>org.jboss.tools.tests.product</product>
- <!-- default is 1800 sec = 30 min -->
- <surefire.timeout>3600</surefire.timeout>
- <forkedProcessTimeoutInSeconds>3600</forkedProcessTimeoutInSeconds>
<appArgLine>-debug -consolelog</appArgLine>
<explodedBundles>
<bundle>org.mozilla.xulrunner.cocoa.macosx</bundle>
Modified: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/pom.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/pom.xml 2012-08-13 17:15:57 UTC (rev 43002)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/pom.xml 2012-08-13 17:21:34 UTC (rev 43003)
@@ -16,6 +16,7 @@
<systemProperties>-Djbosstools.test.jre.6=${jbosstools.test.jre.6} -Djbosstools.test.jre.5=${jbosstools.test.jre.5} -Djbosstools.test.jboss.home.4.2=${requirementsDirectory}/jboss-4.2.3.GA</systemProperties>
<coverage.filter>org.jboss.tools.ws.creation.core*</coverage.filter>
<emma.instrument.bundles>org.jboss.tools.ws.creation.core</emma.instrument.bundles>
+ <surefire.timeout>3600</surefire.timeout>
</properties>
<build>
@@ -53,16 +54,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
-
- <configuration>
- <!-- timeout in seconds -->
- <surefire.timeout>3600</surefire.timeout>
- <forkedProcessTimeoutInSeconds>3600</forkedProcessTimeoutInSeconds>
- </configuration>
- </plugin>
</plugins>
</build>
Modified: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/pom.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/pom.xml 2012-08-13 17:15:57 UTC (rev 43002)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/pom.xml 2012-08-13 17:21:34 UTC (rev 43003)
@@ -28,16 +28,6 @@
<target>1.6</target>
</configuration>
</plugin>
- <!-- plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-surefire-plugin</artifactId>
- <configuration> <useUIHarness>false</useUIHarness>
- <surefire.timeout>3600</surefire.timeout> <forkedProcessTimeoutInSeconds>3600</forkedProcessTimeoutInSeconds>
- <includes> <include>**/TestCase.class</include> <include>**/*TestSuite*.class</include>
- </includes> </configuration> </plugin -->
- <!--plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId>
- <executions> <execution> <id>test</id> <phase>test</phase> <configuration>
- <testClassesDirectory>${project.build.outputDirectory}</testClassesDirectory>
- </configuration> <goals> <goal>test</goal> </goals> </execution> </executions>
- </plugin -->
</plugins>
</build>
</project>
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/pom.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/pom.xml 2012-08-13 17:15:57 UTC (rev 43002)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/pom.xml 2012-08-13 17:21:34 UTC (rev 43003)
@@ -16,6 +16,7 @@
<properties>
<additionalSystemProperties></additionalSystemProperties>
<systemProperties>${additionalSystemProperties} -Dswtbot.test.properties.file=${project.basedir}/properties/swtbot.properties</systemProperties>
+ <surefire.timeout>10800</surefire.timeout>
</properties>
<profiles>
<profile>
@@ -60,9 +61,6 @@
<testClass>org.jboss.tools.ws.ui.bot.test.WSAllBotTests</testClass>
<useUIThread>false</useUIThread>
<skip>${swtbot.test.skip}</skip>
- <!-- Kill swt bot test take more than 3 hours minutes (10800 seconds)
- to finish -->
- <forkedProcessTimeoutInSeconds>10800</forkedProcessTimeoutInSeconds>
<dependencies combine.children="append">
<dependency>
<type>p2-installable-unit</type>
12 years, 5 months
JBoss Tools SVN: r43002 - in trunk: jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2012-08-13 13:15:57 -0400 (Mon, 13 Aug 2012)
New Revision: 43002
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFLogTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/log.xhtml.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
Log:
https://issues.jboss.org/browse/JBIDE-12421 - <a4j:log> template was updated.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFLogTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFLogTemplate.java 2012-08-13 08:41:03 UTC (rev 43001)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFLogTemplate.java 2012-08-13 17:15:57 UTC (rev 43002)
@@ -11,16 +11,10 @@
package org.jboss.tools.jsf.vpe.ajax4jsf.template;
-
-import java.util.List;
-
-import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.template.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
-import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
-import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
@@ -35,67 +29,56 @@
* @author Igor Zhukov
*/
public class Ajax4JSFLogTemplate extends VpeAbstractTemplate {
+
+ private static final String CLEAR_BUTTON = "Clear"; //$NON-NLS-1$
- /** DEFAULT_DIV_SIZE */
- private final static String DEFAULT_WIDTH = "800px"; //$NON-NLS-1$
- private final static String DEFAULT_HEIGHT = "600px"; //$NON-NLS-1$
- private final static String DEFAULT_OVERFLOW = "auto"; //$NON-NLS-1$
-
- private final static String CLEAR_BUTTON = "Clear"; //$NON-NLS-1$
-
- /**
- * The Constructor.
- */
- public Ajax4JSFLogTemplate() {
- super();
- }
-
- /**
- * Creates a node of the visual tree on the node of the source tree.
- *
- * @param pageContext
- * Contains the information on edited page.
- * @param sourceNode
- * The current node of the source tree.
- * @param visualDocument
- * The document of the visual tree.
- * @return The information on the created node of the visual tree.
- */
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
- // cast to Element
Element sourceElement = (Element) sourceNode;
-
nsIDOMElement divElement = visualDocument.createElement(HTML.TAG_DIV);
-
String style = sourceElement.getAttribute(HTML.ATTR_STYLE);
- // set STYLE attributes
- // check 'overflow' attribute
- String parameterValue = VpeStyleUtil.getParameterFromStyleAttribute(style, HTML.STYLE_PARAMETER_OVERFLOW);
- if (parameterValue == null || parameterValue.equals(Constants.EMPTY)) {
- parameterValue = ComponentUtil.getAttribute(sourceElement, HTML.STYLE_PARAMETER_OVERFLOW, DEFAULT_OVERFLOW);
- style = VpeStyleUtil.setParameterInStyle(style, HTML.STYLE_PARAMETER_OVERFLOW, parameterValue);
+ /*
+ * Set OVERFLOW to the STYLE
+ */
+ if (sourceElement.hasAttribute(HTML.STYLE_PARAMETER_OVERFLOW)) {
+ style = VpeStyleUtil.setParameterInStyle(style,
+ HTML.STYLE_PARAMETER_OVERFLOW,
+ sourceElement.getAttribute(HTML.STYLE_PARAMETER_OVERFLOW));
}
- // check 'width' attribute
- parameterValue = VpeStyleUtil.getParameterFromStyleAttribute(style, HTML.ATTR_WIDTH);
- if (parameterValue == null || parameterValue.equals(Constants.EMPTY)) {
- parameterValue = ComponentUtil.getAttribute(sourceElement, HTML.ATTR_WIDTH, DEFAULT_WIDTH);
- style = VpeStyleUtil.setParameterInStyle(style, HTML.ATTR_WIDTH, parameterValue);
+ /*
+ * Set WIDTH to the STYLE
+ */
+ int size;
+ if (sourceElement.hasAttribute(HTML.ATTR_WIDTH)) {
+ size = VpeStyleUtil.cssSizeToInt(sourceElement.getAttribute(HTML.ATTR_WIDTH));
+ if (size != -1) {
+ style = VpeStyleUtil.setSizeInStyle(style, HTML.ATTR_WIDTH, size);
+ }
}
- // check 'height' attribute
- parameterValue = VpeStyleUtil.getParameterFromStyleAttribute(style, HTML.ATTR_HEIGHT);
- if (parameterValue == null || parameterValue.equals(Constants.EMPTY)) {
- parameterValue = ComponentUtil.getAttribute(sourceElement, HTML.ATTR_HEIGHT, DEFAULT_HEIGHT);
- style = VpeStyleUtil.setParameterInStyle(style, HTML.ATTR_HEIGHT, parameterValue);
+ /*
+ * Set HEIGHT to the STYLE
+ */
+ if (sourceElement.hasAttribute(HTML.ATTR_HEIGHT)) {
+ size = VpeStyleUtil.cssSizeToInt(sourceElement.getAttribute(HTML.ATTR_HEIGHT));
+ if (size != -1) {
+ style = VpeStyleUtil.setSizeInStyle(style, HTML.ATTR_HEIGHT, size);
+ }
}
+ /*
+ * Set STYLE to the DIV
+ */
divElement.setAttribute(HTML.ATTR_STYLE, style);
- // set CLASS attribute
- String styleClass = ComponentUtil.getAttribute(sourceElement, RichFaces.ATTR_STYLE_CLASS);
- if (!Constants.EMPTY.equals(styleClass)) {
- divElement.setAttribute(HTML.ATTR_CLASS, styleClass);
+ /*
+ * Set CLASS attribute to the DIV
+ */
+ if (sourceElement.hasAttribute(RichFaces.ATTR_STYLE_CLASS)) {
+ divElement.setAttribute(HTML.ATTR_CLASS,
+ sourceElement.getAttribute(RichFaces.ATTR_STYLE_CLASS));
}
- // create 'Clear' button
+ /*
+ * Create 'Clear' button
+ */
nsIDOMElement clearButton = visualDocument.createElement(HTML.TAG_BUTTON);
clearButton.appendChild(visualDocument.createTextNode(CLEAR_BUTTON));
clearButton.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_TYPE_BUTTON);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml 2012-08-13 08:41:03 UTC (rev 43001)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml 2012-08-13 17:15:57 UTC (rev 43002)
@@ -225,6 +225,10 @@
<vpe:template children="yes" modify="no"
class="org.jboss.tools.jsf.vpe.ajax4jsf.template.Ajax4JSFLogTemplate">
<vpe:pseudoContent defaultText="no" />
+ <vpe:resize>
+ <vpe:width width-attr="width" />
+ <vpe:height height-attr="height" />
+ </vpe:resize>
</vpe:template>
</vpe:tag>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/log.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/log.xhtml.xml 2012-08-13 08:41:03 UTC (rev 43001)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/log.xhtml.xml 2012-08-13 17:15:57 UTC (rev 43002)
@@ -1,43 +1,51 @@
<tests>
<test id="log">
- <DIV STYLE="overflow: auto; width: 800px; height: 600px;">
- <BUTTON TYPE="button">Clear</BUTTON>
- </DIV>
+ <DIV STYLE="">
+ <BUTTON TYPE="button">
+ Clear
+ </BUTTON>
+ </DIV>
</test>
- <test id="compliteLog">
- <DIV>
- <DIV>
- <SPAN STYLE="-moz-user-modify: read-write;">
- <SPAN CLASS="vpe-text">
- f:verbatim
- </SPAN>
- </SPAN>
- <SPAN CLASS="vpe-text">
- Over Text For loadStyle
- </SPAN>
- </DIV>
- <DIV STYLE="overflow: auto; color: red; background-color: red; width: 400px; height: 100px;"
- CLASS="myClass">
- <BUTTON TYPE="button">Clear</BUTTON>
- </DIV>
- </DIV>
- </test>
- <test id="compliteLog2">
- <DIV>
- <DIV>
- <SPAN STYLE="-moz-user-modify: read-write;">
- <SPAN CLASS="vpe-text">
- f:verbatim
- </SPAN>
- </SPAN>
- <SPAN CLASS="vpe-text">
- Over Text For loadStyle
- </SPAN>
- </DIV>
- <DIV STYLE="overflow: auto; color: red; background-color: red; width: 350px; height: 250px;"
- CLASS="myClass">
- <BUTTON TYPE="button">Clear</BUTTON>
- </DIV>
- </DIV>
- </test>
+ <test id="compliteLog">
+ <DIV CLASS="vpe-text">
+ <DIV CLASS="vpe-text">
+ <SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ f:verbatim
+ </SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Over Text For loadStyle
+ </SPAN>
+ </DIV>
+ <DIV
+ STYLE="color: red; overflow: auto; background-color: red; width: 400px; height: 100px;"
+ CLASS="myClass">
+ <BUTTON TYPE="button">
+ Clear
+ </BUTTON>
+ </DIV>
+ </DIV>
+ </test>
+ <test id="compliteLog2">
+ <DIV CLASS="vpe-text">
+ <DIV CLASS="vpe-text">
+ <SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ f:verbatim
+ </SPAN>
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Over Text For loadStyle
+ </SPAN>
+ </DIV>
+ <DIV
+ STYLE="color: red; overflow: auto; background-color: red; width: 350px; height: 250px;"
+ CLASS="myClass">
+ <BUTTON TYPE="button">
+ Clear
+ </BUTTON>
+ </DIV>
+ </DIV>
+ </test>
</tests>
\ No newline at end of file
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2012-08-13 08:41:03 UTC (rev 43001)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2012-08-13 17:15:57 UTC (rev 43002)
@@ -178,8 +178,9 @@
String parameter = sizeAttribute.substring(dotPosition + 1, sizeAttribute.length());
String style = sourceElement.getAttribute(attribute);
- if (style == null || EMPTY_STRING.equals(style))
+ if (style == null || EMPTY_STRING.equals(style)) {
return -1;
+ }
int parameterPosition = style.indexOf(parameter);
if (parameterPosition >= 0) {
@@ -999,4 +1000,26 @@
return colorStr;
}
// org.jboss.tools.jst.css.dialog.common.Util.getColor(..)
+
+ /**
+ * Converts "100px" to integer 100
+ *
+ * @param sizeString string for width or height
+ * @return size number
+ */
+ public static int cssSizeToInt(String sizeString) {
+ int size = -1;
+ if (sizeString != null && !EMPTY_STRING.equalsIgnoreCase(sizeString)) {
+ int pxPosition = sizeString.indexOf(PX_STRING);
+ if (pxPosition >= 0) {
+ sizeString = sizeString.substring(0, pxPosition).trim();
+ }
+ try {
+ size = Integer.parseInt(sizeString);
+ } catch (NumberFormatException e) {
+ //do nothing
+ }
+ }
+ return size;
+ }
}
\ No newline at end of file
12 years, 5 months
JBoss Tools SVN: r43001 - trunk/struts/tests/org.jboss.tools.struts.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-08-13 04:41:03 -0400 (Mon, 13 Aug 2012)
New Revision: 43001
Modified:
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/pom.xml
Log:
mavenization of struts swt bot tests
Modified: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/pom.xml
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/pom.xml 2012-08-13 08:40:27 UTC (rev 43000)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/pom.xml 2012-08-13 08:41:03 UTC (rev 43001)
@@ -1,24 +1,119 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.tools.struts</groupId>
<artifactId>tests</artifactId>
<version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.struts.tests</groupId>
- <artifactId>org.jboss.tools.struts.ui.bot.test</artifactId>
-
+ <artifactId>org.jboss.tools.struts.ui.bot.test</artifactId>
+
<packaging>eclipse-test-plugin</packaging>
- <build>
+ <properties>
+ <additionalSystemProperties></additionalSystemProperties>
+ <systemProperties>${additionalSystemProperties} -Dswtbot.test.properties.file=${project.basedir}/properties/swtbot.properties</systemProperties>
+ </properties>
+ <profiles>
+ <profile>
+ <id>debug</id>
+ <properties>
+ <additionalSystemProperties>-Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y</additionalSystemProperties>
+ </properties>
+ </profile>
+ </profiles>
+ <build>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.4</version>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <skip>${skipRequirements}</skip>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-dist</artifactId>
+ <version>7.1.1.Final</version>
+ <type>zip</type>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
- <skip>true</skip>
+ <testSuite>org.jboss.tools.struts.ui.bot.test</testSuite>
+ <testClass>org.jboss.tools.struts.ui.bot.test.StrutsAllBotTests</testClass>
+ <useUIThread>false</useUIThread>
+ <skip>${swtbot.test.skip}</skip>
+ <dependencies combine.children="append">
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.tools.struts.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.ide.eclipse.as.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <resolver>p2</resolver>
+ <ignoreTychoRepositories>true</ignoreTychoRepositories>
+ <environments>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86_64</arch>
+ </environment>
+ </environments>
+ </configuration>
+ </plugin>
</plugins>
</build>
</project>
12 years, 5 months
JBoss Tools SVN: r43000 - in trunk/struts/tests/org.jboss.tools.struts.ui.bot.test: properties and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-08-13 04:40:27 -0400 (Mon, 13 Aug 2012)
New Revision: 43000
Added:
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/properties/
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/properties/swtbot.properties
Log:
properties folder added
Added: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/properties/swtbot.properties
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/properties/swtbot.properties (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/properties/swtbot.properties 2012-08-13 08:40:27 UTC (rev 43000)
@@ -0,0 +1 @@
+SERVER=AS,7.1,default,target/requirements/jboss-as-7.1.1.Final
12 years, 5 months
JBoss Tools SVN: r42999 - trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/tutorial.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-08-13 04:40:04 -0400 (Mon, 13 Aug 2012)
New Revision: 42999
Modified:
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/tutorial/TutorialTest.java
Log:
tests refactoring
Modified: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/tutorial/TutorialTest.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/tutorial/TutorialTest.java 2012-08-13 07:43:21 UTC (rev 42998)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/tutorial/TutorialTest.java 2012-08-13 08:40:04 UTC (rev 42999)
@@ -88,11 +88,17 @@
util.waitForNonIgnoredJobs();
}
- /**
- * 2.1. Starting Up
- */
@Test
- public void testCreateProject() {
+ public void testTutorial() {
+ createProject(); //2.1. Starting Up
+ addJSPs(); //2.2. Creating the Application Components
+ generateClasses(); //3. Generating Stub Coding
+ coding(); //4. Coding the Various Files
+ startServer(); //5. Compiling the Classes and Running the Application
+ validators(); //6. Struts Validation Examples
+ }
+
+ private void createProject() {
eclipse.createNew(EntityType.STRUTS_PROJECT);
bot.shell(IDELabel.Shell.NEW_STRUTS_PROJECT).activate();
bot.textWithLabel(IDELabel.NewStrutsProjectDialog.NAME).setText(
@@ -120,11 +126,7 @@
t.getNode("struts-config.xml"));
}
- /**
- * 2.2. Creating the Application Components
- */
- @Test
- public void testAddJSPs() {
+ private void addJSPs() {
//2.2.1.1. Creating the Page Placeholders
SWTBotView v = bot.viewByTitle(IDELabel.View.WEB_PROJECTS);
v.show();
@@ -229,11 +231,7 @@
util.waitForNonIgnoredJobs();
}
- /**
- * Chapter 3. Generating Stub Coding
- */
- @Test
- public void testGenerateClasses() {
+ private void generateClasses() {
StrutsUIEditorBot guiBot = new StrutsUIEditorBot(bot.activeEditor().getReference());
guiBot.selectPage("Diagram");
guiBot.clickContextMenu("Generate Java Code...");
@@ -247,11 +245,7 @@
Assert.assertTrue(status.contains("Form beans: 1"));
}
- /**
- * Chapter 4. Coding the Various Files
- */
- @Test
- public void testCoding() {
+ private void coding() {
SWTBotView pe = new SWTWorkbenchBot().viewByTitle("Package Explorer");
pe.show();
SWTBotTree fTree = pe.bot().tree();
@@ -330,11 +324,7 @@
editor.saveAndClose();
}
- /**
- * Chapter 5. Compiling the Classes and Running the Application
- */
- @Test
- public void testStartServer() {
+ private void startServer() {
servers.startServer(configuredState.getServer().name);
configuredState.getServer().isRunning = true;
StrutsUIEditorBot gui = new StrutsUIEditorBot(bot.activeEditor().getReference());
@@ -350,11 +340,7 @@
Assert.assertTrue(browser.getText().contains("Input name:"));
}
- /**
- * Chapter 6. Struts Validation Examples
- */
- @Test
- public void testValidators() {
+ private void validators() {
//6.1. Starting Point
SWTBotView v = bot.viewByTitle(IDELabel.View.WEB_PROJECTS);
v.show();
12 years, 5 months