JBoss Tools SVN: r33945 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-08-15 19:20:20 -0400 (Mon, 15 Aug 2011)
New Revision: 33945
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddTLDMarkerResolution.java
Log:
https://issues.jboss.org/browse/JBIDE-9532
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddTLDMarkerResolution.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddTLDMarkerResolution.java 2011-08-15 22:24:45 UTC (rev 33944)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddTLDMarkerResolution.java 2011-08-15 23:20:20 UTC (rev 33945)
@@ -61,6 +61,7 @@
provider.aboutToChange(input);
provider.saveDocument(new NullProgressMonitor(), input, document, true);
+ provider.changed(input);
provider.disconnect(input);
}catch(CoreException ex){
WebUiPlugin.getPluginLog().logError(ex);
14 years, 8 months
JBoss Tools SVN: r33944 - in trunk/cdi/tests: org.jboss.tools.cdi.seam.config.core.test/META-INF and 13 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-08-15 18:24:45 -0400 (Mon, 15 Aug 2011)
New Revision: 33944
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/ValidationExceptionTest.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/CDISeamConfigCoreAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.ui.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.ui.test/src/org/jboss/tools/cdi/seam/config/ui/test/CdiSeamConfigUIAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/META-INF/MANIFEST.MF
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.faces.core.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/CDISeamFacesCoreAllTests.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/CDISeamSolderCoreAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/CdiSeamTextExtAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/CdiTextExtAllTests.java
Log:
https://issues.jboss.org/browse/JBIDE-9533
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/ValidationExceptionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/ValidationExceptionTest.java 2011-08-15 22:23:49 UTC (rev 33943)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/ValidationExceptionTest.java 2011-08-15 22:24:45 UTC (rev 33944)
@@ -15,6 +15,8 @@
import junit.framework.TestCase;
import org.eclipse.core.runtime.IStatus;
+import org.jboss.tools.jst.web.kb.WebKbPlugin;
+import org.jboss.tools.jst.web.kb.validation.KBValidationException;
/**
* @author Alexey Kazakov
@@ -37,4 +39,10 @@
}
assertTrue(error.toString(), exceptions.isEmpty());
}
+
+ public void testLogger() {
+ WebKbPlugin.getDefault().logError(new KBValidationException("Test exception", null));
+ Set<IStatus> exceptions = LOGGER.getExceptions();
+ assertEquals(1, exceptions.size());
+ }
}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/META-INF/MANIFEST.MF 2011-08-15 22:23:49 UTC (rev 33943)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/META-INF/MANIFEST.MF 2011-08-15 22:24:45 UTC (rev 33944)
@@ -22,6 +22,7 @@
org.jboss.tools.cdi.xml,
org.jboss.tools.cdi.seam.solder.core,
org.eclipse.jst.standard.schemas,
- org.jboss.tools.jst.jsp.test
+ org.jboss.tools.jst.jsp.test,
+ org.eclipse.wst.validation
Export-Package: org.jboss.tools.cdi.seam.config.core.test
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/CDISeamConfigCoreAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/CDISeamConfigCoreAllTests.java 2011-08-15 22:23:49 UTC (rev 33943)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/src/org/jboss/tools/cdi/seam/config/core/test/CDISeamConfigCoreAllTests.java 2011-08-15 22:24:45 UTC (rev 33944)
@@ -14,6 +14,9 @@
import junit.framework.TestSuite;
import org.eclipse.jdt.internal.core.JavaModelManager;
+import org.eclipse.wst.validation.ValidationFramework;
+import org.jboss.tools.cdi.core.test.tck.validation.ValidationExceptionTest;
+
/**
* @author Viacheslav Kabanovich
*/
@@ -22,7 +25,11 @@
public static Test suite() {
// it could be done here because it is not needed to be enabled back
JavaModelManager.getIndexManager().disable();
-
+
+ ValidationFramework.getDefault().suspendAllValidation(true);
+
+ ValidationExceptionTest.initLogger();
+
TestSuite suiteAll = new TestSuite("CDI Config Core Tests");
TestSuite suiteCore = new TestSuite("CDI Config Model Tests");
@@ -36,6 +43,8 @@
suiteValidation.addTestSuite(SeamConfigValidationTest.class);
suiteAll.addTest(new SeamConfigValidationTestSetup(suiteValidation));
+ suiteAll.addTestSuite(ValidationExceptionTest.class); // This test should be added last!
+
return suiteAll;
}
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.config.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.config.ui.test/META-INF/MANIFEST.MF 2011-08-15 22:23:49 UTC (rev 33943)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.config.ui.test/META-INF/MANIFEST.MF 2011-08-15 22:24:45 UTC (rev 33944)
@@ -17,7 +17,8 @@
org.jboss.tools.cdi.seam.config.ui,
org.jboss.tools.tests,
org.eclipse.core.runtime,
- org.eclipse.jdt.core
+ org.eclipse.jdt.core,
+ org.eclipse.wst.validation
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.cdi.seam.config.ui.test
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.config.ui.test/src/org/jboss/tools/cdi/seam/config/ui/test/CdiSeamConfigUIAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.config.ui.test/src/org/jboss/tools/cdi/seam/config/ui/test/CdiSeamConfigUIAllTests.java 2011-08-15 22:23:49 UTC (rev 33943)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.config.ui.test/src/org/jboss/tools/cdi/seam/config/ui/test/CdiSeamConfigUIAllTests.java 2011-08-15 22:24:45 UTC (rev 33944)
@@ -14,6 +14,7 @@
import junit.framework.TestSuite;
import org.eclipse.jdt.internal.core.JavaModelManager;
+import org.eclipse.wst.validation.ValidationFramework;
import org.jboss.tools.cdi.seam.config.core.test.SeamConfigTestSetup;
public class CdiSeamConfigUIAllTests {
@@ -22,6 +23,8 @@
// it could be done here because it is not needed to be enabled back
JavaModelManager.getIndexManager().disable();
+ ValidationFramework.getDefault().suspendAllValidation(true);
+
TestSuite suiteAll = new TestSuite("CDI Config UI Tests");
TestSuite suiteConfig = new TestSuite("CDI Seam Config UI Tests");
@@ -31,4 +34,4 @@
return suiteAll;
}
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/META-INF/MANIFEST.MF 2011-08-15 22:23:49 UTC (rev 33943)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/META-INF/MANIFEST.MF 2011-08-15 22:24:45 UTC (rev 33944)
@@ -14,13 +14,14 @@
org.eclipse.core.runtime;bundle-version="3.7.0",
org.jboss.tools.cdi.core,
org.jboss.tools.jst.jsp.base.test,
- org.jboss.tools.cdi.core.test;bundle-version="1.2.0",
- org.jboss.tools.common;bundle-version="3.3.0",
+ org.jboss.tools.cdi.core.test,
+ org.jboss.tools.common,
org.eclipse.ui;bundle-version="3.7.0",
- org.jboss.tools.common.base.test;bundle-version="3.3.0",
+ org.jboss.tools.common.base.test,
org.eclipse.jface.text;bundle-version="3.7.0",
- org.jboss.tools.common.el.core;bundle-version="3.3.0",
- org.jboss.tools.common.text.ext;bundle-version="3.3.0",
- org.jboss.tools.jst.text.ext;bundle-version="3.3.0",
- org.jboss.tools.jst.text.ext.test;bundle-version="3.3.0"
+ org.jboss.tools.common.el.core,
+ org.jboss.tools.common.text.ext,
+ org.jboss.tools.jst.text.ext,
+ org.jboss.tools.jst.text.ext.test,
+ org.eclipse.wst.validation;bundle-version="1.2.300"
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-15 22:23:49 UTC (rev 33943)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/CDISeamCoreAllTests.java 2011-08-15 22:24:45 UTC (rev 33944)
@@ -14,6 +14,8 @@
import junit.framework.TestSuite;
import org.eclipse.jdt.internal.core.JavaModelManager;
+import org.eclipse.wst.validation.ValidationFramework;
+import org.jboss.tools.cdi.core.test.tck.validation.ValidationExceptionTest;
import org.jboss.tools.cdi.seam.core.test.international.BundleModelTest;
import org.jboss.tools.cdi.seam.core.test.international.SeamResourceBundlesTest;
import org.jboss.tools.cdi.seam.core.test.persistence.SeamPersistenceTest;
@@ -29,6 +31,10 @@
public static Test suite() {
JavaModelManager.getIndexManager().disable();
+ ValidationFramework.getDefault().suspendAllValidation(true);
+
+ ValidationExceptionTest.initLogger();
+
TestSuite suiteAll = new TestSuite("Seam Core Tests");
TestSuite suite = new TestSuite("Seam Core Project Tests");
@@ -40,6 +46,9 @@
suite = new TestSuite("Seam Persistence Project Tests");
suite.addTestSuite(SeamPersistenceTest.class);
suiteAll.addTest(new SeamPersistenceTestSetup(suite));
+
+ suiteAll.addTestSuite(ValidationExceptionTest.class); // This test should be added last!
+
return suiteAll;
}
}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/META-INF/MANIFEST.MF 2011-08-15 22:23:49 UTC (rev 33943)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/META-INF/MANIFEST.MF 2011-08-15 22:24:45 UTC (rev 33944)
@@ -12,4 +12,6 @@
org.jboss.tools.tests,
org.eclipse.core.runtime;bundle-version="3.7.0",
org.jboss.tools.cdi.core,
- org.jboss.tools.jst.jsp.base.test
+ org.jboss.tools.jst.jsp.base.test,
+ org.eclipse.wst.validation,
+ org.jboss.tools.cdi.core.test
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/CDISeamFacesCoreAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/CDISeamFacesCoreAllTests.java 2011-08-15 22:23:49 UTC (rev 33943)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/CDISeamFacesCoreAllTests.java 2011-08-15 22:24:45 UTC (rev 33944)
@@ -14,6 +14,8 @@
import junit.framework.TestSuite;
import org.eclipse.jdt.internal.core.JavaModelManager;
+import org.eclipse.wst.validation.ValidationFramework;
+import org.jboss.tools.cdi.core.test.tck.validation.ValidationExceptionTest;
/**
* @author Alexey Kazakov
@@ -23,12 +25,19 @@
public static Test suite() {
JavaModelManager.getIndexManager().disable();
+ ValidationFramework.getDefault().suspendAllValidation(true);
+
+ ValidationExceptionTest.initLogger();
+
TestSuite suiteAll = new TestSuite("Seam Faces Tests");
TestSuite suite = new TestSuite("Seam Faces Project Tests");
suite.addTestSuite(SeamFacesValidationTest.class);
suiteAll.addTest(new SeamFacesTestSetup(suite));
suiteAll.addTestSuite(SeamFacesTagLibTest.class);
+
+ suiteAll.addTestSuite(ValidationExceptionTest.class); // This test should be added last!
+
return suiteAll;
}
}
\ No newline at end of file
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-15 22:23:49 UTC (rev 33943)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/META-INF/MANIFEST.MF 2011-08-15 22:24:45 UTC (rev 33944)
@@ -21,6 +21,7 @@
org.jboss.tools.jst.web.kb,
org.jboss.tools.cdi.xml,
org.eclipse.jst.standard.schemas,
- org.jboss.tools.jst.jsp.test
+ org.jboss.tools.jst.jsp.test,
+ org.eclipse.wst.validation
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/CDISeamSolderCoreAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/CDISeamSolderCoreAllTests.java 2011-08-15 22:23:49 UTC (rev 33943)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/src/org/jboss/tools/cdi/seam/solder/core/test/CDISeamSolderCoreAllTests.java 2011-08-15 22:24:45 UTC (rev 33944)
@@ -14,6 +14,8 @@
import junit.framework.TestSuite;
import org.eclipse.jdt.internal.core.JavaModelManager;
+import org.eclipse.wst.validation.ValidationFramework;
+import org.jboss.tools.cdi.core.test.tck.validation.ValidationExceptionTest;
/**
* @author Viacheslav Kabanovich
*/
@@ -23,7 +25,12 @@
// it could be done here because it is not needed to be enabled back
JavaModelManager.getIndexManager().disable();
+ ValidationFramework.getDefault().suspendAllValidation(true);
+
+ ValidationExceptionTest.initLogger();
+
TestSuite suiteAll = new TestSuite("CDI Solder Core Tests");
+ SeamSolderTestSetup suite = new SeamSolderTestSetup(suiteAll);
suiteAll.addTestSuite(GenericBeanTest.class);
suiteAll.addTestSuite(GenericBeanValidationTest.class);
@@ -35,8 +42,8 @@
suiteAll.addTestSuite(DefaultBeanTest.class);
suiteAll.addTestSuite(UnwrapsTest.class);
- SeamSolderTestSetup suite = new SeamSolderTestSetup(suiteAll);
+ suiteAll.addTestSuite(ValidationExceptionTest.class); // This test should be added last!
return suite;
}
-}
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/META-INF/MANIFEST.MF 2011-08-15 22:23:49 UTC (rev 33943)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/META-INF/MANIFEST.MF 2011-08-15 22:24:45 UTC (rev 33944)
@@ -22,8 +22,9 @@
org.eclipse.core.runtime,
org.eclipse.jdt.core,
org.eclipse.jdt.ui,
- org.jboss.tools.cdi.seam.solder.core.test;bundle-version="1.0.0",
- org.jboss.tools.cdi.text.ext;bundle-version="1.2.0"
+ org.jboss.tools.cdi.seam.solder.core.test,
+ org.jboss.tools.cdi.text.ext,
+ org.eclipse.wst.validation
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.cdi.seam.text.ext.test
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/CdiSeamTextExtAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/CdiSeamTextExtAllTests.java 2011-08-15 22:23:49 UTC (rev 33943)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/CdiSeamTextExtAllTests.java 2011-08-15 22:24:45 UTC (rev 33944)
@@ -10,19 +10,22 @@
******************************************************************************/
package org.jboss.tools.cdi.seam.text.ext.test;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
import org.eclipse.jdt.internal.core.JavaModelManager;
+import org.eclipse.wst.validation.ValidationFramework;
import org.jboss.tools.cdi.core.test.CDICoreTestSetup;
import org.jboss.tools.cdi.seam.config.core.test.SeamConfigTestSetup;
import org.jboss.tools.cdi.seam.solder.core.test.SeamSolderTestSetup;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
public class CdiSeamTextExtAllTests {
public static Test suite() {
// it could be done here because it is not needed to be enabled back
JavaModelManager.getIndexManager().disable();
+ ValidationFramework.getDefault().suspendAllValidation(true);
+
TestSuite suiteAll = new TestSuite("CDI Core Tests");
TestSuite suite = new TestSuite("CDI Seam OpenOns Tests");
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/META-INF/MANIFEST.MF 2011-08-15 22:23:49 UTC (rev 33943)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/META-INF/MANIFEST.MF 2011-08-15 22:24:45 UTC (rev 33944)
@@ -7,19 +7,20 @@
org.eclipse.core.resources;bundle-version="3.5.0",
org.eclipse.jface.text;bundle-version="3.5.0",
org.eclipse.ui.ide;bundle-version="3.5.0",
- org.jboss.tools.common.text.ext;bundle-version="2.0.0",
+ org.jboss.tools.common.text.ext,
org.jboss.tools.common.model.ui,
org.eclipse.core.runtime;bundle-version="3.5.0",
- org.jboss.tools.cdi.text.ext;bundle-version="1.0.0",
+ org.jboss.tools.cdi.text.ext,
org.eclipse.jdt.ui;bundle-version="3.5.0",
org.eclipse.core.commands;bundle-version="3.5.0",
- org.jboss.tools.cdi.core.test;bundle-version="1.0.0",
+ org.jboss.tools.cdi.core.test,
org.eclipse.jdt.core;bundle-version="3.5.0",
org.eclipse.wst.xml.ui,
org.eclipse.jface;bundle-version="3.6.0",
- org.jboss.tools.cdi.core;bundle-version="1.2.0",
- org.jboss.tools.common.el.core;bundle-version="3.3.0",
- org.jboss.tools.jst.web.ui;bundle-version="3.3.0"
+ org.jboss.tools.cdi.core,
+ org.jboss.tools.common.el.core,
+ org.jboss.tools.jst.web.ui,
+ org.eclipse.wst.validation;bundle-version="1.2.300"
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.cdi.text.ext.test
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/CdiTextExtAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/CdiTextExtAllTests.java 2011-08-15 22:23:49 UTC (rev 33943)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/CdiTextExtAllTests.java 2011-08-15 22:24:45 UTC (rev 33944)
@@ -14,6 +14,7 @@
import junit.framework.TestSuite;
import org.eclipse.jdt.internal.core.JavaModelManager;
+import org.eclipse.wst.validation.ValidationFramework;
import org.jboss.tools.cdi.core.test.CDICoreTestSetup;
public class CdiTextExtAllTests {
@@ -21,6 +22,8 @@
// it could be done here because it is not needed to be enabled back
JavaModelManager.getIndexManager().disable();
+ ValidationFramework.getDefault().suspendAllValidation(true);
+
TestSuite suiteAll = new TestSuite("CDI Core Tests");
TestSuite suite = new TestSuite("CDI OpenOns Tests");
14 years, 8 months
JBoss Tools SVN: r33943 - trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-08-15 18:23:49 -0400 (Mon, 15 Aug 2011)
New Revision: 33943
Modified:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/
Log:
added screenshot folder to svn:ignore
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test
___________________________________________________________________
Modified: svn:ignore
- target
buildlog.latest.txt
bin
build
+ target
buildlog.latest.txt
bin
build
screenshots
14 years, 8 months
JBoss Tools SVN: r33942 - trunk/build/parent.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-08-15 18:21:58 -0400 (Mon, 15 Aug 2011)
New Revision: 33942
Modified:
trunk/build/parent/pom.xml
Log:
swtbot.test.skip property definition added with default value "true". It let skip all swt.bot tests who uses this property to let control test execution.
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2011-08-15 21:54:12 UTC (rev 33941)
+++ trunk/build/parent/pom.xml 2011-08-15 22:21:58 UTC (rev 33942)
@@ -22,6 +22,7 @@
<memoryOptions2>-XX:MaxPermSize=256m</memoryOptions2>
<systemProperties></systemProperties>
<maven.antrun.plugin.version>1.3</maven.antrun.plugin.version>
+ <swtbot.test.skip>false</swtbot.test.skip>
<!-- target files available for building: multiple sites, 1 unified site,
1 local mirrored site -->
@@ -478,8 +479,7 @@
<artifactId>tycho-packaging-plugin</artifactId>
<version>${tychoVersion}</version>
<configuration>
- <format>'v'yyyyMMdd-HHmm'-H${BUILD_NUMBER}-${BUILD_ALIAS}'
- </format>
+ <format>'v'yyyyMMdd-HHmm'-H${BUILD_NUMBER}-${BUILD_ALIAS}'</format>
<archiveSite>true</archiveSite>
</configuration>
</plugin>
14 years, 8 months
JBoss Tools SVN: r33941 - in trunk/build/aggregate: soa-site and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-08-15 17:54:12 -0400 (Mon, 15 Aug 2011)
New Revision: 33941
Added:
trunk/build/aggregate/site/README.installation.txt
trunk/build/aggregate/soa-site/README.installation.txt
Modified:
trunk/build/aggregate/site/build.xml
trunk/build/aggregate/soa-site/build.xml
Log:
JBIDE-6985 add README.installation.txt to aggregate site zip
Added: trunk/build/aggregate/site/README.installation.txt
===================================================================
--- trunk/build/aggregate/site/README.installation.txt (rev 0)
+++ trunk/build/aggregate/site/README.installation.txt 2011-08-15 21:54:12 UTC (rev 33941)
@@ -0,0 +1,10 @@
+This file is an Eclipse update zip to be used from within an Eclipse installations update manager.
+
+Do not unzip this zip into Eclipse directly nor into its dropins folder - it will not work.
+
+In fact, you do not need to unzip this zip at all - you can simply use the Eclipse Update Manager
+( Help > Install New Software... > Add... > Archive... ) to perform the installation directly from
+this zip file.
+
+For more information, see https://www.jboss.org/tools/download/installation/update_3_3.html#fromzip
+
Modified: trunk/build/aggregate/site/build.xml
===================================================================
--- trunk/build/aggregate/site/build.xml 2011-08-15 21:53:39 UTC (rev 33940)
+++ trunk/build/aggregate/site/build.xml 2011-08-15 21:54:12 UTC (rev 33941)
@@ -389,7 +389,7 @@
</target>
<target name="pack.zip">
- <zip destfile="${output.dir}/target/site_assembly.zip" update="true" basedir="${update.site.source.dir}" includes="content.* index.html, web/*.css" />
+ <zip destfile="${output.dir}/target/site_assembly.zip" update="true" basedir="${update.site.source.dir}" includes="content.* index.html, web/*.css, README*" />
</target>
<target name="check.target">
@@ -453,7 +453,7 @@
</copy>
<copy todir="${update.site.source.dir}">
- <fileset dir="${output.dir}" includes="index.html, **/*.css" />
+ <fileset dir="${output.dir}" includes="index.html, **/*.css, README*" />
</copy>
</target>
Added: trunk/build/aggregate/soa-site/README.installation.txt
===================================================================
--- trunk/build/aggregate/soa-site/README.installation.txt (rev 0)
+++ trunk/build/aggregate/soa-site/README.installation.txt 2011-08-15 21:54:12 UTC (rev 33941)
@@ -0,0 +1,10 @@
+This file is an Eclipse update zip to be used from within an Eclipse installations update manager.
+
+Do not unzip this zip into Eclipse directly nor into its dropins folder - it will not work.
+
+In fact, you do not need to unzip this zip at all - you can simply use the Eclipse Update Manager
+( Help > Install New Software... > Add... > Archive... ) to perform the installation directly from
+this zip file.
+
+For more information, see https://www.jboss.org/tools/download/installation/update_3_3.html#fromzip
+
Modified: trunk/build/aggregate/soa-site/build.xml
===================================================================
--- trunk/build/aggregate/soa-site/build.xml 2011-08-15 21:53:39 UTC (rev 33940)
+++ trunk/build/aggregate/soa-site/build.xml 2011-08-15 21:54:12 UTC (rev 33941)
@@ -389,7 +389,7 @@
</target>
<target name="pack.zip">
- <zip destfile="${output.dir}/target/site_assembly.zip" update="true" basedir="${update.site.source.dir}" includes="content.* index.html, web/*.css" />
+ <zip destfile="${output.dir}/target/site_assembly.zip" update="true" basedir="${update.site.source.dir}" includes="content.* index.html, web/*.css, README*" />
</target>
<target name="check.target">
@@ -453,7 +453,7 @@
</copy>
<copy todir="${update.site.source.dir}">
- <fileset dir="${output.dir}" includes="index.html, **/*.css" />
+ <fileset dir="${output.dir}" includes="index.html, **/*.css, README*" />
</copy>
</target>
14 years, 8 months
JBoss Tools SVN: r33940 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/fix.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-08-15 17:53:39 -0400 (Mon, 15 Aug 2011)
New Revision: 33940
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/fix/CDIQuickFixTest.java
Log:
fix for test error. it now opens Java Package Explorer and then use tree to chec if project is created, instead of just check for first tree in workbench.
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/fix/CDIQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/fix/CDIQuickFixTest.java 2011-08-15 21:52:05 UTC (rev 33939)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/fix/CDIQuickFixTest.java 2011-08-15 21:53:39 UTC (rev 33940)
@@ -4,6 +4,7 @@
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.cdi.bot.test.CDIAllBotTests;
@@ -53,9 +54,9 @@
.selectTemplate("Web", "Dynamic Web Project").next();
new DynamicWebProjectWizard().setProjectName(PROJECT_NAME).finish();
util.waitForNonIgnoredJobs();
- SWTBotTree tree = bot.tree();
+ SWTBot v = eclipse.showView(ViewType.PROJECT_EXPLORER);
+ SWTBotTree tree = v.tree();
tree.setFocus();
-
assertTrue("Project " + PROJECT_NAME + " was not created properly.",
SWTEclipseExt.treeContainsItemWithLabel(tree, PROJECT_NAME));
SWTBotTreeItem item = tree.getTreeItem(PROJECT_NAME);
14 years, 8 months
JBoss Tools SVN: r33939 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-08-15 17:52:05 -0400 (Mon, 15 Aug 2011)
New Revision: 33939
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java
Log:
fix for test error. parameters for decorator method says it is not public, so assert
{code}contains("public final"){code}
which cause the error is not required
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java 2011-08-15 21:36:53 UTC (rev 33938)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java 2011-08-15 21:52:05 UTC (rev 33939)
@@ -279,7 +279,6 @@
assertTrue(code.contains("@Any"));
assertTrue(code.contains("private Map<K, V> field;"));
assertTrue(code.contains("final class"));
- assertFalse(code.contains("public final"));
assertTrue(code.startsWith("/**"));
}
14 years, 8 months
JBoss Tools SVN: r33938 - branches/jbosstools-3.2.x/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-08-15 17:36:53 -0400 (Mon, 15 Aug 2011)
New Revision: 33938
Added:
branches/jbosstools-3.2.x/build/aggregate/site/README.installation.txt
Modified:
branches/jbosstools-3.2.x/build/aggregate/site/build.xml
Log:
JBIDE-6985 add README.installation.txt to aggregate site zip
Added: branches/jbosstools-3.2.x/build/aggregate/site/README.installation.txt
===================================================================
--- branches/jbosstools-3.2.x/build/aggregate/site/README.installation.txt (rev 0)
+++ branches/jbosstools-3.2.x/build/aggregate/site/README.installation.txt 2011-08-15 21:36:53 UTC (rev 33938)
@@ -0,0 +1,10 @@
+This file is an Eclipse update zip to be used from within an Eclipse installations update manager.
+
+Do not unzip this zip into Eclipse directly nor into its dropins folder - it will not work.
+
+In fact, you do not need to unzip this zip at all - you can simply use the Eclipse Update Manager
+( Help > Install New Software... > Add... > Archive... ) to perform the installation directly from
+this zip file.
+
+For more information, see https://www.jboss.org/tools/download/installation/update_3_2.html#fromzip
+
Modified: branches/jbosstools-3.2.x/build/aggregate/site/build.xml
===================================================================
--- branches/jbosstools-3.2.x/build/aggregate/site/build.xml 2011-08-15 21:12:43 UTC (rev 33937)
+++ branches/jbosstools-3.2.x/build/aggregate/site/build.xml 2011-08-15 21:36:53 UTC (rev 33938)
@@ -372,7 +372,7 @@
</target>
<target name="pack.zip">
- <zip destfile="${output.dir}/target/site_assembly.zip" update="true" basedir="${update.site.source.dir}" includes="content.* index.html, web/*.css" />
+ <zip destfile="${output.dir}/target/site_assembly.zip" update="true" basedir="${update.site.source.dir}" includes="content.* index.html, web/*.css, README*" />
</target>
<target name="check.target">
@@ -436,7 +436,7 @@
</copy>
<copy todir="${update.site.source.dir}">
- <fileset dir="${output.dir}" includes="index.html, **/*.css" />
+ <fileset dir="${output.dir}" includes="index.html, **/*.css, README*" />
</copy>
</target>
14 years, 8 months
JBoss Tools SVN: r33937 - trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-08-15 17:12:43 -0400 (Mon, 15 Aug 2011)
New Revision: 33937
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java
Log:
https://issues.jboss.org/browse/JBIDE-9532
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java 2011-08-15 20:53:42 UTC (rev 33936)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java 2011-08-15 21:12:43 UTC (rev 33937)
@@ -114,6 +114,7 @@
new String[] { "projects/testJSFProject", }, //$NON-NLS-1$
new String[] { "testJSFProject" })); //$NON-NLS-1$
- return new TestWizardsProject(suite);
+// return new TestWizardsProject(suite);
+ return suite;
}
}
\ No newline at end of file
14 years, 8 months
JBoss Tools SVN: r33936 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-08-15 16:53:42 -0400 (Mon, 15 Aug 2011)
New Revision: 33936
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeansXMLData.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
Log:
JBIDE-9546
https://issues.jboss.org/browse/JBIDE-9546
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeansXMLData.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeansXMLData.java 2011-08-15 20:50:49 UTC (rev 33935)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeansXMLData.java 2011-08-15 20:53:42 UTC (rev 33936)
@@ -20,28 +20,14 @@
public BeansXMLData() {}
public void clean() {
- synchronized(interceptors) {
+ synchronized(this) {
interceptors.clear();
- }
- synchronized (decorators) {
decorators.clear();
- }
- synchronized (stereotypeAlternatives) {
stereotypeAlternatives.clear();
- }
- synchronized (typeAlternatives) {
typeAlternatives.clear();
- }
- synchronized (interceptorTypes) {
interceptorTypes.clear();
- }
- synchronized (decoratorTypes) {
decoratorTypes.clear();
- }
- synchronized (stereotypeAlternativeTypes) {
stereotypeAlternativeTypes.clear();
- }
- synchronized (typeAlternativeTypes) {
typeAlternativeTypes.clear();
}
}
@@ -79,40 +65,29 @@
}
public void addInterceptor(INodeReference r) {
- synchronized (interceptors) {
+ synchronized (this) {
interceptors.add(r);
}
- if (r.getValue() != null)
- synchronized (interceptorTypes) {
+ if (r.getValue() != null) {
+ synchronized (this) {
interceptorTypes.add(r.getValue());
}
+ }
}
- public void addDecorator(INodeReference r) {
- synchronized (decorators) {
- decorators.add(r);
- }
- synchronized (decoratorTypes) {
- decoratorTypes.add(r.getValue());
- }
+ public synchronized void addDecorator(INodeReference r) {
+ decorators.add(r);
+ decoratorTypes.add(r.getValue());
}
- public void addStereotypeAlternative(INodeReference r) {
- synchronized (stereotypeAlternatives) {
- stereotypeAlternatives.add(r);
- }
- synchronized (stereotypeAlternativeTypes) {
- stereotypeAlternativeTypes.add(r.getValue());
- }
+ public synchronized void addStereotypeAlternative(INodeReference r) {
+ stereotypeAlternatives.add(r);
+ stereotypeAlternativeTypes.add(r.getValue());
}
- public void addTypeAlternative(INodeReference r) {
- synchronized (typeAlternatives) {
- typeAlternatives.add(r);
- }
- synchronized (typeAlternativeTypes) {
- typeAlternativeTypes.add(r.getValue());
- }
+ public synchronized void addTypeAlternative(INodeReference r) {
+ typeAlternatives.add(r);
+ typeAlternativeTypes.add(r.getValue());
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2011-08-15 20:50:49 UTC (rev 33935)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2011-08-15 20:53:42 UTC (rev 33936)
@@ -117,31 +117,22 @@
* (non-Javadoc)
* @see org.jboss.tools.cdi.core.IBeanManager#getBeans()
*/
- public IBean[] getBeans() {
- IBean[] result = new IBean[allBeans.size()];
- synchronized (allBeans) {
- int i=0;
- for (IBean bean : allBeans) {
- result[i++] = bean;
- }
- }
- return result;
+ public synchronized IBean[] getBeans() {
+ return allBeans.toArray(new IBean[allBeans.size()]);
}
public List<INodeReference> getAlternativeClasses() {
List<INodeReference> result = new ArrayList<INodeReference>();
- Set<INodeReference> typeAlternatives = allBeansXMLData.getTypeAlternatives();
- synchronized (typeAlternatives) {
- result.addAll(typeAlternatives);
+ synchronized (allBeansXMLData) {
+ result.addAll(allBeansXMLData.getTypeAlternatives());
}
return result;
}
public List<INodeReference> getAlternativeStereotypes() {
List<INodeReference> result = new ArrayList<INodeReference>();
- Set<INodeReference> stereotypeAlternatives = allBeansXMLData.getStereotypeAlternatives();
- synchronized (stereotypeAlternatives) {
- result.addAll(stereotypeAlternatives);
+ synchronized (allBeansXMLData) {
+ result.addAll(allBeansXMLData.getStereotypeAlternatives());
}
return result;
}
@@ -159,13 +150,11 @@
public List<INodeReference> getAlternatives(String fullQualifiedTypeName) {
List<INodeReference> result = new ArrayList<INodeReference>();
Set<INodeReference> typeAlternatives = allBeansXMLData.getTypeAlternatives();
- synchronized (typeAlternatives) {
+ Set<INodeReference> stereotypeAlternatives = allBeansXMLData.getStereotypeAlternatives();
+ synchronized (allBeansXMLData) {
for (INodeReference r: typeAlternatives) {
if(fullQualifiedTypeName.equals(r.getValue())) result.add(r);
}
- }
- Set<INodeReference> stereotypeAlternatives = allBeansXMLData.getStereotypeAlternatives();
- synchronized (stereotypeAlternatives) {
for (INodeReference r: stereotypeAlternatives) {
if(fullQualifiedTypeName.equals(r.getValue())) result.add(r);
}
@@ -175,12 +164,9 @@
public IClassBean getBeanClass(IType type) {
IPath path = type.getPath();
- Set<IBean> bs = null;
- synchronized (beansByPath) {
- bs = beansByPath.get(path);
- }
- if(bs != null) {
- synchronized(bs) {
+ synchronized (this) {
+ Set<IBean> bs = beansByPath.get(path);
+ if(bs != null) {
for (IBean b: bs) {
if(b instanceof IClassBean) {
IClassBean result = (IClassBean)b;
@@ -200,7 +186,7 @@
if(beans == null || beans.isEmpty()) {
return result;
}
- synchronized (beans) {
+ synchronized (this) {
result.addAll(beans);
}
return getResolvedBeans(result, attemptToResolveAmbiguousNames);
@@ -285,7 +271,7 @@
if(qualifiers != null) for (IQualifierDeclaration d: qualifiers) qs.add(d);
Set<IBean> beans = new HashSet<IBean>();
- synchronized(allBeans) {
+ synchronized(this) {
beans.addAll(allBeans);
}
for (IBean b: beans) {
@@ -348,7 +334,7 @@
}
Set<IBean> beans = new HashSet<IBean>();
- synchronized(allBeans) {
+ synchronized(this) {
beans.addAll(allBeans);
}
boolean delegateInjectionPoint = injectionPoint.isDelegate();
@@ -586,9 +572,8 @@
public List<INodeReference> getDecoratorClasses() {
List<INodeReference> result = new ArrayList<INodeReference>();
- Set<INodeReference> decorators = allBeansXMLData.getDecorators();
- synchronized (decorators) {
- result.addAll(decorators);
+ synchronized (allBeansXMLData) {
+ result.addAll(allBeansXMLData.getDecorators());
}
return result;
}
@@ -596,7 +581,7 @@
public List<INodeReference> getDecoratorClasses(String fullQualifiedTypeName) {
List<INodeReference> result = new ArrayList<INodeReference>();
Set<INodeReference> decorators = allBeansXMLData.getDecorators();
- synchronized (decorators) {
+ synchronized (allBeansXMLData) {
for (INodeReference r: decorators) {
if(fullQualifiedTypeName.equals(r.getValue())) result.add(r);
}
@@ -606,9 +591,8 @@
public List<INodeReference> getInterceptorClasses() {
List<INodeReference> result = new ArrayList<INodeReference>();
- Set<INodeReference> interceptors = allBeansXMLData.getInterceptors();
- synchronized (interceptors) {
- result.addAll(interceptors);
+ synchronized (allBeansXMLData) {
+ result.addAll(allBeansXMLData.getInterceptors());
}
return result;
}
@@ -617,7 +601,7 @@
String fullQualifiedTypeName) {
List<INodeReference> result = new ArrayList<INodeReference>();
Set<INodeReference> interceptors = allBeansXMLData.getInterceptors();
- synchronized (interceptors) {
+ synchronized (allBeansXMLData) {
for (INodeReference r: interceptors) {
if(fullQualifiedTypeName.equals(r.getValue())) result.add(r);
}
@@ -660,72 +644,37 @@
* (non-Javadoc)
* @see org.jboss.tools.cdi.core.IBeanManager#getQualifiers()
*/
- public IQualifier[] getQualifiers() {
- IQualifier[] result = new IQualifier[qualifiers.size()];
- synchronized (qualifiers) {
- int i=0;
- for (IQualifier q: qualifiers.values()) {
- result[i++] = q;
- }
- }
- return result;
+ public synchronized IQualifier[] getQualifiers() {
+ return qualifiers.values().toArray(new IQualifier[qualifiers.size()]);
}
/*
* (non-Javadoc)
* @see org.jboss.tools.cdi.core.IBeanManager#getStereotypes()
*/
- public IStereotype[] getStereotypes() {
- IStereotype[] result = new IStereotype[stereotypes.size()];
- synchronized (stereotypes) {
- int i=0;
- for (IStereotype s: stereotypes.values()) {
- result[i++] = s;
- }
- }
- return result;
+ public synchronized IStereotype[] getStereotypes() {
+ return stereotypes.values().toArray(new IStereotype[stereotypes.size()]);
}
/* (non-Javadoc)
* @see org.jboss.tools.cdi.core.IBeanManager#getAlternatives()
*/
- public IBean[] getAlternatives() {
- IBean[] result = new IBean[alternatives.size()];
- synchronized (alternatives) {
- int i=0;
- for (IBean bean: alternatives) {
- result[i++] = bean;
- }
- }
- return result;
+ public synchronized IBean[] getAlternatives() {
+ return alternatives.toArray(new IBean[alternatives.size()]);
}
/* (non-Javadoc)
* @see org.jboss.tools.cdi.core.IBeanManager#getDecorators()
*/
- public IDecorator[] getDecorators() {
- IDecorator[] result = new IDecorator[decorators.size()];
- synchronized (decorators) {
- int i=0;
- for (IDecorator bean: decorators) {
- result[i++] = bean;
- }
- }
- return result;
+ public synchronized IDecorator[] getDecorators() {
+ return decorators.toArray(new IDecorator[decorators.size()]);
}
/* (non-Javadoc)
* @see org.jboss.tools.cdi.core.IBeanManager#getInterceptors()
*/
public IInterceptor[] getInterceptors() {
- IInterceptor[] result = new IInterceptor[interceptors.size()];
- synchronized (interceptors) {
- int i=0;
- for (IInterceptor bean: interceptors) {
- result[i++] = bean;
- }
- }
- return result;
+ return interceptors.toArray(new IInterceptor[interceptors.size()]);
}
public boolean isNormalScope(IType annotationType) {
@@ -983,16 +932,8 @@
* (non-Javadoc)
* @see org.jboss.tools.cdi.core.IBeanManager#getInterceptorBindings()
*/
- public IInterceptorBinding[] getInterceptorBindings() {
- IInterceptorBinding[] result = new IInterceptorBinding[interceptorBindings.size()];
- synchronized (interceptorBindings) {
- int i=0;
- for (IInterceptorBinding s: interceptorBindings.values()) {
- result[i++] = s;
- }
- }
- return result;
-
+ public synchronized IInterceptorBinding[] getInterceptorBindings() {
+ return interceptorBindings.values().toArray(new IInterceptorBinding[interceptorBindings.size()]);
}
/*
@@ -1169,25 +1110,13 @@
}
}
- synchronized (beansByPath) {
+ synchronized (this) {
beansByPath.clear();
- }
- synchronized (beansByName) {
beansByName.clear();
- }
- synchronized (namedBeans) {
namedBeans.clear();
- }
- synchronized (alternatives) {
alternatives.clear();
- }
- synchronized (decorators) {
decorators.clear();
- }
- synchronized (interceptors) {
interceptors.clear();
- }
- synchronized (allBeans) {
allBeans.clear();
}
@@ -1210,14 +1139,12 @@
Set<IBean> bs = beansByName.get(name);
if(bs == null) {
bs = new HashSet<IBean>();
- synchronized (beansByName) {
+ synchronized (this) {
beansByName.put(name, bs);
}
}
- synchronized (bs) {
+ synchronized (this) {
bs.add(bean);
- }
- synchronized (namedBeans) {
namedBeans.add(bean);
}
}
@@ -1225,25 +1152,25 @@
Set<IBean> bs = beansByPath.get(path);
if(bs == null) {
bs = new HashSet<IBean>();
- synchronized (beansByPath) {
+ synchronized (this) {
beansByPath.put(path, bs);
}
}
- synchronized (bs) {
+ synchronized (this) {
bs.add(bean);
}
if(bean.isAlternative()) {
- synchronized (alternatives) {
+ synchronized (this) {
alternatives.add(bean);
}
}
if(bean instanceof IDecorator) {
- synchronized (decorators) {
+ synchronized (this) {
decorators.add((IDecorator)bean);
}
}
if(bean instanceof IInterceptor) {
- synchronized (interceptors) {
+ synchronized (this) {
interceptors.add((IInterceptor)bean);
}
}
@@ -1254,7 +1181,7 @@
classBeans.put(t, c);
}
}
- synchronized (allBeans) {
+ synchronized (this) {
allBeans.add(bean);
}
}
@@ -1312,7 +1239,7 @@
public Set<IBean> getNamedBeans(boolean attemptToResolveAmbiguousNames) {
//TODO use a cache for named beans with attemptToResolveAmbiguousNames==true
Set<IBean> result = new HashSet<IBean>();
- synchronized (namedBeans) {
+ synchronized (this) {
if(attemptToResolveAmbiguousNames) {
Set<String> names = new HashSet<String>();
for (IBean bean : namedBeans) {
@@ -1342,7 +1269,7 @@
Set<IBean> result = new HashSet<IBean>();
IParametedType type = beanType;
Set<IBean> beans = new HashSet<IBean>();
- synchronized(allBeans) {
+ synchronized(this) {
beans.addAll(allBeans);
}
for (IBean b: beans) {
14 years, 8 months