JBoss Tools SVN: r23163 - in trunk/esb: features and 13 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-01 19:09:19 -0400 (Thu, 01 Jul 2010)
New Revision: 23163
Added:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/requirements.properties
Modified:
trunk/esb/features/org.jboss.tools.esb.feature/pom.xml
trunk/esb/features/org.jboss.tools.esb.test.feature/pom.xml
trunk/esb/features/pom.xml
trunk/esb/plugins/org.jboss.tools.esb.core/pom.xml
trunk/esb/plugins/org.jboss.tools.esb.project.core/pom.xml
trunk/esb/plugins/org.jboss.tools.esb.project.ui/pom.xml
trunk/esb/plugins/org.jboss.tools.esb.ui/pom.xml
trunk/esb/plugins/pom.xml
trunk/esb/pom.xml
trunk/esb/site/pom.xml
trunk/esb/tests/org.jboss.tools.esb.core.test/pom.xml
trunk/esb/tests/org.jboss.tools.esb.project.core.test/META-INF/MANIFEST.MF
trunk/esb/tests/org.jboss.tools.esb.project.core.test/pom.xml
trunk/esb/tests/org.jboss.tools.esb.project.core.test/src/org/jboss/tools/esb/project/core/test/ESBProjectDeploymentTest.java
trunk/esb/tests/pom.xml
Log:
1. maven repo structure aligned to svn repo
2. requirement build migrated to requirements profile by defining requirements.properties file
3. system properties reading is changed to throw exception in case null value returned
Modified: trunk/esb/features/org.jboss.tools.esb.feature/pom.xml
===================================================================
--- trunk/esb/features/org.jboss.tools.esb.feature/pom.xml 2010-07-01 22:27:54 UTC (rev 23162)
+++ trunk/esb/features/org.jboss.tools.esb.feature/pom.xml 2010-07-01 23:09:19 UTC (rev 23163)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.esb.features</groupId>
<artifactId>org.jboss.tools.esb.feature</artifactId>
<version>1.3.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
Modified: trunk/esb/features/org.jboss.tools.esb.test.feature/pom.xml
===================================================================
--- trunk/esb/features/org.jboss.tools.esb.test.feature/pom.xml 2010-07-01 22:27:54 UTC (rev 23162)
+++ trunk/esb/features/org.jboss.tools.esb.test.feature/pom.xml 2010-07-01 23:09:19 UTC (rev 23163)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.esb.features</groupId>
<artifactId>org.jboss.tools.esb.test.feature</artifactId>
<version>1.3.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
Modified: trunk/esb/features/pom.xml
===================================================================
--- trunk/esb/features/pom.xml 2010-07-01 22:27:54 UTC (rev 23162)
+++ trunk/esb/features/pom.xml 2010-07-01 23:09:19 UTC (rev 23163)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>esb.features</artifactId>
+ <groupId>org.jboss.tools.esb</groupId>
+ <artifactId>features</artifactId>
+ <name>esb.features</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
@@ -16,4 +11,4 @@
<module>org.jboss.tools.esb.test.feature</module>
</modules>
</project>
-
\ No newline at end of file
+
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/pom.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/pom.xml 2010-07-01 22:27:54 UTC (rev 23162)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/pom.xml 2010-07-01 23:09:19 UTC (rev 23163)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.esb.plugins</groupId>
<artifactId>org.jboss.tools.esb.core</artifactId>
<version>1.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/pom.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/pom.xml 2010-07-01 22:27:54 UTC (rev 23162)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/pom.xml 2010-07-01 23:09:19 UTC (rev 23163)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.esb.plugins</groupId>
<artifactId>org.jboss.tools.esb.project.core</artifactId>
<version>1.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/pom.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/pom.xml 2010-07-01 22:27:54 UTC (rev 23162)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/pom.xml 2010-07-01 23:09:19 UTC (rev 23163)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.esb.plugins</groupId>
<artifactId>org.jboss.tools.esb.project.ui</artifactId>
<version>1.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/esb/plugins/org.jboss.tools.esb.ui/pom.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/pom.xml 2010-07-01 22:27:54 UTC (rev 23162)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/pom.xml 2010-07-01 23:09:19 UTC (rev 23163)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.esb.plugins</groupId>
<artifactId>org.jboss.tools.esb.ui</artifactId>
<version>1.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/esb/plugins/pom.xml
===================================================================
--- trunk/esb/plugins/pom.xml 2010-07-01 22:27:54 UTC (rev 23162)
+++ trunk/esb/plugins/pom.xml 2010-07-01 23:09:19 UTC (rev 23163)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>esb.plugins</artifactId>
+ <groupId>org.jboss.tools.esb</groupId>
+ <artifactId>plugins</artifactId>
+ <name>esb.plugins</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
@@ -18,4 +13,4 @@
<module>org.jboss.tools.esb.ui</module>
</modules>
</project>
-
\ No newline at end of file
+
Modified: trunk/esb/pom.xml
===================================================================
--- trunk/esb/pom.xml 2010-07-01 22:27:54 UTC (rev 23162)
+++ trunk/esb/pom.xml 2010-07-01 23:09:19 UTC (rev 23163)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
<groupId>org.jboss.tools</groupId>
- <artifactId>esb.all</artifactId>
+ <artifactId>esb</artifactId>
+ <name>esb.all</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
Modified: trunk/esb/site/pom.xml
===================================================================
--- trunk/esb/site/pom.xml 2010-07-01 22:27:54 UTC (rev 23162)
+++ trunk/esb/site/pom.xml 2010-07-01 23:09:19 UTC (rev 23163)
@@ -6,8 +6,9 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>esb.site</artifactId>
+ <groupId>org.jboss.tools.esb</groupId>
+ <artifactId>site</artifactId>
+ <name>esb.site</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-update-site</packaging>
</project>
Modified: trunk/esb/tests/org.jboss.tools.esb.core.test/pom.xml
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.core.test/pom.xml 2010-07-01 22:27:54 UTC (rev 23162)
+++ trunk/esb/tests/org.jboss.tools.esb.core.test/pom.xml 2010-07-01 23:09:19 UTC (rev 23163)
@@ -7,8 +7,13 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.esb.tests</groupId>
<artifactId>org.jboss.tools.esb.core.test</artifactId>
<version>1.3.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <emma.filter>org.jboss.tools.esb.core*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.esb.core,org.jboss.tools.esb.project.core</emma.instrument.bundles>
+ </properties>
</project>
Modified: trunk/esb/tests/org.jboss.tools.esb.project.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.project.core.test/META-INF/MANIFEST.MF 2010-07-01 22:27:54 UTC (rev 23162)
+++ trunk/esb/tests/org.jboss.tools.esb.project.core.test/META-INF/MANIFEST.MF 2010-07-01 23:09:19 UTC (rev 23163)
@@ -5,7 +5,7 @@
Bundle-Version: 1.3.0.qualifier
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.junit;bundle-version="3.8.2",
+Require-Bundle: org.junit,
org.jboss.tools.esb.project.core;bundle-version="1.0.0",
org.eclipse.wst.common.project.facet.core;bundle-version="1.4.0",
org.eclipse.wst.server.core;bundle-version="1.1.101",
Modified: trunk/esb/tests/org.jboss.tools.esb.project.core.test/pom.xml
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.project.core.test/pom.xml 2010-07-01 22:27:54 UTC (rev 23162)
+++ trunk/esb/tests/org.jboss.tools.esb.project.core.test/pom.xml 2010-07-01 23:09:19 UTC (rev 23163)
@@ -7,77 +7,28 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.esb.tests</groupId>
<artifactId>org.jboss.tools.esb.project.core.test</artifactId>
<version>1.3.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
- <!-- build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-test-plugin</artifactId>
- <version>${tychoVersion}</version>
- <configuration>
- <dependencies>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.eclipse.jst.web_ui.feature.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency>
- </dependencies>
- <dependencies>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.eclipse.wst.web_ui.feature.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency>
- </dependencies>
- </configuration>
- </plugin>
- </plugins>
- </build-->
- <properties>
- <requirements>soap,jbossas</requirements>
- <projectRoot>${basedir}/../../..</projectRoot>
- <requirements.build>${projectRoot}/requirements/target</requirements.build>
+
+ <properties>
+ <systemProperties>-Djbosstools.test.jboss.home.4.2=${requirement.build.root}/jboss-soa-p.5.0.0/jboss-as -Djbosstools.test.jboss.home.5.0=${requirement.build.root}/jboss-soa-p.5.0.0/jboss-as -Djbosstools.test.jboss.home.5.1=${requirement.build.root}/jboss-5.1.0.GA -Djbosstools.test.soap.home.4.3=${requirement.build.root}/jboss-soa-p.4.3.0 -Djbosstools.test.soap.home.5.0=${requirement.build.root}/jboss-soa-p.5.0.0</systemProperties>
+ <emma.filter>org.jboss.tools.esb.core*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.esb.project.core</emma.instrument.bundles>
</properties>
-
+
<build>
<plugins>
<plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>maven-osgi-test-plugin</artifactId>
<configuration>
- <!--environmentVariables>
- <jbosstools.test.jboss.home.4.2>${requirements.build}/jboss-soa-p.5.0.0/jboss-as</jbosstools.test.jboss.home.4.2>
- <jbosstools.test.jboss.home.5.0>${requirements.build}/jboss-soa-p.5.0.0/jboss-as</jbosstools.test.jboss.home.5.0>
- <jbosstools.test.jboss.home.5.1>${requirements.build}/jboss-5.1.0.GA</jbosstools.test.jboss.home.5.1>
- <jbosstools.test.soap.home.4.3>${requirements.build}/jboss-soa-p.5.0.0</jbosstools.test.soap.home.4.3>
- <jbosstools.test.soap.home.5.0>${requirements.build}/jboss-soa-p.5.0.0</jbosstools.test.soap.home.5.0>
- </environmentVariables-->
- <argLine>-Djbosstools.test.jboss.home.4.2=${requirements.build}/jboss-soa-p.5.0.0/jboss-as -Djbosstools.test.jboss.home.5.0=${requirements.build}/jboss-soa-p.5.0.0/jboss-as -Djbosstools.test.jboss.home.5.1=${requirements.build}/jboss-5.1.0.GA -Djbosstools.test.soap.home.4.3=${requirements.build}/jboss-soa-p.5.0.0 -Djbosstools.test.soap.home.5.0=${requirements.build}/jboss-soa-p.5.0.0</argLine>
+ <explodedBundles>
+ <bundle>org.jboss.tools.esb.project.core</bundle>
+ </explodedBundles>
</configuration>
</plugin>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.3</version>
- <executions>
- <execution>
- <id>prepare-eclipse-base</id>
- <phase>generate-test-resources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <ant dir="${projectRoot}/requirements" inheritAll="true">
- <property name="requirements" value="${requirements}" />
- </ant>
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
</project>
Added: trunk/esb/tests/org.jboss.tools.esb.project.core.test/requirements.properties
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.project.core.test/requirements.properties (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.project.core.test/requirements.properties 2010-07-01 23:09:19 UTC (rev 23163)
@@ -0,0 +1 @@
+requirements=soap,jbossas
\ No newline at end of file
Modified: trunk/esb/tests/org.jboss.tools.esb.project.core.test/src/org/jboss/tools/esb/project/core/test/ESBProjectDeploymentTest.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.project.core.test/src/org/jboss/tools/esb/project/core/test/ESBProjectDeploymentTest.java 2010-07-01 22:27:54 UTC (rev 23162)
+++ trunk/esb/tests/org.jboss.tools.esb.project.core.test/src/org/jboss/tools/esb/project/core/test/ESBProjectDeploymentTest.java 2010-07-01 23:09:19 UTC (rev 23163)
@@ -1,6 +1,7 @@
package org.jboss.tools.esb.project.core.test;
import java.io.File;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -58,25 +59,61 @@
import org.jboss.tools.esb.core.runtime.JBossRuntimeManager;
public class ESBProjectDeploymentTest extends TestCase {
+ private static final String SOAP_HOME_5_0_PROP_NAME = "jbosstools.test.soap.home.5.0";
+
+ private static final String SOAP_HOME_4_3_PROP_NAME = "jbosstools.test.soap.home.4.3";
+
+ public static final String BOSS_HOME_5_1_PROP_NAME = "jbosstools.test.jboss.home.5.1";
+
+ public static final String JBOSS_HOME_5_0_PROP_NAME = "jbosstools.test.jboss.home.5.0";
+
+ public static final String JBOSS_HOME_4_2_PROP_NAME = "jbosstools.test.jboss.home.4.2";
+
public static final IVMInstall VM_INSTALL = JavaRuntime
.getDefaultVMInstall();
- public static final String JBOSS_AS_42_HOME = System.getProperty(
- "jbosstools.test.jboss.home.4.2",
- "/home/fugang/jboss-all/jboss-soa-p.5.0.0/jboss-as");
- public static final String JBOSS_AS_50_HOME = System.getProperty(
- "jbosstools.test.jboss.home.5.0",
- "/home/fugang/jboss-all/jboss-soa-p.5.0.0/jboss-as");
- public static final String JBOSS_AS_51_HOME = System.getProperty(
- "jbosstools.test.jboss.home.5.1",
- "/home/fugang/jboss-all/jboss-5.1.0.GA");
- public static final String SERVER_SOAP43_HOME = System.getProperty(
- "jbosstools.test.soap.home.4.3",
- "/home/fugang/jboss-all/jboss-soa-p.5.0.0") + "//jboss-as";
- public static final String SERVER_SOAP50_HOME = System.getProperty(
- "jbosstools.test.soap.home.5.0",
- "/home/fugang/jboss-all/jboss-soa-p.5.0.0") + "//jboss-as";
+ public static final String JBOSS_AS_42_HOME;
+ public static final String JBOSS_AS_50_HOME;
+ public static final String JBOSS_AS_51_HOME;
+ public static final String SERVER_SOAP43_HOME;
+ public static final String SERVER_SOAP50_HOME;
+
+ static {
+ String message = "Use -D{0}=path/to/server to define system property value in command line or "
+ + "in tab Arguments of Eclipse Application Launch Configuration dialog";
+ String syspropValue = System.getProperty(JBOSS_HOME_4_2_PROP_NAME);
+ if(syspropValue!=null) {
+ JBOSS_AS_42_HOME = new File(System.getProperty(JBOSS_HOME_4_2_PROP_NAME)).getAbsolutePath();
+ } else {
+ throw new IllegalArgumentException(MessageFormat.format(message, JBOSS_HOME_4_2_PROP_NAME));
+ }
+ syspropValue = System.getProperty(JBOSS_HOME_5_0_PROP_NAME);
+ if(syspropValue!=null) {
+ JBOSS_AS_50_HOME = new File(System.getProperty(JBOSS_HOME_5_0_PROP_NAME)).getAbsolutePath();
+ } else {
+ throw new IllegalArgumentException(MessageFormat.format(message, JBOSS_HOME_5_0_PROP_NAME));
+ }
+ syspropValue = System.getProperty(BOSS_HOME_5_1_PROP_NAME);
+ if(syspropValue!=null) {
+ JBOSS_AS_51_HOME = new File(System.getProperty(BOSS_HOME_5_1_PROP_NAME)).getAbsolutePath();
+ } else {
+ throw new IllegalArgumentException(MessageFormat.format(message, BOSS_HOME_5_1_PROP_NAME));
+ }
+ syspropValue = System.getProperty(SOAP_HOME_4_3_PROP_NAME);
+ if(syspropValue!=null) {
+ SERVER_SOAP43_HOME = new File(System.getProperty(SOAP_HOME_4_3_PROP_NAME) + "//jboss-as").getAbsolutePath();
+ } else {
+ throw new IllegalArgumentException(MessageFormat.format(message, SOAP_HOME_4_3_PROP_NAME));
+ }
+ syspropValue = System.getProperty(SOAP_HOME_5_0_PROP_NAME);
+ if(syspropValue!=null) {
+ SERVER_SOAP50_HOME = new File(System.getProperty(SOAP_HOME_5_0_PROP_NAME) + "//jboss-as").getAbsolutePath();
+ } else {
+ throw new IllegalArgumentException(MessageFormat.format(message, SOAP_HOME_5_0_PROP_NAME));
+ }
+ }
+
static String userCustomizedESBRuntime = "UserCustomizedESBRuntime";
private JBossRuntimeManager jrm = JBossRuntimeManager.getInstance();
Modified: trunk/esb/tests/pom.xml
===================================================================
--- trunk/esb/tests/pom.xml 2010-07-01 22:27:54 UTC (rev 23162)
+++ trunk/esb/tests/pom.xml 2010-07-01 23:09:19 UTC (rev 23163)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>esb.tests</artifactId>
+ <groupId>org.jboss.tools.esb</groupId>
+ <artifactId>tests</artifactId>
+ <name>esb.tests</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
@@ -16,4 +11,4 @@
<module>org.jboss.tools.esb.project.core.test</module>
</modules>
</project>
-
\ No newline at end of file
+
14 years, 6 months
JBoss Tools SVN: r23162 - in trunk/cdi: plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-07-01 18:27:54 -0400 (Thu, 01 Jul 2010)
New Revision: 23162
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/ICDIAnnotation.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinded.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinding.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IQualifier.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IStereotype.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIAnnotationElement.java
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/ClassBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/InterceptorBindingElement.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/QualifierElement.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeElement.java
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/errorList.txt
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708 Added new validation rule:
- the set of interceptor bindings of a bean or interceptor, including bindings
inherited from stereotypes and other interceptor bindings, has two instances
of a certain interceptor binding type and the instances have different values
of some annotation member
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 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-07-01 22:27:54 UTC (rev 23162)
@@ -36,6 +36,7 @@
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.validation.internal.plugin.ValidationPlugin;
+import org.jboss.tools.cdi.internal.core.impl.ClassBean;
import org.jboss.tools.common.EclipseUtil;
import org.jboss.tools.common.model.util.EclipseJavaUtil;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
@@ -748,9 +749,9 @@
}
return false;
}
-
+
private static CDICoreNature cdiNature;
-
+
public static CDICoreNature getCDINatureWithProgress(final IProject project){
cdiNature = null;
cdiNature = CDICorePlugin.getCDI(project, false);
@@ -775,4 +776,54 @@
return cdiNature;
}
+
+ /**
+ * Collect all the interceptor binding declarations from the bean class or method including all the inherited bindings.
+ * @param binded bean class or method
+ *
+ * @return
+ */
+ public static Set<IInterceptorBindingDeclaration> getAllInterceptorBindingDeclaratios(IInterceptorBinded binded) {
+ return collectInheritedInterceptorBindingDeclaratios(binded, new HashSet<IInterceptorBindingDeclaration>());
+ }
+
+ private static Set<IInterceptorBindingDeclaration> collectInheritedInterceptorBindingDeclaratios(IInterceptorBinded binded, Set<IInterceptorBindingDeclaration> result) {
+ Set<IInterceptorBindingDeclaration> declarations = binded.getInterceptorBindingDeclarations();
+ for (IInterceptorBindingDeclaration declaration : declarations) {
+ if(!result.contains(declaration)) {
+ result.add(declaration);
+ IInterceptorBinding binding = declaration.getInterceptorBinding();
+ collectInheritedInterceptorBindingDeclaratios(binding, result);
+ if(binding instanceof IStereotyped) {
+ collectInheritedInterceptorBindingDeclaratiosFromStereotyps((IStereotyped)binding, result);
+ }
+ }
+ }
+ if(binded instanceof IStereotyped) {
+ collectInheritedInterceptorBindingDeclaratiosFromStereotyps((IStereotyped)binded, result);
+ }
+ return result;
+ }
+
+ private static Set<IInterceptorBindingDeclaration> collectInheritedInterceptorBindingDeclaratiosFromStereotyps(IStereotyped stereotyped, Set<IInterceptorBindingDeclaration> result) {
+ Set<IStereotypeDeclaration> stereotypeDeclarations = collectInheritedStereotypDeclarations(stereotyped, new HashSet<IStereotypeDeclaration>());
+ if(stereotyped instanceof ClassBean) {
+ stereotypeDeclarations.addAll(((ClassBean)stereotyped).getInheritedStereotypDeclarations());
+ }
+ for (IStereotypeDeclaration stereotypeDeclaration : stereotypeDeclarations) {
+ collectInheritedInterceptorBindingDeclaratios(stereotypeDeclaration.getStereotype(), result);
+ }
+ return result;
+ }
+
+ private static Set<IStereotypeDeclaration> collectInheritedStereotypDeclarations(IStereotyped stereotyped, Set<IStereotypeDeclaration> result) {
+ Set<IStereotypeDeclaration> declarations = stereotyped.getStereotypeDeclarations();
+ for (IStereotypeDeclaration declaration : declarations) {
+ if(!result.contains(declaration)) {
+ result.add(declaration);
+ collectInheritedStereotypDeclarations(declaration.getStereotype(), result);
+ }
+ }
+ return result;
+ }
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/ICDIAnnotation.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/ICDIAnnotation.java 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/ICDIAnnotation.java 2010-07-01 22:27:54 UTC (rev 23162)
@@ -1,7 +1,9 @@
package org.jboss.tools.cdi.core;
import java.util.List;
+import java.util.Set;
+import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
/**
@@ -44,4 +46,11 @@
* @return the annotations with given type name
*/
IAnnotationDeclaration getAnnotationDeclaration(String typeName);
+
+ /**
+ * Returns set of members annotated with @Nonbinding
+ *
+ * @return set of members annotated with @Nonbinding
+ */
+ Set<IMethod> getNonBindingMethods();
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinded.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinded.java 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinded.java 2010-07-01 22:27:54 UTC (rev 23162)
@@ -20,8 +20,8 @@
public interface IInterceptorBinded {
/**
- * Obtains the interceptor binding declarations of the class bean or the method of a class bean.
- * This set includes bindings declared in this java class/method.
+ * Obtains the interceptor binding declarations of the class bean or method or stereotype or interceptor binding type.
+ * This set includes bindings declared in this java class bean or method or stereotype or interceptor binding type.
* Use getInterceptorBindings() to get all bindings (i.g. from Stereotypes)
*
* @return the set of interceptor binding declarations
@@ -29,7 +29,7 @@
Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations();
/**
- * Obtains the interceptor bindings of the bean class or the method of a class bean.
+ * Obtains the interceptor bindings of the bean class or method or stereotype or interceptor binding type.
*
* @return the set of interceptor bindings
*/
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinding.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinding.java 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinding.java 2010-07-01 22:27:54 UTC (rev 23162)
@@ -10,28 +10,11 @@
******************************************************************************/
package org.jboss.tools.cdi.core;
-import java.util.Set;
-
-import org.eclipse.jdt.core.IType;
-
/**
* Represents an interceptor binding type.
*
* @author Alexey Kazakov
*/
-public interface IInterceptorBinding extends ICDIAnnotation {
+public interface IInterceptorBinding extends ICDIAnnotation, IInterceptorBinded {
- /**
- * Returns the corresponding IType of the interceptor binding.
- *
- * @return the corresponding IType
- */
- IType getSourceType();
-
- /**
- * Returns the interceptor binding declarations of the interceptor binding.
- *
- * @return the interceptor binding declarations.
- */
- Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations();
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IQualifier.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IQualifier.java 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IQualifier.java 2010-07-01 22:27:54 UTC (rev 23162)
@@ -10,10 +10,6 @@
******************************************************************************/
package org.jboss.tools.cdi.core;
-import java.util.Set;
-
-import org.eclipse.jdt.core.IMethod;
-
/**
* Represents a qualifier.
*
@@ -21,10 +17,4 @@
*/
public interface IQualifier extends ICDIAnnotation {
- /**
- * Returns set of members annotated with @Nonbinding
- *
- * @return set of members annotated with @Nonbinding
- */
- public Set<IMethod> getNonBindingMethods();
-}
+}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IStereotype.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IStereotype.java 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IStereotype.java 2010-07-01 22:27:54 UTC (rev 23162)
@@ -10,8 +10,6 @@
******************************************************************************/
package org.jboss.tools.cdi.core;
-import java.util.Set;
-
import org.eclipse.jdt.core.IAnnotation;
/**
@@ -19,7 +17,7 @@
*
* @author Alexey Kazakov
*/
-public interface IStereotype extends IScoped, IStereotyped, ICDINamedAnnotation, IAnnotated {
+public interface IStereotype extends IScoped, IStereotyped, ICDINamedAnnotation, IAnnotated, IInterceptorBinded {
/**
* Returns the location of @Name declaration of this stereotype. If the bean
@@ -30,13 +28,6 @@
IAnnotation getNameLocation();
/**
- * Returns the interceptor binding declarations of the stereotype.
- *
- * @return the interceptor binding declarations.
- */
- Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations();
-
- /**
* Determines if the stereotype is an alternative.
*
* @return <tt>true</tt> if the stereotype is an alternative, and
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIAnnotationElement.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIAnnotationElement.java 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIAnnotationElement.java 2010-07-01 22:27:54 UTC (rev 23162)
@@ -11,12 +11,16 @@
package org.jboss.tools.cdi.internal.core.impl;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
+import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
import org.jboss.tools.cdi.core.ICDIAnnotation;
import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationDefinition;
+import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationMemberDefinition;
/**
*
@@ -24,14 +28,32 @@
*
*/
public class CDIAnnotationElement extends CDIElement implements ICDIAnnotation {
+
protected AnnotationDefinition definition;
+ Set<IMethod> nonbindingMethods = null;
+
public CDIAnnotationElement() {}
public void setDefinition(AnnotationDefinition definition) {
this.definition = definition;
}
+ public Set<IMethod> getNonBindingMethods() {
+ if(nonbindingMethods == null) {
+ Set<IMethod> result = new HashSet<IMethod>();
+ List<AnnotationMemberDefinition> ms = definition.getMethods();
+ for (AnnotationMemberDefinition m: ms) {
+ if(m.getNonbindingAnnotation() != null) {
+ result.add(m.getMethod());
+ }
+ }
+ nonbindingMethods = result;
+ }
+ return nonbindingMethods;
+
+ }
+
/*
* (non-Javadoc)
* @see org.jboss.tools.cdi.core.ICDIAnnotation#getSourceType()
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 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-07-01 22:27:54 UTC (rev 23162)
@@ -36,6 +36,7 @@
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IBeanMember;
import org.jboss.tools.cdi.core.IBeanMethod;
+import org.jboss.tools.cdi.core.ICDIAnnotation;
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.core.IClassBean;
import org.jboss.tools.cdi.core.IInjectionPoint;
@@ -355,7 +356,7 @@
TreeSet<String> injectionKeys = new TreeSet<String>();
if(injectionQualifiers != null) for (IQualifierDeclaration d: injectionQualifiers) {
- injectionKeys.add(getQualifierDeclarationKey(d));
+ injectionKeys.add(getAnnotationDeclarationKey(d));
}
if(injectionKeys.contains(CDIConstants.ANY_QUALIFIER_TYPE_NAME)) {
@@ -369,7 +370,7 @@
if(beanQualifiers == null || beanQualifiers.isEmpty()) {
beanKeys.add(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME);
} else for (IQualifierDeclaration d: beanQualifiers) {
- beanKeys.add(getQualifierDeclarationKey(d));
+ beanKeys.add(getAnnotationDeclarationKey(d));
}
if(beanKeys.size() == 1 && beanKeys.iterator().next().startsWith(CDIConstants.NAMED_QUALIFIER_TYPE_NAME)) {
beanKeys.add(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME);
@@ -423,17 +424,13 @@
return true;
}
- public static String getQualifierDeclarationKey(IQualifierDeclaration d) throws CoreException {
- IQualifier q = d.getQualifier();
- Set<IMethod> nb = q == null ? new HashSet<IMethod>() : q.getNonBindingMethods();
+ public static String getAnnotationDeclarationKey(IAnnotationDeclaration d) throws CoreException {
+ ICDIAnnotation annotation = d.getAnnotation();
+ Set<IMethod> nb = annotation == null ? new HashSet<IMethod>() : annotation.getNonBindingMethods();
return getAnnotationDeclarationKey(d, nb);
}
- public static String getAnnotationDeclarationKey(IAnnotationDeclaration d) throws CoreException {
- return getAnnotationDeclarationKey(d, null);
- }
-
- public static String getAnnotationDeclarationKey(IAnnotationDeclaration d, Set<IMethod> ignoredMembers) throws CoreException {
+ private static String getAnnotationDeclarationKey(IAnnotationDeclaration d, Set<IMethod> ignoredMembers) throws CoreException {
Set<IMethod> nb = ignoredMembers == null ? new HashSet<IMethod>() : ignoredMembers;
IType type = d.getType();
IMethod[] ms = type.getMethods();
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2010-07-01 22:27:54 UTC (rev 23162)
@@ -39,6 +39,7 @@
import org.jboss.tools.cdi.core.IScopeDeclaration;
import org.jboss.tools.cdi.core.IStereotype;
import org.jboss.tools.cdi.core.IStereotypeDeclaration;
+import org.jboss.tools.cdi.core.IStereotyped;
import org.jboss.tools.cdi.core.ITypeDeclaration;
import org.jboss.tools.cdi.internal.core.impl.definition.AbstractMemberDefinition;
import org.jboss.tools.cdi.internal.core.impl.definition.FieldDefinition;
@@ -477,6 +478,20 @@
return result;
}
+ public Set<IStereotypeDeclaration> getInheritedStereotypDeclarations() {
+ if(superClassBean == null) return Collections.emptySet();
+ Set<IStereotypeDeclaration> result = new HashSet<IStereotypeDeclaration>();
+ Set<IStereotypeDeclaration> ds = superClassBean.getStereotypeDeclarations(true);
+ for (IStereotypeDeclaration d: ds) {
+ if(d.getStereotype() != null && d.getStereotype().getInheritedDeclaration() != null) {
+ result.add(d);
+ } else if(isSpecializing()) {
+ result.add(d);
+ }
+ }
+ return result;
+ }
+
/*
* (non-Javadoc)
* @see org.jboss.tools.cdi.core.IBean#isNullable()
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/InterceptorBindingElement.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/InterceptorBindingElement.java 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/InterceptorBindingElement.java 2010-07-01 22:27:54 UTC (rev 23162)
@@ -10,12 +10,8 @@
******************************************************************************/
package org.jboss.tools.cdi.internal.core.impl;
-import java.util.HashSet;
-import java.util.List;
import java.util.Set;
-import org.eclipse.jdt.core.IType;
-import org.jboss.tools.cdi.core.IAnnotationDeclaration;
import org.jboss.tools.cdi.core.IInterceptorBinding;
import org.jboss.tools.cdi.core.IInterceptorBindingDeclaration;
@@ -28,19 +24,19 @@
public InterceptorBindingElement() {}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.cdi.core.IInterceptorBinded#getInterceptorBindingDeclarations()
+ */
public Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations() {
- Set<IInterceptorBindingDeclaration> result = new HashSet<IInterceptorBindingDeclaration>();
- List<IAnnotationDeclaration> as = definition.getAnnotations();
- for (IAnnotationDeclaration a: as) {
- if(a instanceof InterceptorBindingDeclaration) {
- result.add((InterceptorBindingDeclaration)a);
- }
- }
- return result;
+ return ClassBean.getInterceptorBindingDeclarations(definition);
}
- public IType getSourceType() {
- return definition.getType();
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.cdi.core.IInterceptorBinded#getInterceptorBindings()
+ */
+ public Set<IInterceptorBinding> getInterceptorBindings() {
+ return ClassBean.getInterceptorBindings(definition);
}
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/QualifierElement.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/QualifierElement.java 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/QualifierElement.java 2010-07-01 22:27:54 UTC (rev 23162)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
+ * Copyright (c) 2009 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -10,13 +10,7 @@
******************************************************************************/
package org.jboss.tools.cdi.internal.core.impl;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.jdt.core.IMethod;
import org.jboss.tools.cdi.core.IQualifier;
-import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationMemberDefinition;
/**
*
@@ -24,23 +18,6 @@
*
*/
public class QualifierElement extends CDIAnnotationElement implements IQualifier {
- Set<IMethod> nonbindingMethods = null;
public QualifierElement() {}
-
- public Set<IMethod> getNonBindingMethods() {
- if(nonbindingMethods == null) {
- Set<IMethod> result = new HashSet<IMethod>();
- List<AnnotationMemberDefinition> ms = definition.getMethods();
- for (AnnotationMemberDefinition m: ms) {
- if(m.getNonbindingAnnotation() != null) {
- result.add(m.getMethod());
- }
- }
- nonbindingMethods = result;
- }
- return nonbindingMethods;
-
- }
-
-}
+}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeElement.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeElement.java 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/StereotypeElement.java 2010-07-01 22:27:54 UTC (rev 23162)
@@ -17,6 +17,7 @@
import org.eclipse.jdt.core.IAnnotation;
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
+import org.jboss.tools.cdi.core.IInterceptorBinding;
import org.jboss.tools.cdi.core.IInterceptorBindingDeclaration;
import org.jboss.tools.cdi.core.IScope;
import org.jboss.tools.cdi.core.IScopeDeclaration;
@@ -51,21 +52,22 @@
/*
* (non-Javadoc)
- * @see org.jboss.tools.cdi.core.IStereotype#getInterceptorBindingDeclarations()
+ * @see org.jboss.tools.cdi.core.IInterceptorBinded#getInterceptorBindingDeclarations()
*/
public Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations() {
- Set<IInterceptorBindingDeclaration> result = new HashSet<IInterceptorBindingDeclaration>();
- List<IAnnotationDeclaration> as = definition.getAnnotations();
- for (IAnnotationDeclaration a: as) {
- if(a instanceof InterceptorBindingDeclaration) {
- result.add((InterceptorBindingDeclaration)a);
- }
- }
- return result;
+ return ClassBean.getInterceptorBindingDeclarations(definition);
}
/*
* (non-Javadoc)
+ * @see org.jboss.tools.cdi.core.IInterceptorBinded#getInterceptorBindings()
+ */
+ public Set<IInterceptorBinding> getInterceptorBindings() {
+ return ClassBean.getInterceptorBindings(definition);
+ }
+
+ /*
+ * (non-Javadoc)
* @see org.jboss.tools.cdi.core.IStereotype#getNameLocation()
*/
public IAnnotation getNameLocation() {
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 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-07-01 22:27:54 UTC (rev 23162)
@@ -72,6 +72,7 @@
import org.jboss.tools.cdi.core.IStereotyped;
import org.jboss.tools.cdi.core.ITypeDeclaration;
import org.jboss.tools.cdi.core.preferences.CDIPreferences;
+import org.jboss.tools.cdi.internal.core.impl.CDIProject;
import org.jboss.tools.cdi.internal.core.impl.Parameter;
import org.jboss.tools.cdi.internal.core.impl.SessionBean;
import org.jboss.tools.common.model.util.EclipseJavaUtil;
@@ -367,7 +368,7 @@
}
private void addLinkedInterceptorBindings(String beanPath, IInterceptorBinded binded) {
- Set<IInterceptorBindingDeclaration> bindingDeclarations = binded.getInterceptorBindingDeclarations();
+ Set<IInterceptorBindingDeclaration> bindingDeclarations = CDIUtil.getAllInterceptorBindingDeclaratios(binded);
for (IInterceptorBindingDeclaration bindingDeclaration : bindingDeclarations) {
IInterceptorBinding binding = bindingDeclaration.getInterceptorBinding();
if (!binding.getSourceType().isReadOnly()) {
@@ -386,8 +387,59 @@
}
validateMixedClassBean(bean);
validateConstructors(bean);
+ validateInterceptorBindings(bean);
}
+ private void validateInterceptorBindings(IClassBean bean) {
+ /*
+ * 9.5.2. Interceptor binding types with members
+ * - the set of interceptor bindings of a bean or interceptor, including bindings
+ * inherited from stereotypes and other interceptor bindings, has two instances
+ * of a certain interceptor binding type and the instances have different values
+ * of some annotation member
+ */
+ try {
+ if(hasConflictedInterceptorBindings(bean)) {
+ ITextSourceReference reference = CDIUtil.convertToSourceReference(bean.getBeanClass().getNameRange());
+ addError(CDIValidationMessages.CONFLICTING_INTERCEPTOR_BINDINGS, CDIPreferences.CONFLICTING_INTERCEPTOR_BINDINGS, reference, bean.getResource());
+ }
+ Set<IBeanMethod> methods = bean.getAllMethods();
+ for (IBeanMethod method : methods) {
+ if(hasConflictedInterceptorBindings(method)) {
+ ITextSourceReference reference = CDIUtil.convertToSourceReference(method.getMethod().getNameRange());
+ addError(CDIValidationMessages.CONFLICTING_INTERCEPTOR_BINDINGS, CDIPreferences.CONFLICTING_INTERCEPTOR_BINDINGS, reference, bean.getResource());
+ }
+ }
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ } catch (CoreException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ }
+
+ private boolean hasConflictedInterceptorBindings(IInterceptorBinded binded) throws CoreException {
+ Set<IInterceptorBindingDeclaration> declarations = CDIUtil.getAllInterceptorBindingDeclaratios(binded);
+ if(declarations.size()>1) {
+ Map<String, String> keys = new HashMap<String, String>();
+ for (IInterceptorBindingDeclaration declaration : declarations) {
+ IType type = declaration.getInterceptorBinding().getSourceType();
+ if(type!=null) {
+ String name = type.getFullyQualifiedName();
+ String key = CDIProject.getAnnotationDeclarationKey(declaration);
+ String anotherKey = keys.get(name);
+ if(anotherKey!=null) {
+ if(!anotherKey.equals(key)) {
+ return true;
+ }
+ } else {
+ keys.put(name, key);
+ }
+ }
+ }
+ }
+ return false;
+ }
+
private void validateSpecializingBean(IBean bean) {
/*
* 4.3.1. Direct and indirect specialization
@@ -414,7 +466,6 @@
String beanName = bean instanceof IBeanMethod?beanClassName + "." + ((IBeanMethod)bean).getSourceMember().getElementName() + "()":beanClassName;
String specializingBeanClassName = specializingBean.getBeanClass().getElementName();
String specializingBeanName = specializingBean instanceof IBeanMethod?specializingBeanClassName + "." + ((IBeanMethod)specializingBean).getSourceMember().getElementName() + "()":specializingBeanClassName;
-
/*
* 4.3.1. Direct and indirect specialization
* - X specializes Y but does not have some bean type of Y
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-07-01 22:27:54 UTC (rev 23162)
@@ -163,16 +163,15 @@
that is defined @Target({TYPE, METHOD})
- interceptor declared using @Interceptor does not declare any interceptor binding (Non-Portable behavior)
-
-
-
-
9.3. Binding an interceptor to a bean
- managed bean has a class level interceptor binding and is declared final
or has a non-static, non-private, final method
- non-static, non-private, final method of a managed bean has a method level
interceptor binding
+
+
+
9.5.2. Interceptor binding types with members
- the set of interceptor bindings of a bean or interceptor, including bindings
inherited from stereotypes and other interceptor bindings, has two instances
@@ -181,6 +180,8 @@
- array-valued or annotation-valued member of an interceptor binding type
is not annotated @Nonbinding (Non-Portable behavior)
+
+
10.4.2. Declaring an observer method
- method has more than one parameter annotated @Observes
- observer method is annotated @Produces or @Inject or has a parameter annotated @Disposes
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-07-01 22:27:54 UTC (rev 23162)
@@ -72,7 +72,7 @@
ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING=Interceptor for lifecycle callbacks may only declare interceptor binding types that are defined as @Target(TYPE) [JSR-299 �9.2]
ILLEGAL_INTERCEPTOR_BINDING_CLASS=The bean class of a managed bean that declares an interceptor binding must not be declared final [JSR-299 �9.3]
ILLEGAL_INTERCEPTOR_BINDING_METHOD=A non-static, non-private method of a bean class of a managed bean that declares an interceptor binding must not be declared final [JSR-299 �9.3]
-CONFLICTING_INTERCEPTOR_BINDINGS=The set of interceptor bindings of a bean or interceptor, including bindings inherited from stereotypes and other interceptor bindings, has two instances of a certain interceptor binding type and the instances have different values of some annotation member
+CONFLICTING_INTERCEPTOR_BINDINGS=The set of interceptor bindings of a bean or interceptor, including bindings inherited from stereotypes and other interceptor bindings, has two instances of a certain interceptor binding type and the instances have different values of some annotation member [JSR-299 �9.5.2]
OBSERVER_IN_DECORATOR=Interceptor cannot have a method with a parameter annotated @Observes [JSR-299 �10.4.2]
OBSERVER_IN_INTERCEPTOR=Decorator cannot have a method with a parameter annotated @Observes [JSR-299 �10.4.2]
INTERCEPTOR_IS_ALTERNATIVE=Interceptor is an alternative
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-07-01 22:27:54 UTC (rev 23162)
@@ -114,7 +114,7 @@
{CDIPreferences.DELEGATE_HAS_ILLEGAL_TYPE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_delegateHasIllegalType_label},
{CDIPreferences.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalLifecycleCallbackInterceptorBinding_label},
{CDIPreferences.ILLEGAL_INTERCEPTOR_BINDING_METHOD, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalInterceptorBindingMethod_label},
-// {CDIPreferences.CONFLICTING_INTERCEPTOR_BINDINGS, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_conflictingInterceptorBindings_label},
+ {CDIPreferences.CONFLICTING_INTERCEPTOR_BINDINGS, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_conflictingInterceptorBindings_label},
{CDIPreferences.OBSERVER_IN_INTERCEPTOR_OR_DECORATOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_observerInInterceptorOrDecorator_label},
{CDIPreferences.INTERCEPTOR_OR_DECORATOR_IS_ALTERNATIVE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_interceptorOrDecoratorIsAlternative_label},
{CDIPreferences.MISSING_INTERCEPTOR_BINDING, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingInterceptorBinding_label},
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java 2010-07-01 22:27:54 UTC (rev 23162)
@@ -363,7 +363,7 @@
assertTrue(bean.getResource().getFullPath() + " bean (qualifiers - " + allTypes.toString() + ") should have the qualifier with " + typeName + " type.", found);
Set<IQualifierDeclaration> declarations = bean.getQualifierDeclarations(true);
for (IQualifierDeclaration d : declarations) {
- if(CDIProject.getQualifierDeclarationKey(d).equals(CDIProject.getQualifierDeclarationKey(declaration)) ) {
+ if(CDIProject.getAnnotationDeclarationKey(d).equals(CDIProject.getAnnotationDeclarationKey(declaration)) ) {
return;
}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-07-01 20:29:24 UTC (rev 23161)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-07-01 22:27:54 UTC (rev 23162)
@@ -1275,6 +1275,20 @@
}
/**
+ * 9.5.2. Interceptor binding types with members
+ * - the set of interceptor bindings of a bean or interceptor, including bindings
+ * inherited from stereotypes and other interceptor bindings, has two instances
+ * of a certain interceptor binding type and the instances have different values
+ * of some annotation member
+ *
+ * @throws Exception
+ */
+ public void testInterceptorBindingsWithConflictingAnnotationMembersNotOk() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/interceptors/definition/broken/invalidBindingAnnotations/Foo.java");
+ assertMarkerIsCreated(file, CDIValidationMessages.CONFLICTING_INTERCEPTOR_BINDINGS, 19, 20);
+ }
+
+ /**
* 10.4.2. Declaring an observer method
* - method has more than one parameter annotated @Observes
*
14 years, 6 months
JBoss Tools SVN: r23161 - workspace/dgolovin/experimental-build.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-01 16:29:24 -0400 (Thu, 01 Jul 2010)
New Revision: 23161
Modified:
workspace/dgolovin/experimental-build/dgolovin-pom.xml
Log:
enable tests in experimental pom for fixed components
Modified: workspace/dgolovin/experimental-build/dgolovin-pom.xml
===================================================================
--- workspace/dgolovin/experimental-build/dgolovin-pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
+++ workspace/dgolovin/experimental-build/dgolovin-pom.xml 2010-07-01 20:29:24 UTC (rev 23161)
@@ -28,10 +28,10 @@
<module>profiler</module>
<module>smooks</module>
<module>cdi</module>
- <!-- module>birt</module>
+ <module>birt</module>
<module>bpel</module>
<module>esb</module>
- <module>seam</module>
+ <!-- module>seam</module>
<module>examples</module>
<module>maven</module>
<module>tptp</module>
14 years, 6 months
JBoss Tools SVN: r23160 - in trunk/bpel: features and 19 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-01 16:27:01 -0400 (Thu, 01 Jul 2010)
New Revision: 23160
Modified:
trunk/bpel/features/org.jboss.tools.bpel.feature/pom.xml
trunk/bpel/features/org.jboss.tools.bpel.tests.feature/pom.xml
trunk/bpel/features/pom.xml
trunk/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.model/pom.xml
trunk/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui/pom.xml
trunk/bpel/plugins/org.eclipse.bpel.common.model/pom.xml
trunk/bpel/plugins/org.eclipse.bpel.common.ui/pom.xml
trunk/bpel/plugins/org.eclipse.bpel.model/pom.xml
trunk/bpel/plugins/org.eclipse.bpel.ui/pom.xml
trunk/bpel/plugins/org.eclipse.bpel.validator/pom.xml
trunk/bpel/plugins/org.eclipse.bpel.wsil.model/pom.xml
trunk/bpel/plugins/org.eclipse.bpel.xpath10/pom.xml
trunk/bpel/plugins/org.jboss.tools.bpel.cheatsheet/pom.xml
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/pom.xml
trunk/bpel/plugins/pom.xml
trunk/bpel/pom.xml
trunk/bpel/site/pom.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/pom.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF/MANIFEST.MF
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/pom.xml
trunk/bpel/tests/pom.xml
Log:
1. maven repo structure aligned to svn repo for bpel component
2. test coverage enabled
Modified: trunk/bpel/features/org.jboss.tools.bpel.feature/pom.xml
===================================================================
--- trunk/bpel/features/org.jboss.tools.bpel.feature/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/features/org.jboss.tools.bpel.feature/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.bpel.features</groupId>
<artifactId>org.jboss.tools.bpel.feature</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
Modified: trunk/bpel/features/org.jboss.tools.bpel.tests.feature/pom.xml
===================================================================
--- trunk/bpel/features/org.jboss.tools.bpel.tests.feature/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/features/org.jboss.tools.bpel.tests.feature/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.bpel.features</groupId>
<artifactId>org.jboss.tools.bpel.tests.feature</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
Modified: trunk/bpel/features/pom.xml
===================================================================
--- trunk/bpel/features/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/features/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>bpel.features</artifactId>
+ <groupId>org.jboss.tools.bpel</groupId>
+ <artifactId>features</artifactId>
+ <name>bpel.features</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
@@ -16,4 +11,4 @@
<module>org.jboss.tools.bpel.tests.feature</module>
</modules>
</project>
-
\ No newline at end of file
+
Modified: trunk/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.model/pom.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.model/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.model/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.apache.ode.deploy.model</artifactId>
<version>0.5.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui/pom.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.ui/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.apache.ode.deploy.ui</artifactId>
<version>0.5.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/bpel/plugins/org.eclipse.bpel.common.model/pom.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.common.model/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/plugins/org.eclipse.bpel.common.model/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.common.model</artifactId>
<version>0.5.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/bpel/plugins/org.eclipse.bpel.common.ui/pom.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.common.ui/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/plugins/org.eclipse.bpel.common.ui/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.common.ui</artifactId>
<version>0.5.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/bpel/plugins/org.eclipse.bpel.model/pom.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.model/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/plugins/org.eclipse.bpel.model/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.model</artifactId>
<version>0.5.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/pom.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.ui</artifactId>
<version>0.5.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/bpel/plugins/org.eclipse.bpel.validator/pom.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.validator/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/plugins/org.eclipse.bpel.validator/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.validator</artifactId>
<version>0.5.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/bpel/plugins/org.eclipse.bpel.wsil.model/pom.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.wsil.model/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/plugins/org.eclipse.bpel.wsil.model/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.wsil.model</artifactId>
<version>0.5.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/bpel/plugins/org.eclipse.bpel.xpath10/pom.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.xpath10/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/plugins/org.eclipse.bpel.xpath10/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.bpel.plugins</groupId>
<artifactId>org.eclipse.bpel.xpath10</artifactId>
<version>0.5.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.cheatsheet/pom.xml
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.cheatsheet/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.cheatsheet/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.bpel.plugins</groupId>
<artifactId>org.jboss.tools.bpel.cheatsheet</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/pom.xml
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.bpel.plugins</groupId>
<artifactId>org.jboss.tools.bpel.runtimes</artifactId>
<version>0.4.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/bpel/plugins/pom.xml
===================================================================
--- trunk/bpel/plugins/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/plugins/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>bpel.plugins</artifactId>
+ <groupId>org.jboss.tools.bpel</groupId>
+ <artifactId>plugins</artifactId>
+ <name>bpel.plugins</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
@@ -25,4 +20,4 @@
<module>org.jboss.tools.bpel.runtimes</module>
</modules>
</project>
-
\ No newline at end of file
+
Modified: trunk/bpel/pom.xml
===================================================================
--- trunk/bpel/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
<groupId>org.jboss.tools</groupId>
- <artifactId>bpel.all</artifactId>
+ <artifactId>bpel</artifactId>
+ <name>bpel.all</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
Modified: trunk/bpel/site/pom.xml
===================================================================
--- trunk/bpel/site/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/site/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -6,8 +6,9 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>bpel.site</artifactId>
+ <groupId>org.jboss.tools.bpel</groupId>
+ <artifactId>site</artifactId>
+ <name>bpel.site</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-update-site</packaging>
</project>
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 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.bpel.tests</groupId>
<artifactId>org.jboss.tools.bpel.ui.bot.test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
Modified: trunk/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF/MANIFEST.MF 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF/MANIFEST.MF 2010-07-01 20:27:01 UTC (rev 23160)
@@ -7,7 +7,8 @@
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.junit;bundle-version="3.8.2",
- org.jboss.tools.tests
+ org.jboss.tools.tests,
+ org.eclipse.bpel.ui;bundle-version="0.5.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: JBoss by Red Hat
Modified: trunk/bpel/tests/org.jboss.tools.bpel.ui.test/pom.xml
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.test/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.test/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -7,8 +7,14 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.bpel.tests</groupId>
<artifactId>org.jboss.tools.bpel.ui.test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <emma.filter>org.eclipse.bpel*</emma.filter>
+ <emma.instrument.bundles>org.eclipse.bpel.ui,org.eclipse.bpel.common.ui,org.eclipse.bpel.common.model,org.eclipse.bpel.model</emma.instrument.bundles>
+ </properties>
+
</project>
Modified: trunk/bpel/tests/pom.xml
===================================================================
--- trunk/bpel/tests/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
+++ trunk/bpel/tests/pom.xml 2010-07-01 20:27:01 UTC (rev 23160)
@@ -1,18 +1,13 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>bpel.tests</artifactId>
+ <groupId>org.jboss.tools.bpel</groupId>
+ <artifactId>tests</artifactId>
+ <name>bpel.tests</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>org.jboss.tools.bpel.ui.test</module>
</modules>
</project>
-
\ No newline at end of file
+
14 years, 6 months
JBoss Tools SVN: r23159 - in trunk/birt: features and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-01 16:01:45 -0400 (Thu, 01 Jul 2010)
New Revision: 23159
Modified:
trunk/birt/features/org.jboss.tools.birt.feature/pom.xml
trunk/birt/features/org.jboss.tools.birt.test.feature/pom.xml
trunk/birt/features/pom.xml
trunk/birt/plugins/org.jboss.tools.birt.core/pom.xml
trunk/birt/plugins/org.jboss.tools.birt.oda.ui/pom.xml
trunk/birt/plugins/org.jboss.tools.birt.oda/pom.xml
trunk/birt/plugins/pom.xml
trunk/birt/pom.xml
trunk/birt/site/pom.xml
trunk/birt/tests/org.jboss.tools.birt.core.test/pom.xml
trunk/birt/tests/pom.xml
Log:
1. maven repo structure aligned to svn repo for birt component
2. test coverage enabled
Modified: trunk/birt/features/org.jboss.tools.birt.feature/pom.xml
===================================================================
--- trunk/birt/features/org.jboss.tools.birt.feature/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
+++ trunk/birt/features/org.jboss.tools.birt.feature/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.features</groupId>
<artifactId>org.jboss.tools.birt.feature</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
Modified: trunk/birt/features/org.jboss.tools.birt.test.feature/pom.xml
===================================================================
--- trunk/birt/features/org.jboss.tools.birt.test.feature/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
+++ trunk/birt/features/org.jboss.tools.birt.test.feature/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.birt.features</groupId>
<artifactId>org.jboss.tools.birt.test.feature</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
Modified: trunk/birt/features/pom.xml
===================================================================
--- trunk/birt/features/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
+++ trunk/birt/features/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>birt.features</artifactId>
+ <groupId>org.jboss.tools.birt</groupId>
+ <artifactId>features</artifactId>
+ <name>birt.features</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
@@ -16,4 +11,4 @@
<module>org.jboss.tools.birt.test.feature</module>
</modules>
</project>
-
\ No newline at end of file
+
Modified: trunk/birt/plugins/org.jboss.tools.birt.core/pom.xml
===================================================================
--- trunk/birt/plugins/org.jboss.tools.birt.core/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
+++ trunk/birt/plugins/org.jboss.tools.birt.core/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.birt.plugins</groupId>
<artifactId>org.jboss.tools.birt.core</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/birt/plugins/org.jboss.tools.birt.oda/pom.xml
===================================================================
--- trunk/birt/plugins/org.jboss.tools.birt.oda/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
+++ trunk/birt/plugins/org.jboss.tools.birt.oda/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.birt.plugins</groupId>
<artifactId>org.jboss.tools.birt.oda</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/birt/plugins/org.jboss.tools.birt.oda.ui/pom.xml
===================================================================
--- trunk/birt/plugins/org.jboss.tools.birt.oda.ui/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
+++ trunk/birt/plugins/org.jboss.tools.birt.oda.ui/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.birt.plugins</groupId>
<artifactId>org.jboss.tools.birt.oda.ui</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/birt/plugins/pom.xml
===================================================================
--- trunk/birt/plugins/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
+++ trunk/birt/plugins/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>birt.plugins</artifactId>
+ <groupId>org.jboss.tools.birt</groupId>
+ <artifactId>plugins</artifactId>
+ <name>birt.plugins</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
@@ -17,4 +12,4 @@
<module>org.jboss.tools.birt.oda.ui</module>
</modules>
</project>
-
\ No newline at end of file
+
Modified: trunk/birt/pom.xml
===================================================================
--- trunk/birt/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
+++ trunk/birt/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
<groupId>org.jboss.tools</groupId>
- <artifactId>birt.all</artifactId>
+ <artifactId>birt</artifactId>
+ <name>birt.all</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
Modified: trunk/birt/site/pom.xml
===================================================================
--- trunk/birt/site/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
+++ trunk/birt/site/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
@@ -6,8 +6,9 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>birt.site</artifactId>
+ <groupId>org.jboss.tools.birt</groupId>
+ <artifactId>site</artifactId>
+ <name>birt.site</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-update-site</packaging>
</project>
Modified: trunk/birt/tests/org.jboss.tools.birt.core.test/pom.xml
===================================================================
--- trunk/birt/tests/org.jboss.tools.birt.core.test/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
+++ trunk/birt/tests/org.jboss.tools.birt.core.test/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
@@ -7,8 +7,12 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.birt.tests</groupId>
<artifactId>org.jboss.tools.birt.core.test</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
+ <properties>
+ <emma.filter>org.jboss.tools.birt.core*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.birt.core</emma.instrument.bundles>
+ </properties>
</project>
Modified: trunk/birt/tests/pom.xml
===================================================================
--- trunk/birt/tests/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
+++ trunk/birt/tests/pom.xml 2010-07-01 20:01:45 UTC (rev 23159)
@@ -1,18 +1,13 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>birt.tests</artifactId>
+ <groupId>org.jboss.tools.birt</groupId>
+ <artifactId>tests</artifactId>
+ <name>birt.tests</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>org.jboss.tools.birt.core.test</module>
</modules>
</project>
-
\ No newline at end of file
+
14 years, 6 months
JBoss Tools SVN: r23158 - in trunk/cdi: features and 13 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-01 15:43:38 -0400 (Thu, 01 Jul 2010)
New Revision: 23158
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/CDITextExtTestSuite.java
Modified:
trunk/cdi/features/org.jboss.tools.cdi.feature/pom.xml
trunk/cdi/features/pom.xml
trunk/cdi/plugins/org.jboss.tools.cdi.core/pom.xml
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/pom.xml
trunk/cdi/plugins/org.jboss.tools.cdi.ui/pom.xml
trunk/cdi/plugins/org.jboss.tools.cdi.xml.ui/pom.xml
trunk/cdi/plugins/org.jboss.tools.cdi.xml/pom.xml
trunk/cdi/plugins/pom.xml
trunk/cdi/pom.xml
trunk/cdi/site/pom.xml
trunk/cdi/tests/org.jboss.tools.cdi.core.test/pom.xml
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/pom.xml
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/HyperlinkDetectorTest.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/pom.xml
trunk/cdi/tests/pom.xml
Log:
1. maven repo structure adjusted to svn repo
2. problem related to test being executed twice for hiperlink detection is fixed
3. coverage support enabled
Modified: trunk/cdi/features/org.jboss.tools.cdi.feature/pom.xml
===================================================================
--- trunk/cdi/features/org.jboss.tools.cdi.feature/pom.xml 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/features/org.jboss.tools.cdi.feature/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.cdi.features</groupId>
<artifactId>org.jboss.tools.cdi.feature</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
Modified: trunk/cdi/features/pom.xml
===================================================================
--- trunk/cdi/features/pom.xml 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/features/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
@@ -1,18 +1,13 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>cdi.features</artifactId>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>features</artifactId>
+ <name>cdi.features</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>org.jboss.tools.cdi.feature</module>
</modules>
</project>
-
\ No newline at end of file
+
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/pom.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/pom.xml 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.cdi.plugins</groupId>
<artifactId>org.jboss.tools.cdi.core</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/pom.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/pom.xml 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.cdi.plugins</groupId>
<artifactId>org.jboss.tools.cdi.text.ext</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/pom.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/pom.xml 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.cdi.plugins</groupId>
<artifactId>org.jboss.tools.cdi.ui</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.xml/pom.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.xml/pom.xml 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.xml/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.cdi.plugins</groupId>
<artifactId>org.jboss.tools.cdi.xml</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.xml.ui/pom.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.xml.ui/pom.xml 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.xml.ui/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.cdi.plugins</groupId>
<artifactId>org.jboss.tools.cdi.xml.ui</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/cdi/plugins/pom.xml
===================================================================
--- trunk/cdi/plugins/pom.xml 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/plugins/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>cdi.plugins</artifactId>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>plugins</artifactId>
+ <name>cdi.plugins</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
@@ -19,4 +14,4 @@
<module>org.jboss.tools.cdi.xml.ui</module>
</modules>
</project>
-
\ No newline at end of file
+
Modified: trunk/cdi/pom.xml
===================================================================
--- trunk/cdi/pom.xml 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
<groupId>org.jboss.tools</groupId>
- <artifactId>cdi.all</artifactId>
+ <artifactId>cdi</artifactId>
+ <name>cdi.all</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
Modified: trunk/cdi/site/pom.xml
===================================================================
--- trunk/cdi/site/pom.xml 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/site/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
@@ -6,8 +6,9 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>cdi.site</artifactId>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>site</artifactId>
+ <name>cdi.site</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-update-site</packaging>
</project>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/pom.xml 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
@@ -7,10 +7,16 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.cdi.tests</groupId>
<artifactId>org.jboss.tools.cdi.core.test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <emma.filter>org.jboss.tools.cdi.core*,org.jboss.tools.cdi.internal.core*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.cdi.core</emma.instrument.bundles>
+ </properties>
+
<build>
<plugins>
<plugin>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/pom.xml 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
@@ -7,10 +7,16 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.cdi.tests</groupId>
<artifactId>org.jboss.tools.cdi.text.ext.test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <emma.filter>org.jboss.tools.cdi*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.cdi.core,org.jboss.tools.cdi.text.ext</emma.instrument.bundles>
+ </properties>
+
<build>
<plugins>
<plugin>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/CDITextExtTestSuite.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/CDITextExtTestSuite.java 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/CDITextExtTestSuite.java 2010-07-01 19:43:38 UTC (rev 23158)
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.cdi.text.ext.test;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-
-public class CDITextExtTestSuite extends TestSuite {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("CDI Text Ext Tests");
- suite.addTest(InjectedPointHyperlinkDetectorTest.suite());
- return suite;
- }
-}
\ No newline at end of file
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 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/CdiTextExtAllTests.java 2010-07-01 19:43:38 UTC (rev 23158)
@@ -13,7 +13,7 @@
JavaModelManager.getIndexManager().disable();
TestSuite suite = new TestSuite(CdiTextExtAllTests.class.getName());
- suite.addTest(new CDICoreTestSetup(CDITextExtTestSuite.suite()));
+ suite.addTest(new CDICoreTestSetup(new TestSuite(InjectedPointHyperlinkDetectorTest.class)));
return suite;
}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/HyperlinkDetectorTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/HyperlinkDetectorTest.java 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/HyperlinkDetectorTest.java 2010-07-01 19:43:38 UTC (rev 23158)
@@ -6,6 +6,7 @@
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
import org.eclipse.jdt.internal.ui.text.JavaWordFinder;
+import org.eclipse.jface.text.FindReplaceDocumentAdapter;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
@@ -55,7 +56,7 @@
}
IDocument document = documentProvider.getDocument(editorInput);
-
+
assertNotNull("The document for the file \"" + fileName + "\" is not loaded", document);
int expected = 0;
@@ -84,8 +85,10 @@
}
} else {
for(Region region : regionList){
- if(i >= region.getOffset() && i <= region.getOffset()+region.getLength())
+ if(i >= region.getOffset() && i <= region.getOffset()+region.getLength()) {
+ int line = document.getLineOfOffset(region.getOffset());
fail("Wrong detection for region - "+region.getOffset()+" : "+region.getLength()+" region - "+i);
+ }
}
}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java 2010-07-01 19:43:38 UTC (rev 23158)
@@ -12,10 +12,6 @@
public class InjectedPointHyperlinkDetectorTest extends HyperlinkDetectorTest {
- public static Test suite() {
- return new TestSuite(InjectedPointHyperlinkDetectorTest.class);
- }
-
public void testInjectedPointHyperlinkDetector() throws Exception {
ArrayList<Region> regionList = new ArrayList<Region>();
regionList.add(new Region(115, 6)); // Inject
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/pom.xml 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
@@ -7,10 +7,16 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.cdi.tests</groupId>
<artifactId>org.jboss.tools.cdi.ui.test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <emma.filter>org.jboss.tools.cdi*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.cdi.core,org.jboss.tools.cdi.ui</emma.instrument.bundles>
+ </properties>
+
<build>
<plugins>
<plugin>
Modified: trunk/cdi/tests/pom.xml
===================================================================
--- trunk/cdi/tests/pom.xml 2010-07-01 18:09:43 UTC (rev 23157)
+++ trunk/cdi/tests/pom.xml 2010-07-01 19:43:38 UTC (rev 23158)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>cdi.tests</artifactId>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>tests</artifactId>
+ <name>cdi.tests</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
@@ -17,4 +12,4 @@
<module>org.jboss.tools.cdi.ui.test</module>
</modules>
</project>
-
\ No newline at end of file
+
14 years, 6 months
JBoss Tools SVN: r23157 - in trunk/smooks/tests/org.jboss.tools.smooks.ui.test: .settings and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-01 14:09:43 -0400 (Thu, 01 Jul 2010)
New Revision: 23157
Added:
trunk/smooks/tests/org.jboss.tools.smooks.ui.test/.classpath
trunk/smooks/tests/org.jboss.tools.smooks.ui.test/.project
trunk/smooks/tests/org.jboss.tools.smooks.ui.test/.settings/
trunk/smooks/tests/org.jboss.tools.smooks.ui.test/.settings/org.eclipse.jdt.core.prefs
Log:
add eclipse project artifacts:
.classpath
.project
.settings/*.prefs
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.test/.classpath
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.test/.classpath (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.test/.classpath 2010-07-01 18:09:43 UTC (rev 23157)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry exported="true" kind="lib" path="lib/xmlunit-1.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/xstream-1.2.2.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.test/.project
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.test/.project (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.test/.project 2010-07-01 18:09:43 UTC (rev 23157)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.smooks.ui.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.test/.settings/org.eclipse.jdt.core.prefs 2010-07-01 18:09:43 UTC (rev 23157)
@@ -0,0 +1,8 @@
+#Thu Jul 01 10:05:16 PDT 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
14 years, 6 months
JBoss Tools SVN: r23156 - workspace/dgolovin/experimental-build.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-01 13:39:46 -0400 (Thu, 01 Jul 2010)
New Revision: 23156
Modified:
workspace/dgolovin/experimental-build/dgolovin-pom.xml
Log:
enable tests in experimental pom for fixed components
Modified: workspace/dgolovin/experimental-build/dgolovin-pom.xml
===================================================================
--- workspace/dgolovin/experimental-build/dgolovin-pom.xml 2010-07-01 17:35:57 UTC (rev 23155)
+++ workspace/dgolovin/experimental-build/dgolovin-pom.xml 2010-07-01 17:39:46 UTC (rev 23156)
@@ -20,15 +20,15 @@
<module>jsf</module>
<module>hibernatetools</module>
- <!-- module>portlet</module>
+ <module>portlet</module>
<module>workingset</module>
- <module>struts</module>
+ <!--module>struts</module-->
<module>profiler</module>
<module>smooks</module>
<module>cdi</module>
- <module>birt</module>
+ <!-- module>birt</module>
<module>bpel</module>
<module>esb</module>
<module>seam</module>
14 years, 6 months
JBoss Tools SVN: r23155 - in trunk/smooks: features and 17 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-01 13:35:57 -0400 (Thu, 01 Jul 2010)
New Revision: 23155
Added:
trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XMLSampleXMLFreeMarkerTemplateBuilderTest.java
trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XSDXMLFreeMarkerTemplateBuilderTest.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.test/src/org/jboss/tools/smooks/launch/serialize/ObjectSerializerTest.java
Removed:
trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XMLSample_XMLFreeMarkerTemplateBuilderTest.java
trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XSD_XMLFreeMarkerTemplateBuilderTest.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.test/src/org/jboss/tools/smooks/launch/serialize/ObjectSerializerText.java
Modified:
trunk/smooks/features/org.jboss.tools.smooks.feature/pom.xml
trunk/smooks/features/org.jboss.tools.smooks.test.feature/pom.xml
trunk/smooks/features/pom.xml
trunk/smooks/plugins/org.jboss.tools.smooks.core/pom.xml
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/pom.xml
trunk/smooks/plugins/org.jboss.tools.smooks.templating/pom.xml
trunk/smooks/plugins/org.jboss.tools.smooks.ui/pom.xml
trunk/smooks/plugins/pom.xml
trunk/smooks/pom.xml
trunk/smooks/site/pom.xml
trunk/smooks/tests/org.jboss.tools.smooks.core.test/pom.xml
trunk/smooks/tests/org.jboss.tools.smooks.templating.test/META-INF/MANIFEST.MF
trunk/smooks/tests/org.jboss.tools.smooks.templating.test/pom.xml
trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilderTest.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.test/META-INF/MANIFEST.MF
trunk/smooks/tests/org.jboss.tools.smooks.ui.test/pom.xml
trunk/smooks/tests/pom.xml
Log:
1. Smooks maven repo structure alligned to svn repo
2. Smooks templating and ui tests are enabled in build
3. Test classes namess alligned to meet java coding convention about class name, so underscore was removed everywhere
Modified: trunk/smooks/features/org.jboss.tools.smooks.feature/pom.xml
===================================================================
--- trunk/smooks/features/org.jboss.tools.smooks.feature/pom.xml 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/features/org.jboss.tools.smooks.feature/pom.xml 2010-07-01 17:35:57 UTC (rev 23155)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.smooks.features</groupId>
<artifactId>org.jboss.tools.smooks.feature</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
Modified: trunk/smooks/features/org.jboss.tools.smooks.test.feature/pom.xml
===================================================================
--- trunk/smooks/features/org.jboss.tools.smooks.test.feature/pom.xml 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/features/org.jboss.tools.smooks.test.feature/pom.xml 2010-07-01 17:35:57 UTC (rev 23155)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.smooks.features</groupId>
<artifactId>org.jboss.tools.smooks.test.feature</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
Modified: trunk/smooks/features/pom.xml
===================================================================
--- trunk/smooks/features/pom.xml 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/features/pom.xml 2010-07-01 17:35:57 UTC (rev 23155)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>smooks.features</artifactId>
+ <groupId>org.jboss.tools.smooks</groupId>
+ <artifactId>features</artifactId>
+ <name>smooks.features</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/pom.xml
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/pom.xml 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/pom.xml 2010-07-01 17:35:57 UTC (rev 23155)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.smooks.plugins</groupId>
<artifactId>org.jboss.tools.smooks.core</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/pom.xml
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.runtime/pom.xml 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.runtime/pom.xml 2010-07-01 17:35:57 UTC (rev 23155)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tool.smooks.plugins</groupId>
<artifactId>org.jboss.tools.smooks.runtime</artifactId>
<version>1.2.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/pom.xml
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/pom.xml 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/pom.xml 2010-07-01 17:35:57 UTC (rev 23155)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.smooks.plugins</groupId>
<artifactId>org.jboss.tools.smooks.templating</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/pom.xml
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/pom.xml 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/pom.xml 2010-07-01 17:35:57 UTC (rev 23155)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.smooks.plugins</groupId>
<artifactId>org.jboss.tools.smooks.ui</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/smooks/plugins/pom.xml
===================================================================
--- trunk/smooks/plugins/pom.xml 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/plugins/pom.xml 2010-07-01 17:35:57 UTC (rev 23155)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>smooks.plugins</artifactId>
+ <groupId>org.jboss.tools.smooks</groupId>
+ <artifactId>plugins</artifactId>
+ <name>smooks.plugins</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
Modified: trunk/smooks/pom.xml
===================================================================
--- trunk/smooks/pom.xml 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/pom.xml 2010-07-01 17:35:57 UTC (rev 23155)
@@ -1,21 +1,16 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
<groupId>org.jboss.tools</groupId>
<artifactId>smooks</artifactId>
+ <name>smooks.all</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>features</module>
<module>plugins</module>
<module>tests</module>
- <module>site</module>
- </modules>
+ <module>site</module>
+ </modules>
</project>
Modified: trunk/smooks/site/pom.xml
===================================================================
--- trunk/smooks/site/pom.xml 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/site/pom.xml 2010-07-01 17:35:57 UTC (rev 23155)
@@ -6,8 +6,9 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>smooks.site</artifactId>
+ <groupId>org.jboss.tools.smooks</groupId>
+ <artifactId>site</artifactId>
+ <name>smooks.site</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-update-site</packaging>
</project>
Modified: trunk/smooks/tests/org.jboss.tools.smooks.core.test/pom.xml
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.core.test/pom.xml 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/tests/org.jboss.tools.smooks.core.test/pom.xml 2010-07-01 17:35:57 UTC (rev 23155)
@@ -7,8 +7,14 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.smooks.tests</groupId>
<artifactId>org.jboss.tools.smooks.core.test</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <emma.filter>org.jboss.tools.smooks*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.smooks.core</emma.instrument.bundles>
+ </properties>
+
</project>
Modified: trunk/smooks/tests/org.jboss.tools.smooks.templating.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.templating.test/META-INF/MANIFEST.MF 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/tests/org.jboss.tools.smooks.templating.test/META-INF/MANIFEST.MF 2010-07-01 17:35:57 UTC (rev 23155)
@@ -3,8 +3,8 @@
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.jboss.tools.smooks.templating.test
Bundle-Version: 1.1.0.qualifier
-Bundle-ClassPath: lib/xmlunit-1.1.jar,
- .
+Bundle-ClassPath: .,
+ lib/xmlunit-1.1.jar
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Require-Bundle: org.junit,
Modified: trunk/smooks/tests/org.jboss.tools.smooks.templating.test/pom.xml
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.templating.test/pom.xml 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/tests/org.jboss.tools.smooks.templating.test/pom.xml 2010-07-01 17:35:57 UTC (rev 23155)
@@ -7,8 +7,13 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.smooks.tests</groupId>
<artifactId>org.jboss.tools.smooks.templating.test</artifactId>
<version>1.1.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <emma.filter>org.jboss.tools.smooks.templating*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.smooks.templating</emma.instrument.bundles>
+ </properties>
</project>
Modified: trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilderTest.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilderTest.java 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilderTest.java 2010-07-01 17:35:57 UTC (rev 23155)
@@ -35,7 +35,7 @@
*/
public class CSVFreeMarkerTemplateBuilderTest extends TestCase {
- public void test_all_fields_mapped_01() throws TemplateBuilderException, IOException, ModelBuilderException {
+ public void testAllFieldsMapped01() throws TemplateBuilderException, IOException, ModelBuilderException {
CSVModelBuilder modelBuilder = new CSVModelBuilder("firstname", "lastname", "country");
CSVFreeMarkerTemplateBuilder builder1 = new CSVFreeMarkerTemplateBuilder(modelBuilder, ',', '\"', false);
@@ -62,7 +62,7 @@
template);
}
- public void test_all_fields_mapped_01_includingFieldNames() throws TemplateBuilderException, IOException, ModelBuilderException {
+ public void testAllFieldsMapped01IncludingFieldNames() throws TemplateBuilderException, IOException, ModelBuilderException {
CSVModelBuilder modelBuilder = new CSVModelBuilder("firstname", "lastname", "country");
CSVFreeMarkerTemplateBuilder builder1 = new CSVFreeMarkerTemplateBuilder(modelBuilder, ',', '\"', true);
@@ -95,7 +95,7 @@
* Same as test above accept it uses different delimiters.
* @throws ModelBuilderException
*/
- public void test_all_fields_mapped_02() throws TemplateBuilderException, IOException, ModelBuilderException {
+ public void testAllFieldsMapped02() throws TemplateBuilderException, IOException, ModelBuilderException {
CSVModelBuilder modelBuilder = new CSVModelBuilder("firstname", "lastname", "country");
CSVFreeMarkerTemplateBuilder builder1 = new CSVFreeMarkerTemplateBuilder(modelBuilder, '|', '\'', false);
@@ -120,7 +120,7 @@
template);
}
- public void test_all_fields_not_mapped() throws TemplateBuilderException, ModelBuilderException {
+ public void testAllFieldsNotMapped() throws TemplateBuilderException, ModelBuilderException {
CSVModelBuilder modelBuilder = new CSVModelBuilder("firstname", "lastname", "country");
CSVFreeMarkerTemplateBuilder builder;
@@ -153,7 +153,7 @@
}
}
- public void test_collection_not_mapped_01() throws TemplateBuilderException, ModelBuilderException {
+ public void testCollectionNotMapped01() throws TemplateBuilderException, ModelBuilderException {
CSVModelBuilder modelBuilder = new CSVModelBuilder("firstname", "lastname", "country");
CSVFreeMarkerTemplateBuilder builder;
@@ -169,7 +169,7 @@
}
}
- public void test_collection_not_mapped_02() throws TemplateBuilderException, ModelBuilderException {
+ public void testCollectionNotMapped02() throws TemplateBuilderException, ModelBuilderException {
CSVModelBuilder modelBuilder = new CSVModelBuilder("firstname", "lastname", "country");
CSVFreeMarkerTemplateBuilder builder;
Copied: trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XMLSampleXMLFreeMarkerTemplateBuilderTest.java (from rev 22821, trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XMLSample_XMLFreeMarkerTemplateBuilderTest.java)
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XMLSampleXMLFreeMarkerTemplateBuilderTest.java (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XMLSampleXMLFreeMarkerTemplateBuilderTest.java 2010-07-01 17:35:57 UTC (rev 23155)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.tools.smooks.templating.template.xml;
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPathExpressionException;
+
+import junit.framework.TestCase;
+
+import org.jboss.tools.smooks.templating.model.ModelBuilderException;
+import org.jboss.tools.smooks.templating.template.TemplateBuilder;
+import org.jboss.tools.smooks.templating.template.TestUtil;
+import org.jboss.tools.smooks.templating.template.exception.TemplateBuilderException;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.xml.sax.SAXException;
+
+/**
+ * @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
+ */
+public class XMLSampleXMLFreeMarkerTemplateBuilderTest extends TestCase {
+
+ public void testXMLOrder01() throws IOException, ParserConfigurationException, TemplateBuilderException, SAXException, ModelBuilderException, XPathExpressionException {
+ TemplateBuilder builder = TestUtil.createXMLSampleFreeMarkerTemplateBuilder(new File("src/org/jboss/tools/smooks/templating/template/xml/order-status-01.xml"));
+
+ Node identNode = builder.getModelNode("ns0:OrderStatusResult/ns0:OrderStatusResultHeader/ns0:BuyerParty/ns1:PartyID/ns1:Ident");
+ builder.addValueMapping("order.status.id", identNode);
+
+ String theTemplate = builder.buildTemplate();
+
+// System.out.println(theTemplate);
+ TestUtil.assertXMLEquals(theTemplate, "expected/order-status-expected-01.xml", getClass());
+
+ // Now, test that we can parse the template ....
+ XMLFreeMarkerTemplateBuilder builder2 = new XMLFreeMarkerTemplateBuilder(builder.getModelBuilder(), theTemplate);
+ assertEquals(theTemplate, builder2.buildTemplate());
+ }
+
+ public void testXMLOrder02() throws IOException, ParserConfigurationException, TemplateBuilderException, SAXException, ModelBuilderException, XPathExpressionException {
+ TemplateBuilder builder = TestUtil.createXMLSampleFreeMarkerTemplateBuilder(new File("src/org/jboss/tools/smooks/templating/template/xml/order-status-01.xml"));
+
+ Node identNode = builder.getModelNode("ns0:OrderStatusResult/ns0:OrderStatusResultHeader/ns0:BuyerParty/ns1:PartyID/ns1:Ident");
+ Element resultStatusCollectionNode = (Element) builder.getModelNode("ns0:OrderStatusResult/ns0:ListOfOrderStatusResultDetail/ns0:OrderStatusResultDetail");
+ Node buyerRefNumberNode = builder.getModelNode("ns0:OrderStatusResult/ns0:ListOfOrderStatusResultDetail/ns0:OrderStatusResultDetail/ns0:OrderStatusResultReference/ns0:BuyerReferenceNumber");
+
+ builder.addValueMapping("order.status.id", identNode);
+ builder.addCollectionMapping("order.orderItemsStatusList", resultStatusCollectionNode, "itemStatus");
+ builder.addValueMapping("itemStatus.buyerRefNumber", buyerRefNumberNode);
+
+ String theTemplate = builder.buildTemplate();
+
+// System.out.println(theTemplate);
+ TestUtil.assertEquals(theTemplate, "expected/order-status-expected-02.xml", getClass());
+
+ // Now, test that we can parse the template ....
+ XMLFreeMarkerTemplateBuilder builder2 = new XMLFreeMarkerTemplateBuilder(builder.getModelBuilder(), theTemplate);
+ assertEquals(theTemplate, builder2.buildTemplate());
+ }
+}
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XMLSampleXMLFreeMarkerTemplateBuilderTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XMLSample_XMLFreeMarkerTemplateBuilderTest.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XMLSample_XMLFreeMarkerTemplateBuilderTest.java 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XMLSample_XMLFreeMarkerTemplateBuilderTest.java 2010-07-01 17:35:57 UTC (rev 23155)
@@ -1,79 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006, JBoss Inc.
- */
-package org.jboss.tools.smooks.templating.template.xml;
-
-import java.io.File;
-import java.io.IOException;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPathExpressionException;
-
-import junit.framework.TestCase;
-
-import org.jboss.tools.smooks.templating.model.ModelBuilderException;
-import org.jboss.tools.smooks.templating.template.TemplateBuilder;
-import org.jboss.tools.smooks.templating.template.TestUtil;
-import org.jboss.tools.smooks.templating.template.exception.TemplateBuilderException;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
-
-/**
- * @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
- */
-public class XMLSample_XMLFreeMarkerTemplateBuilderTest extends TestCase {
-
- public void test_XML_Order_01() throws IOException, ParserConfigurationException, TemplateBuilderException, SAXException, ModelBuilderException, XPathExpressionException {
- TemplateBuilder builder = TestUtil.createXMLSampleFreeMarkerTemplateBuilder(new File("src/org/jboss/tools/smooks/templating/template/xml/order-status-01.xml"));
-
- Node identNode = builder.getModelNode("ns0:OrderStatusResult/ns0:OrderStatusResultHeader/ns0:BuyerParty/ns1:PartyID/ns1:Ident");
- builder.addValueMapping("order.status.id", identNode);
-
- String theTemplate = builder.buildTemplate();
-
-// System.out.println(theTemplate);
- TestUtil.assertXMLEquals(theTemplate, "expected/order-status-expected-01.xml", getClass());
-
- // Now, test that we can parse the template ....
- XMLFreeMarkerTemplateBuilder builder2 = new XMLFreeMarkerTemplateBuilder(builder.getModelBuilder(), theTemplate);
- assertEquals(theTemplate, builder2.buildTemplate());
- }
-
- public void test_XML_Order_02() throws IOException, ParserConfigurationException, TemplateBuilderException, SAXException, ModelBuilderException, XPathExpressionException {
- TemplateBuilder builder = TestUtil.createXMLSampleFreeMarkerTemplateBuilder(new File("src/org/jboss/tools/smooks/templating/template/xml/order-status-01.xml"));
-
- Node identNode = builder.getModelNode("ns0:OrderStatusResult/ns0:OrderStatusResultHeader/ns0:BuyerParty/ns1:PartyID/ns1:Ident");
- Element resultStatusCollectionNode = (Element) builder.getModelNode("ns0:OrderStatusResult/ns0:ListOfOrderStatusResultDetail/ns0:OrderStatusResultDetail");
- Node buyerRefNumberNode = builder.getModelNode("ns0:OrderStatusResult/ns0:ListOfOrderStatusResultDetail/ns0:OrderStatusResultDetail/ns0:OrderStatusResultReference/ns0:BuyerReferenceNumber");
-
- builder.addValueMapping("order.status.id", identNode);
- builder.addCollectionMapping("order.orderItemsStatusList", resultStatusCollectionNode, "itemStatus");
- builder.addValueMapping("itemStatus.buyerRefNumber", buyerRefNumberNode);
-
- String theTemplate = builder.buildTemplate();
-
-// System.out.println(theTemplate);
- TestUtil.assertEquals(theTemplate, "expected/order-status-expected-02.xml", getClass());
-
- // Now, test that we can parse the template ....
- XMLFreeMarkerTemplateBuilder builder2 = new XMLFreeMarkerTemplateBuilder(builder.getModelBuilder(), theTemplate);
- assertEquals(theTemplate, builder2.buildTemplate());
- }
-}
Copied: trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XSDXMLFreeMarkerTemplateBuilderTest.java (from rev 22821, trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XSD_XMLFreeMarkerTemplateBuilderTest.java)
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XSDXMLFreeMarkerTemplateBuilderTest.java (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XSDXMLFreeMarkerTemplateBuilderTest.java 2010-07-01 17:35:57 UTC (rev 23155)
@@ -0,0 +1,263 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.tools.smooks.templating.template.xml;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPathExpressionException;
+
+import junit.framework.TestCase;
+
+import org.eclipse.emf.common.util.URI;
+import org.jboss.tools.smooks.templating.model.ModelBuilderException;
+import org.jboss.tools.smooks.templating.model.xml.XSDModelBuilder;
+import org.jboss.tools.smooks.templating.template.Mapping;
+import org.jboss.tools.smooks.templating.template.TemplateBuilder;
+import org.jboss.tools.smooks.templating.template.TestUtil;
+import org.jboss.tools.smooks.templating.template.exception.TemplateBuilderException;
+import org.jboss.tools.smooks.templating.template.exception.UnmappedCollectionNodeException;
+import org.milyn.util.FreeMarkerTemplate;
+import org.milyn.xml.XmlUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+/**
+ * @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
+ */
+public class XSDXMLFreeMarkerTemplateBuilderTest extends TestCase {
+
+ public void testSimplePerson01() throws IOException, ParserConfigurationException, TemplateBuilderException,
+ SAXException, ModelBuilderException {
+ TemplateBuilder builder = TestUtil.createXSDFreeMarkerTemplateBuilder(new File(
+ "src/org/jboss/tools/smooks/templating/template/xml/simple-person.xsd"), "person");
+ String theTemplate = builder.buildTemplate();
+
+ TestUtil.assertXMLEquals(theTemplate, "expected/simple-person-01.xml", getClass());
+
+ // Now, test that we can parse the template ....
+ XMLFreeMarkerTemplateBuilder builder2 = new XMLFreeMarkerTemplateBuilder(builder.getModelBuilder(), theTemplate);
+ assertEquals(theTemplate, builder2.buildTemplate());
+ }
+
+ public void testSimplePerson02() throws IOException, ParserConfigurationException, TemplateBuilderException,
+ SAXException, ModelBuilderException, XPathExpressionException {
+ TemplateBuilder builder = TestUtil.createXSDFreeMarkerTemplateBuilder(new File(
+ "src/org/jboss/tools/smooks/templating/template/xml/simple-person.xsd"), "person");
+
+ builder.addValueMapping("male", builder.getModelNode("ns0:person/name/smk:compositor/male"));
+ builder.addValueMapping("firstName", builder.getModelNode("ns0:person/name/@first"));
+ builder.addValueMapping("lastName", builder.getModelNode("ns0:person/name/@last"));
+ builder.addValueMapping("address", builder.getModelNode("ns0:person/address"));
+ builder.addValueMapping("age", builder.getModelNode("ns0:person/age"));
+
+ Map javaCtx = createPersonObj("Tom", "Fennelly", "Ireland", 21);
+ String template = builder.buildTemplate();
+ // System.out.println(template);
+ FreeMarkerTemplate freemarker = new FreeMarkerTemplate(template);
+ String templateRes = freemarker.apply(javaCtx);
+
+ TestUtil.assertXMLEquals(templateRes, "expected/simple-person-02.xml", getClass());
+ TestUtil.validate(builder, templateRes);
+
+ // Now, test that we can parse the template and extract the mappings
+ // from it....
+ XMLFreeMarkerTemplateBuilder builder2 = new XMLFreeMarkerTemplateBuilder(builder.getModelBuilder(), template);
+ assertEquals(5, builder2.getMappings().size());
+ assertEquals(template, builder2.buildTemplate());
+ }
+
+ public void testPeople01() throws IOException, ParserConfigurationException, TemplateBuilderException,
+ SAXException, ModelBuilderException, XPathExpressionException {
+ TemplateBuilder builder = TestUtil.createXSDFreeMarkerTemplateBuilder(new File(
+ "src/org/jboss/tools/smooks/templating/template/xml/people.xsd"), "people");
+
+ // Try adding a value mapping before adding the collection mapping.
+ // Should get an exception...
+ try {
+ builder.addValueMapping("personObj.firtName", builder.getModelNode("ns0:people/person/name/@first"));
+ fail("Expected UnmappedCollectionNodeException");
+ } catch (UnmappedCollectionNodeException e) {
+ assertEquals("Unmapped collection node 'person'.", e.getMessage());
+ }
+ }
+
+ public void testPeople02() throws IOException, ParserConfigurationException, TemplateBuilderException,
+ SAXException, ModelBuilderException, XPathExpressionException {
+ TemplateBuilder builder = TestUtil.createXSDFreeMarkerTemplateBuilder(new File(
+ "src/org/jboss/tools/smooks/templating/template/xml/people.xsd"), "people");
+
+ builder.addCollectionMapping("people", (Element) builder.getModelNode("ns0:people/person"), "personObj");
+ builder.addValueMapping("personObj.male", builder.getModelNode("ns0:people/person/name/smk:compositor/male"));
+ builder.addValueMapping("personObj.firstName", builder.getModelNode("ns0:people/person/name/@first"));
+ builder.addValueMapping("personObj.lastName", builder.getModelNode("ns0:people/person/name/@last"));
+ builder.addValueMapping("personObj.address", builder.getModelNode("ns0:people/person/address"));
+ builder.addValueMapping("personObj.age", builder.getModelNode("ns0:people/person/age"));
+
+ assertEquals(6, builder.getMappings().size());
+
+ Map javaCtx = new HashMap();
+ List people = new ArrayList();
+ people.add(createPersonObj("Tom", "Fennelly", "Ireland", 6));
+ people.add(createPersonObj("Mike", "Fennelly", "Ireland", 5));
+ javaCtx.put("people", people);
+
+ String template = builder.buildTemplate();
+
+ FreeMarkerTemplate freemarker = new FreeMarkerTemplate(template);
+ String templateRes = freemarker.apply(javaCtx);
+
+ TestUtil.assertXMLEquals(templateRes, "expected/people-01.xml", getClass());
+
+ // Now, test that we can parse the template and extract the mappings
+ // from it....
+ XMLFreeMarkerTemplateBuilder builder2 = new XMLFreeMarkerTemplateBuilder(builder.getModelBuilder(), template);
+ assertEquals(6, builder2.getMappings().size());
+ assertEquals(template, builder2.buildTemplate());
+ }
+
+ public void testElementName() throws IOException, ModelBuilderException {
+ File xsdFile = new File("src/org/jboss/tools/smooks/templating/template/xml/smooks1_0.xsd");
+ URI uri = URI.createFileURI(xsdFile.getCanonicalFile().toString());
+ XSDModelBuilder builder = new XSDModelBuilder(uri);
+ builder.setRootElementName("smooks-resource-list");
+ XMLFreeMarkerTemplateBuilder templateBuilder = new XMLFreeMarkerTemplateBuilder(builder);
+ Document document = templateBuilder.getModel();
+
+ StringWriter writer = new StringWriter();
+ XmlUtil.serialize(document, true, writer);
+ System.out.println(writer);
+ //checkNodeName(document.getDocumentElement());
+ }
+
+ public void testCreature01() throws IOException, ParserConfigurationException, TemplateBuilderException,
+ SAXException, ModelBuilderException, XPathExpressionException {
+ TemplateBuilder builder = TestUtil.createXSDFreeMarkerTemplateBuilder(new File(
+ "src/org/jboss/tools/smooks/templating/template/xml/creature.xsd"), "creature");
+
+ Mapping mapping = builder.addValueMapping("dog", builder.getModelNode("ns0:creature/smk:compositor/dog/@name"));
+
+ // The mapping onto the <dog> node should result in the <person> and
+ // <cat> nodes being hidden...
+ assertEquals(2, mapping.getHideNodes().size());
+ assertEquals(builder.getModelNode("ns0:creature/smk:compositor/person"), mapping.getHideNodes().get(0));
+ assertEquals(builder.getModelNode("ns0:creature/smk:compositor/cat"), mapping.getHideNodes().get(1));
+
+ String theTemplate = builder.buildTemplate();
+ TestUtil.assertXMLEquals(theTemplate, "expected/creature-01.xml", getClass());
+ TestUtil.validate(builder, theTemplate);
+
+ // Now, test that we can parse the template and extract the mappings
+ // from it....
+ XMLFreeMarkerTemplateBuilder builder2 = new XMLFreeMarkerTemplateBuilder(builder.getModelBuilder(), theTemplate);
+ assertEquals(theTemplate, builder2.buildTemplate());
+
+ // ========================================================
+
+ // Remove the <dog> mapping... should reshow the <person> and <cat>
+ // nodes...
+ List<Node> showNodes = builder.removeMapping(mapping);
+ assertEquals(2, showNodes.size());
+ assertEquals(builder.getModelNode("ns0:creature/smk:compositor/person"), showNodes.get(0));
+ assertEquals(builder.getModelNode("ns0:creature/smk:compositor/cat"), showNodes.get(1));
+
+ mapping = builder.addValueMapping("cat", builder.getModelNode("ns0:creature/smk:compositor/cat"));
+
+ // The mapping onto the <cat> node should result in the <person> and
+ // <dog> nodes being hidden...
+ assertEquals(2, mapping.getHideNodes().size());
+ assertEquals(builder.getModelNode("ns0:creature/smk:compositor/dog"), mapping.getHideNodes().get(0));
+ assertEquals(builder.getModelNode("ns0:creature/smk:compositor/person"), mapping.getHideNodes().get(1));
+
+ theTemplate = builder.buildTemplate();
+ TestUtil.assertXMLEquals(theTemplate, "expected/creature-02.xml", getClass());
+ TestUtil.validate(builder, theTemplate);
+
+ // Now, test that we can parse the template and extract the mappings
+ // from it....
+ builder2 = new XMLFreeMarkerTemplateBuilder(builder.getModelBuilder(), theTemplate);
+ assertEquals(theTemplate, builder2.buildTemplate());
+
+ // ========================================================
+
+ // Remove the <cat> mapping... should reshow the <person> and <dog>
+ // nodes...
+ showNodes = builder.removeMapping(mapping);
+ assertEquals(2, showNodes.size());
+ assertEquals(builder.getModelNode("ns0:creature/smk:compositor/dog"), showNodes.get(0));
+ assertEquals(builder.getModelNode("ns0:creature/smk:compositor/person"), showNodes.get(1));
+
+ // Map the person... there are nested choice compositors on this one...
+ mapping = builder.addValueMapping("male", builder
+ .getModelNode("ns0:creature/smk:compositor/person/name/smk:compositor/male"));
+ builder.addValueMapping("firstName", builder.getModelNode("ns0:creature/smk:compositor/person/name/@first"));
+ builder.addValueMapping("lastName", builder.getModelNode("ns0:creature/smk:compositor/person/name/@last"));
+ builder.addValueMapping("address", builder.getModelNode("ns0:creature/smk:compositor/person/address"));
+ builder.addValueMapping("age", builder.getModelNode("ns0:creature/smk:compositor/person/age"));
+
+ // The mapping onto the <person> node should result in the <female>,
+ // <dog> and <cat> nodes being hidden...
+ assertEquals(3, mapping.getHideNodes().size());
+ assertEquals(builder.getModelNode("ns0:creature/smk:compositor/person/name/smk:compositor/female"), mapping
+ .getHideNodes().get(0));
+ assertEquals(builder.getModelNode("ns0:creature/smk:compositor/dog"), mapping.getHideNodes().get(1));
+ assertEquals(builder.getModelNode("ns0:creature/smk:compositor/cat"), mapping.getHideNodes().get(2));
+
+ theTemplate = builder.buildTemplate();
+ TestUtil.assertXMLEquals(theTemplate, "expected/creature-03.xml", getClass());
+
+ // Now, test that we can parse the template and extract the mappings
+ // from it....
+ builder2 = new XMLFreeMarkerTemplateBuilder(builder.getModelBuilder(), theTemplate);
+ assertEquals(theTemplate, builder2.buildTemplate());
+ }
+
+ public void testOrderStatusRequest() throws IOException, ParserConfigurationException, ModelBuilderException, SAXException, TemplateBuilderException {
+ TemplateBuilder builder = TestUtil.createXSDFreeMarkerTemplateBuilder(new
+ File("resources/xcbl40/schema/org/xcbl/path_delim/schemas/xcbl/v4_0/ordermanagement/v1_0/ordermanagement.xsd"), "OrderStatusResult");
+ String theTemplate = builder.buildTemplate();
+
+ System.out.println(theTemplate);
+ TestUtil.assertXMLEquals(theTemplate, "expected/order-status-01.xml", getClass());
+ }
+
+ private Map createPersonObj(String first, String last, String address, int age) {
+ Map javaCtx = new HashMap();
+ javaCtx.put("male", true);
+ javaCtx.put("firstName", first);
+ javaCtx.put("lastName", last);
+ javaCtx.put("address", address);
+ javaCtx.put("age", age);
+ return javaCtx;
+ }
+
+ private void printModel(TemplateBuilder builder) {
+ System.out.println(XmlUtil.serialize(builder.getModel(), true));
+ }
+}
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XSDXMLFreeMarkerTemplateBuilderTest.java
___________________________________________________________________
Name: svn:executable
+ *
Deleted: trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XSD_XMLFreeMarkerTemplateBuilderTest.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XSD_XMLFreeMarkerTemplateBuilderTest.java 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/tests/org.jboss.tools.smooks.templating.test/src/org/jboss/tools/smooks/templating/template/xml/XSD_XMLFreeMarkerTemplateBuilderTest.java 2010-07-01 17:35:57 UTC (rev 23155)
@@ -1,263 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006, JBoss Inc.
- */
-package org.jboss.tools.smooks.templating.template.xml;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPathExpressionException;
-
-import junit.framework.TestCase;
-
-import org.eclipse.emf.common.util.URI;
-import org.jboss.tools.smooks.templating.model.ModelBuilderException;
-import org.jboss.tools.smooks.templating.model.xml.XSDModelBuilder;
-import org.jboss.tools.smooks.templating.template.Mapping;
-import org.jboss.tools.smooks.templating.template.TemplateBuilder;
-import org.jboss.tools.smooks.templating.template.TestUtil;
-import org.jboss.tools.smooks.templating.template.exception.TemplateBuilderException;
-import org.jboss.tools.smooks.templating.template.exception.UnmappedCollectionNodeException;
-import org.milyn.util.FreeMarkerTemplate;
-import org.milyn.xml.XmlUtil;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-/**
- * @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
- */
-public class XSD_XMLFreeMarkerTemplateBuilderTest extends TestCase {
-
- public void test_SimplePerson_01() throws IOException, ParserConfigurationException, TemplateBuilderException,
- SAXException, ModelBuilderException {
- TemplateBuilder builder = TestUtil.createXSDFreeMarkerTemplateBuilder(new File(
- "src/org/jboss/tools/smooks/templating/template/xml/simple-person.xsd"), "person");
- String theTemplate = builder.buildTemplate();
-
- TestUtil.assertXMLEquals(theTemplate, "expected/simple-person-01.xml", getClass());
-
- // Now, test that we can parse the template ....
- XMLFreeMarkerTemplateBuilder builder2 = new XMLFreeMarkerTemplateBuilder(builder.getModelBuilder(), theTemplate);
- assertEquals(theTemplate, builder2.buildTemplate());
- }
-
- public void test_SimplePerson_02() throws IOException, ParserConfigurationException, TemplateBuilderException,
- SAXException, ModelBuilderException, XPathExpressionException {
- TemplateBuilder builder = TestUtil.createXSDFreeMarkerTemplateBuilder(new File(
- "src/org/jboss/tools/smooks/templating/template/xml/simple-person.xsd"), "person");
-
- builder.addValueMapping("male", builder.getModelNode("ns0:person/name/smk:compositor/male"));
- builder.addValueMapping("firstName", builder.getModelNode("ns0:person/name/@first"));
- builder.addValueMapping("lastName", builder.getModelNode("ns0:person/name/@last"));
- builder.addValueMapping("address", builder.getModelNode("ns0:person/address"));
- builder.addValueMapping("age", builder.getModelNode("ns0:person/age"));
-
- Map javaCtx = createPersonObj("Tom", "Fennelly", "Ireland", 21);
- String template = builder.buildTemplate();
- // System.out.println(template);
- FreeMarkerTemplate freemarker = new FreeMarkerTemplate(template);
- String templateRes = freemarker.apply(javaCtx);
-
- TestUtil.assertXMLEquals(templateRes, "expected/simple-person-02.xml", getClass());
- TestUtil.validate(builder, templateRes);
-
- // Now, test that we can parse the template and extract the mappings
- // from it....
- XMLFreeMarkerTemplateBuilder builder2 = new XMLFreeMarkerTemplateBuilder(builder.getModelBuilder(), template);
- assertEquals(5, builder2.getMappings().size());
- assertEquals(template, builder2.buildTemplate());
- }
-
- public void test_people_01() throws IOException, ParserConfigurationException, TemplateBuilderException,
- SAXException, ModelBuilderException, XPathExpressionException {
- TemplateBuilder builder = TestUtil.createXSDFreeMarkerTemplateBuilder(new File(
- "src/org/jboss/tools/smooks/templating/template/xml/people.xsd"), "people");
-
- // Try adding a value mapping before adding the collection mapping.
- // Should get an exception...
- try {
- builder.addValueMapping("personObj.firtName", builder.getModelNode("ns0:people/person/name/@first"));
- fail("Expected UnmappedCollectionNodeException");
- } catch (UnmappedCollectionNodeException e) {
- assertEquals("Unmapped collection node 'person'.", e.getMessage());
- }
- }
-
- public void test_people_02() throws IOException, ParserConfigurationException, TemplateBuilderException,
- SAXException, ModelBuilderException, XPathExpressionException {
- TemplateBuilder builder = TestUtil.createXSDFreeMarkerTemplateBuilder(new File(
- "src/org/jboss/tools/smooks/templating/template/xml/people.xsd"), "people");
-
- builder.addCollectionMapping("people", (Element) builder.getModelNode("ns0:people/person"), "personObj");
- builder.addValueMapping("personObj.male", builder.getModelNode("ns0:people/person/name/smk:compositor/male"));
- builder.addValueMapping("personObj.firstName", builder.getModelNode("ns0:people/person/name/@first"));
- builder.addValueMapping("personObj.lastName", builder.getModelNode("ns0:people/person/name/@last"));
- builder.addValueMapping("personObj.address", builder.getModelNode("ns0:people/person/address"));
- builder.addValueMapping("personObj.age", builder.getModelNode("ns0:people/person/age"));
-
- assertEquals(6, builder.getMappings().size());
-
- Map javaCtx = new HashMap();
- List people = new ArrayList();
- people.add(createPersonObj("Tom", "Fennelly", "Ireland", 6));
- people.add(createPersonObj("Mike", "Fennelly", "Ireland", 5));
- javaCtx.put("people", people);
-
- String template = builder.buildTemplate();
-
- FreeMarkerTemplate freemarker = new FreeMarkerTemplate(template);
- String templateRes = freemarker.apply(javaCtx);
-
- TestUtil.assertXMLEquals(templateRes, "expected/people-01.xml", getClass());
-
- // Now, test that we can parse the template and extract the mappings
- // from it....
- XMLFreeMarkerTemplateBuilder builder2 = new XMLFreeMarkerTemplateBuilder(builder.getModelBuilder(), template);
- assertEquals(6, builder2.getMappings().size());
- assertEquals(template, builder2.buildTemplate());
- }
-
- public void test_elementname() throws IOException, ModelBuilderException {
- File xsdFile = new File("src/org/jboss/tools/smooks/templating/template/xml/smooks1_0.xsd");
- URI uri = URI.createFileURI(xsdFile.getCanonicalFile().toString());
- XSDModelBuilder builder = new XSDModelBuilder(uri);
- builder.setRootElementName("smooks-resource-list");
- XMLFreeMarkerTemplateBuilder templateBuilder = new XMLFreeMarkerTemplateBuilder(builder);
- Document document = templateBuilder.getModel();
-
- StringWriter writer = new StringWriter();
- XmlUtil.serialize(document, true, writer);
- System.out.println(writer);
- //checkNodeName(document.getDocumentElement());
- }
-
- public void test_creature_01() throws IOException, ParserConfigurationException, TemplateBuilderException,
- SAXException, ModelBuilderException, XPathExpressionException {
- TemplateBuilder builder = TestUtil.createXSDFreeMarkerTemplateBuilder(new File(
- "src/org/jboss/tools/smooks/templating/template/xml/creature.xsd"), "creature");
-
- Mapping mapping = builder.addValueMapping("dog", builder.getModelNode("ns0:creature/smk:compositor/dog/@name"));
-
- // The mapping onto the <dog> node should result in the <person> and
- // <cat> nodes being hidden...
- assertEquals(2, mapping.getHideNodes().size());
- assertEquals(builder.getModelNode("ns0:creature/smk:compositor/person"), mapping.getHideNodes().get(0));
- assertEquals(builder.getModelNode("ns0:creature/smk:compositor/cat"), mapping.getHideNodes().get(1));
-
- String theTemplate = builder.buildTemplate();
- TestUtil.assertXMLEquals(theTemplate, "expected/creature-01.xml", getClass());
- TestUtil.validate(builder, theTemplate);
-
- // Now, test that we can parse the template and extract the mappings
- // from it....
- XMLFreeMarkerTemplateBuilder builder2 = new XMLFreeMarkerTemplateBuilder(builder.getModelBuilder(), theTemplate);
- assertEquals(theTemplate, builder2.buildTemplate());
-
- // ========================================================
-
- // Remove the <dog> mapping... should reshow the <person> and <cat>
- // nodes...
- List<Node> showNodes = builder.removeMapping(mapping);
- assertEquals(2, showNodes.size());
- assertEquals(builder.getModelNode("ns0:creature/smk:compositor/person"), showNodes.get(0));
- assertEquals(builder.getModelNode("ns0:creature/smk:compositor/cat"), showNodes.get(1));
-
- mapping = builder.addValueMapping("cat", builder.getModelNode("ns0:creature/smk:compositor/cat"));
-
- // The mapping onto the <cat> node should result in the <person> and
- // <dog> nodes being hidden...
- assertEquals(2, mapping.getHideNodes().size());
- assertEquals(builder.getModelNode("ns0:creature/smk:compositor/dog"), mapping.getHideNodes().get(0));
- assertEquals(builder.getModelNode("ns0:creature/smk:compositor/person"), mapping.getHideNodes().get(1));
-
- theTemplate = builder.buildTemplate();
- TestUtil.assertXMLEquals(theTemplate, "expected/creature-02.xml", getClass());
- TestUtil.validate(builder, theTemplate);
-
- // Now, test that we can parse the template and extract the mappings
- // from it....
- builder2 = new XMLFreeMarkerTemplateBuilder(builder.getModelBuilder(), theTemplate);
- assertEquals(theTemplate, builder2.buildTemplate());
-
- // ========================================================
-
- // Remove the <cat> mapping... should reshow the <person> and <dog>
- // nodes...
- showNodes = builder.removeMapping(mapping);
- assertEquals(2, showNodes.size());
- assertEquals(builder.getModelNode("ns0:creature/smk:compositor/dog"), showNodes.get(0));
- assertEquals(builder.getModelNode("ns0:creature/smk:compositor/person"), showNodes.get(1));
-
- // Map the person... there are nested choice compositors on this one...
- mapping = builder.addValueMapping("male", builder
- .getModelNode("ns0:creature/smk:compositor/person/name/smk:compositor/male"));
- builder.addValueMapping("firstName", builder.getModelNode("ns0:creature/smk:compositor/person/name/@first"));
- builder.addValueMapping("lastName", builder.getModelNode("ns0:creature/smk:compositor/person/name/@last"));
- builder.addValueMapping("address", builder.getModelNode("ns0:creature/smk:compositor/person/address"));
- builder.addValueMapping("age", builder.getModelNode("ns0:creature/smk:compositor/person/age"));
-
- // The mapping onto the <person> node should result in the <female>,
- // <dog> and <cat> nodes being hidden...
- assertEquals(3, mapping.getHideNodes().size());
- assertEquals(builder.getModelNode("ns0:creature/smk:compositor/person/name/smk:compositor/female"), mapping
- .getHideNodes().get(0));
- assertEquals(builder.getModelNode("ns0:creature/smk:compositor/dog"), mapping.getHideNodes().get(1));
- assertEquals(builder.getModelNode("ns0:creature/smk:compositor/cat"), mapping.getHideNodes().get(2));
-
- theTemplate = builder.buildTemplate();
- TestUtil.assertXMLEquals(theTemplate, "expected/creature-03.xml", getClass());
-
- // Now, test that we can parse the template and extract the mappings
- // from it....
- builder2 = new XMLFreeMarkerTemplateBuilder(builder.getModelBuilder(), theTemplate);
- assertEquals(theTemplate, builder2.buildTemplate());
- }
-
- public void test_OrderStatusRequest() throws IOException, ParserConfigurationException, ModelBuilderException, SAXException, TemplateBuilderException {
- TemplateBuilder builder = TestUtil.createXSDFreeMarkerTemplateBuilder(new
- File("resources/xcbl40/schema/org/xcbl/path_delim/schemas/xcbl/v4_0/ordermanagement/v1_0/ordermanagement.xsd"), "OrderStatusResult");
- String theTemplate = builder.buildTemplate();
-
- System.out.println(theTemplate);
- TestUtil.assertXMLEquals(theTemplate, "expected/order-status-01.xml", getClass());
- }
-
- private Map createPersonObj(String first, String last, String address, int age) {
- Map javaCtx = new HashMap();
- javaCtx.put("male", true);
- javaCtx.put("firstName", first);
- javaCtx.put("lastName", last);
- javaCtx.put("address", address);
- javaCtx.put("age", age);
- return javaCtx;
- }
-
- private void printModel(TemplateBuilder builder) {
- System.out.println(XmlUtil.serialize(builder.getModel(), true));
- }
-}
Modified: trunk/smooks/tests/org.jboss.tools.smooks.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.test/META-INF/MANIFEST.MF 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.test/META-INF/MANIFEST.MF 2010-07-01 17:35:57 UTC (rev 23155)
@@ -3,8 +3,8 @@
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.jboss.tools.smooks.ui.test
Bundle-Version: 1.1.0.qualifier
-Bundle-ClassPath: lib/xmlunit-1.1.jar,
- .,
+Bundle-ClassPath: .,
+ lib/xmlunit-1.1.jar,
lib/xstream-1.2.2.jar
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Modified: trunk/smooks/tests/org.jboss.tools.smooks.ui.test/pom.xml
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.test/pom.xml 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.test/pom.xml 2010-07-01 17:35:57 UTC (rev 23155)
@@ -7,8 +7,27 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.smooks.tests</groupId>
<artifactId>org.jboss.tools.smooks.ui.test</artifactId>
<version>1.1.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <emma.filter>org.jboss.tools.smooks.*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.smooks.ui,org.jboss.tools.smooks.core</emma.instrument.bundles>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-test-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>org/jboss/tools/smooks/launch/serialize/ObjectSerializerTest.class</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
Copied: trunk/smooks/tests/org.jboss.tools.smooks.ui.test/src/org/jboss/tools/smooks/launch/serialize/ObjectSerializerTest.java (from rev 22821, trunk/smooks/tests/org.jboss.tools.smooks.ui.test/src/org/jboss/tools/smooks/launch/serialize/ObjectSerializerText.java)
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.test/src/org/jboss/tools/smooks/launch/serialize/ObjectSerializerTest.java (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.test/src/org/jboss/tools/smooks/launch/serialize/ObjectSerializerTest.java 2010-07-01 17:35:57 UTC (rev 23155)
@@ -0,0 +1,68 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.launch.serialize;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.milyn.payload.JavaResult;
+import org.xml.sax.SAXException;
+
+import junit.framework.TestCase;
+
+/**
+ *
+ *
+ * @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
+ */
+public class ObjectSerializerTest extends TestCase {
+
+ public void test() throws IOException, SAXException {
+ Map<String, Object> beanContext = new HashMap<String, Object>();
+ Order order = new Order();
+ List<OrderItem> items = order.getOrderItems();
+
+ beanContext.put("order", order);
+ beanContext.put("header", order.getHeader());
+ beanContext.put("orderItems", items);
+
+ items.add(new OrderItem().setProductId(55126).setQuantity(6).setPrice(65.98));
+ items.add(new OrderItem().setProductId(23423).setQuantity(3).setPrice(8.42));
+ items.add(new OrderItem().setProductId(45645).setQuantity(7).setPrice(999.00));
+
+ beanContext.put("orderItem", items.get(items.size() - 1));
+
+ JavaResult javaResult = new JavaResult(beanContext);
+
+ Collection<ObjectSerializer> rootBeans = ObjectSerializer.serialize(javaResult);
+
+ // ObjectSerializer should work out that there's just 1 root
+ // bean i.e. the "order" bean...
+ assertEquals(1, rootBeans.size());
+ for(ObjectSerializer serializer : rootBeans) {
+ //System.out.println(serializer.getSerializedForm());
+ TestUtil.assertEquals(serializer.getSerializedForm(), "expected-01.txt", getClass());
+ assertEquals("[header, orderItems, orderItem]", serializer.getReferencedBeans().toString());
+ }
+ }
+}
Deleted: trunk/smooks/tests/org.jboss.tools.smooks.ui.test/src/org/jboss/tools/smooks/launch/serialize/ObjectSerializerText.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.test/src/org/jboss/tools/smooks/launch/serialize/ObjectSerializerText.java 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.test/src/org/jboss/tools/smooks/launch/serialize/ObjectSerializerText.java 2010-07-01 17:35:57 UTC (rev 23155)
@@ -1,68 +0,0 @@
-/**
- * JBoss, Home of Professional Open Source
- * Copyright 2009, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2009, JBoss Inc.
- */
-package org.jboss.tools.smooks.launch.serialize;
-
-import java.io.IOException;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.milyn.payload.JavaResult;
-import org.xml.sax.SAXException;
-
-import junit.framework.TestCase;
-
-/**
- *
- *
- * @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
- */
-public class ObjectSerializerText extends TestCase {
-
- public void test() throws IOException, SAXException {
- Map<String, Object> beanContext = new HashMap<String, Object>();
- Order order = new Order();
- List<OrderItem> items = order.getOrderItems();
-
- beanContext.put("order", order);
- beanContext.put("header", order.getHeader());
- beanContext.put("orderItems", items);
-
- items.add(new OrderItem().setProductId(55126).setQuantity(6).setPrice(65.98));
- items.add(new OrderItem().setProductId(23423).setQuantity(3).setPrice(8.42));
- items.add(new OrderItem().setProductId(45645).setQuantity(7).setPrice(999.00));
-
- beanContext.put("orderItem", items.get(items.size() - 1));
-
- JavaResult javaResult = new JavaResult(beanContext);
-
- Collection<ObjectSerializer> rootBeans = ObjectSerializer.serialize(javaResult);
-
- // ObjectSerializer should work out that there's just 1 root
- // bean i.e. the "order" bean...
- assertEquals(1, rootBeans.size());
- for(ObjectSerializer serializer : rootBeans) {
- //System.out.println(serializer.getSerializedForm());
- TestUtil.assertEquals(serializer.getSerializedForm(), "expected-01.txt", getClass());
- assertEquals("[header, orderItems, orderItem]", serializer.getReferencedBeans().toString());
- }
- }
-}
Modified: trunk/smooks/tests/pom.xml
===================================================================
--- trunk/smooks/tests/pom.xml 2010-07-01 17:25:35 UTC (rev 23154)
+++ trunk/smooks/tests/pom.xml 2010-07-01 17:35:57 UTC (rev 23155)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>smooks.tests</artifactId>
+ <groupId>org.jboss.tools.smooks</groupId>
+ <artifactId>tests</artifactId>
+ <name>smooks.tests</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
14 years, 6 months
JBoss Tools SVN: r23154 - in trunk/cdi: plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-07-01 13:25:35 -0400 (Thu, 01 Jul 2010)
New Revision: 23154
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinded.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassLevelInterceptorBindingOk.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassLevelInterceptorBindingWithFinalMethodBroken.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassWithMethodLevelInterceptorBindingOk.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassWithMethodLevelInterceptorBindingWithFinalMethodBroken.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/FinalClassWithClassLevelInterceptorBindingBroken.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/FinalClassWithMethodLevelInterceptorBindingBroken.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/InterceptorMethodStereotype.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanMethod.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMethod.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/BeanMemberDefinition.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/MethodDefinition.java
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/CDIValidationMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708 Added new validation rules:
- managed bean has a class level interceptor binding and is declared final
or has a non-static, non-private, final method
- non-static, non-private, final method of a managed bean has a method level
interceptor binding
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanMethod.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanMethod.java 2010-07-01 16:43:40 UTC (rev 23153)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanMethod.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -19,7 +19,7 @@
*
* @author Alexey Kazakov
*/
-public interface IBeanMethod extends IBeanMember {
+public interface IBeanMethod extends IBeanMember, IStereotyped, IInterceptorBinded {
/**
* Returns the method.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java 2010-07-01 16:43:40 UTC (rev 23153)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -17,7 +17,7 @@
*
* @author Alexey Kazakov
*/
-public interface IClassBean extends IBean {
+public interface IClassBean extends IBean, IInterceptorBinded {
/**
* Returns a set of producers that are declared in this bean class.
@@ -48,22 +48,6 @@
Set<IBeanMethod> getAllMethods();
/**
- * Obtains the interceptor binding declarations of the class bean.
- * This set includes bindings declared in this java class.
- * Use getInterceptorBindings() to get all bindings (i.g. from Stereotypes)
- *
- * @return the set of interceptor binding declarations
- */
- Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations();
-
- /**
- * Obtains the interceptor bindings of the bean.
- *
- * @return the set of interceptor bindings
- */
- Set<IInterceptorBinding> getInterceptorBindings();
-
- /**
* Returns a set of observer methods of the bean.
*
* @return a set of observer methods of the bean
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinded.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinded.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinded.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core;
+
+import java.util.Set;
+
+/**
+ * Represents an element which can have interceptor bindings.
+ *
+ * @author Alexey Kazakov
+ */
+public interface IInterceptorBinded {
+
+ /**
+ * Obtains the interceptor binding declarations of the class bean or the method of a class bean.
+ * This set includes bindings declared in this java class/method.
+ * Use getInterceptorBindings() to get all bindings (i.g. from Stereotypes)
+ *
+ * @return the set of interceptor binding declarations
+ */
+ Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations();
+
+ /**
+ * Obtains the interceptor bindings of the bean class or the method of a class bean.
+ *
+ * @return the set of interceptor bindings
+ */
+ Set<IInterceptorBinding> getInterceptorBindings();
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinded.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMethod.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMethod.java 2010-07-01 16:43:40 UTC (rev 23153)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/BeanMethod.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -12,11 +12,14 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.Set;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMethod;
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.IBeanMethod;
+import org.jboss.tools.cdi.core.IInterceptorBinding;
+import org.jboss.tools.cdi.core.IInterceptorBindingDeclaration;
import org.jboss.tools.cdi.core.IParameter;
import org.jboss.tools.cdi.internal.core.impl.definition.MethodDefinition;
import org.jboss.tools.cdi.internal.core.impl.definition.ParameterDefinition;
@@ -69,6 +72,7 @@
return parameters;
}
+ @Override
public MethodDefinition getDefinition() {
return (MethodDefinition)definition;
}
@@ -94,4 +98,20 @@
public boolean isLifeCycleCallbackMethod() {
return definition.getAnnotation(CDIConstants.PRE_DESTROY_TYPE_NAME)!=null || definition.getAnnotation(CDIConstants.POST_CONSTRUCTOR_TYPE_NAME)!=null;
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.cdi.core.IInterceptorBinded#getInterceptorBindingDeclarations()
+ */
+ public Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations() {
+ return ClassBean.getInterceptorBindingDeclarations(definition);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.cdi.core.IInterceptorBinded#getInterceptorBindings()
+ */
+ public Set<IInterceptorBinding> getInterceptorBindings() {
+ return ClassBean.getInterceptorBindings(definition);
+ }
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2010-07-01 16:43:40 UTC (rev 23153)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -40,6 +40,7 @@
import org.jboss.tools.cdi.core.IStereotype;
import org.jboss.tools.cdi.core.IStereotypeDeclaration;
import org.jboss.tools.cdi.core.ITypeDeclaration;
+import org.jboss.tools.cdi.internal.core.impl.definition.AbstractMemberDefinition;
import org.jboss.tools.cdi.internal.core.impl.definition.FieldDefinition;
import org.jboss.tools.cdi.internal.core.impl.definition.MethodDefinition;
import org.jboss.tools.cdi.internal.core.impl.definition.TypeDefinition;
@@ -179,6 +180,10 @@
* @see org.jboss.tools.cdi.core.IClassBean#getInterceptorBindingDeclarations()
*/
public Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations() {
+ return getInterceptorBindingDeclarations(definition);
+ }
+
+ public static Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations(AbstractMemberDefinition definition) {
Set<IInterceptorBindingDeclaration> result = new HashSet<IInterceptorBindingDeclaration>();
List<IAnnotationDeclaration> as = definition.getAnnotations();
for (IAnnotationDeclaration a: as) {
@@ -189,20 +194,24 @@
return result;
}
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.cdi.core.IClassBean#getInterceptorBindings()
- */
- public Set<IInterceptorBinding> getInterceptorBindings() {
+ public static Set<IInterceptorBinding> getInterceptorBindings(AbstractMemberDefinition definition) {
// TODO collect bindings from stereotypes. See https://jira.jboss.org/browse/JBIDE-6550
Set<IInterceptorBinding> result = new HashSet<IInterceptorBinding>();
- Set<IInterceptorBindingDeclaration> declarations = getInterceptorBindingDeclarations();
+ Set<IInterceptorBindingDeclaration> declarations = getInterceptorBindingDeclarations(definition);
for (IInterceptorBindingDeclaration declaration: declarations) {
result.add(declaration.getInterceptorBinding());
}
return result;
}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.cdi.core.IClassBean#getInterceptorBindings()
+ */
+ public Set<IInterceptorBinding> getInterceptorBindings() {
+ return getInterceptorBindings(definition);
+ }
+
public Set<IBeanMethod> getObserverMethods() {
Set<IBeanMethod> result = new HashSet<IBeanMethod>();
for (BeanMethod m: methods) {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/BeanMemberDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/BeanMemberDefinition.java 2010-07-01 16:43:40 UTC (rev 23153)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/BeanMemberDefinition.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -28,21 +28,13 @@
}
public boolean isCDIAnnotated() {
- return getInjectAnnotation() != null || getProducesAnnotation() != null || getPreDestroyMethod() != null || getPostConstructorMethod() != null;
+ return getInjectAnnotation() != null || getProducesAnnotation() != null;
}
public AnnotationDeclaration getProducesAnnotation() {
return annotationsByType.get(CDIConstants.PRODUCES_ANNOTATION_TYPE_NAME);
}
- public AnnotationDeclaration getPreDestroyMethod() {
- return annotationsByType.get(CDIConstants.PRE_DESTROY_TYPE_NAME);
- }
-
- public AnnotationDeclaration getPostConstructorMethod() {
- return annotationsByType.get(CDIConstants.POST_CONSTRUCTOR_TYPE_NAME);
- }
-
public AnnotationDeclaration getInjectAnnotation() {
return annotationsByType.get(CDIConstants.INJECT_ANNOTATION_TYPE_NAME);
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/MethodDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/MethodDefinition.java 2010-07-01 16:43:40 UTC (rev 23153)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/MethodDefinition.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -12,13 +12,16 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.Set;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.ISourceRange;
import org.eclipse.jdt.core.IType;
import org.jboss.tools.cdi.core.CDIConstants;
-import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.IInterceptorBinding;
+import org.jboss.tools.cdi.internal.core.impl.AnnotationDeclaration;
+import org.jboss.tools.cdi.internal.core.impl.ClassBean;
import org.jboss.tools.cdi.internal.core.impl.ParametedType;
import org.jboss.tools.common.model.project.ext.impl.ValueInfo;
import org.jboss.tools.common.model.util.EclipseJavaUtil;
@@ -54,7 +57,6 @@
isConstructor = method.isConstructor();
//TODO process parameters for disposers and observers
loadParamDefinitions(contextType, context);
-
}
public boolean parametersAreInjectionPoints() {
@@ -130,13 +132,17 @@
start += params[i].length() + 1;
}
-
}
+ @Override
public boolean isCDIAnnotated() {
- return super.isCDIAnnotated() || isDisposer() || isObserver();
+ return super.isCDIAnnotated() || isDisposer() || isObserver() || getPreDestroyMethod() != null || getPostConstructorMethod() != null || !getInterceptorBindings().isEmpty();
}
+ public Set<IInterceptorBinding> getInterceptorBindings() {
+ return ClassBean.getInterceptorBindings(this);
+ }
+
public List<ParameterDefinition> getParameters() {
return parameters;
}
@@ -155,6 +161,14 @@
return false;
}
+ public AnnotationDeclaration getPreDestroyMethod() {
+ return annotationsByType.get(CDIConstants.PRE_DESTROY_TYPE_NAME);
+ }
+
+ public AnnotationDeclaration getPostConstructorMethod() {
+ return annotationsByType.get(CDIConstants.POST_CONSTRUCTOR_TYPE_NAME);
+ }
+
static String[] getParams(String paramsString) {
List<String> result = new ArrayList<String>();
int i = 0;
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 2010-07-01 16:43:40 UTC (rev 23153)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -54,6 +54,7 @@
import org.jboss.tools.cdi.core.IInjectionPointMethod;
import org.jboss.tools.cdi.core.IInjectionPointParameter;
import org.jboss.tools.cdi.core.IInterceptor;
+import org.jboss.tools.cdi.core.IInterceptorBinded;
import org.jboss.tools.cdi.core.IInterceptorBinding;
import org.jboss.tools.cdi.core.IInterceptorBindingDeclaration;
import org.jboss.tools.cdi.core.IParametedType;
@@ -68,6 +69,7 @@
import org.jboss.tools.cdi.core.ISessionBean;
import org.jboss.tools.cdi.core.IStereotype;
import org.jboss.tools.cdi.core.IStereotypeDeclaration;
+import org.jboss.tools.cdi.core.IStereotyped;
import org.jboss.tools.cdi.core.ITypeDeclaration;
import org.jboss.tools.cdi.core.preferences.CDIPreferences;
import org.jboss.tools.cdi.internal.core.impl.Parameter;
@@ -310,13 +312,7 @@
validationContext.addLinkedCoreResource(beanPath, scope.getResource().getFullPath(), false);
}
}
- Set<IStereotypeDeclaration> stereotypeDeclarations = bean.getStereotypeDeclarations();
- for (IStereotypeDeclaration stereotypeDeclaration : stereotypeDeclarations) {
- IStereotype stereotype = stereotypeDeclaration.getStereotype();
- if (!stereotype.getSourceType().isReadOnly()) {
- validationContext.addLinkedCoreResource(beanPath, stereotype.getResource().getFullPath(), false);
- }
- }
+ addLinkedStereotypes(beanPath, bean);
Set<IQualifierDeclaration> qualifierDeclarations = bean.getQualifierDeclarations();
for (IQualifierDeclaration qualifierDeclaration : qualifierDeclarations) {
IQualifier qualifier = qualifierDeclaration.getQualifier();
@@ -347,20 +343,39 @@
}
if (bean instanceof IClassBean) {
- Set<IInterceptorBindingDeclaration> bindingDeclarations = ((IClassBean) bean).getInterceptorBindingDeclarations();
- for (IInterceptorBindingDeclaration bindingDeclaration : bindingDeclarations) {
- IInterceptorBinding binding = bindingDeclaration.getInterceptorBinding();
- if (!binding.getSourceType().isReadOnly()) {
- validationContext.addLinkedCoreResource(beanPath, binding.getResource().getFullPath(), false);
- }
+ IClassBean classBean = (IClassBean)bean;
+ addLinkedInterceptorBindings(beanPath, classBean);
+ Set<IBeanMethod> methods = classBean.getAllMethods();
+ for (IBeanMethod method : methods) {
+ addLinkedStereotypes(beanPath, method);
+ addLinkedInterceptorBindings(beanPath, method);
}
-
- validateClassBean((IClassBean) bean);
+ validateClassBean(classBean);
}
validateSpecializingBean(bean);
}
+ private void addLinkedStereotypes(String beanPath, IStereotyped stereotyped) {
+ Set<IStereotypeDeclaration> stereotypeDeclarations = stereotyped.getStereotypeDeclarations();
+ for (IStereotypeDeclaration stereotypeDeclaration : stereotypeDeclarations) {
+ IStereotype stereotype = stereotypeDeclaration.getStereotype();
+ if (!stereotype.getSourceType().isReadOnly()) {
+ validationContext.addLinkedCoreResource(beanPath, stereotype.getResource().getFullPath(), false);
+ }
+ }
+ }
+
+ private void addLinkedInterceptorBindings(String beanPath, IInterceptorBinded binded) {
+ Set<IInterceptorBindingDeclaration> bindingDeclarations = binded.getInterceptorBindingDeclarations();
+ for (IInterceptorBindingDeclaration bindingDeclaration : bindingDeclarations) {
+ IInterceptorBinding binding = bindingDeclaration.getInterceptorBinding();
+ if (!binding.getSourceType().isReadOnly()) {
+ validationContext.addLinkedCoreResource(beanPath, binding.getResource().getFullPath(), false);
+ }
+ }
+ }
+
private void validateClassBean(IClassBean bean) {
validateDisposers(bean);
validateObserves(bean);
@@ -1221,6 +1236,48 @@
CDICorePlugin.getDefault().logError(e);
}
}
+ /*
+ * 9.3. Binding an interceptor to a bean
+ * - managed bean has a class level interceptor binding and is declared final or has a non-static, non-private, final method
+ * - non-static, non-private, final method of a managed bean has a method level interceptor binding
+ */
+ try {
+ Set<IInterceptorBinding> bindings = bean.getInterceptorBindings();
+ if(!bindings.isEmpty()) {
+ if(Flags.isFinal(bean.getBeanClass().getFlags())) {
+ ITextSourceReference reference = CDIUtil.convertToSourceReference(bean.getBeanClass().getNameRange());
+ addError(CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS, CDIPreferences.ILLEGAL_INTERCEPTOR_BINDING_METHOD, reference, bean.getResource());
+ } else {
+ IMethod[] methods = bean.getBeanClass().getMethods();
+ for (int i = 0; i < methods.length; i++) {
+ int flags = methods[i].getFlags();
+ if(Flags.isFinal(flags) && !Flags.isStatic(flags) && !Flags.isPrivate(flags)) {
+ ITextSourceReference reference = CDIUtil.convertToSourceReference(methods[i].getNameRange());
+ addError(CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD, CDIPreferences.ILLEGAL_INTERCEPTOR_BINDING_METHOD, reference, bean.getResource());
+ }
+ }
+ }
+ } else {
+ Set<IBeanMethod> beanMethods = bean.getAllMethods();
+ for (IBeanMethod method : beanMethods) {
+ if(!method.getInterceptorBindings().isEmpty()) {
+ if(Flags.isFinal(bean.getBeanClass().getFlags())) {
+ ITextSourceReference reference = CDIUtil.convertToSourceReference(bean.getBeanClass().getNameRange());
+ addError(CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS, CDIPreferences.ILLEGAL_INTERCEPTOR_BINDING_METHOD, reference, bean.getResource());
+ } else {
+ IMethod sourceMethod = method.getMethod();
+ int flags = sourceMethod.getFlags();
+ if(Flags.isFinal(flags) && !Flags.isStatic(flags) && !Flags.isPrivate(flags)) {
+ ITextSourceReference reference = CDIUtil.convertToSourceReference(sourceMethod.getNameRange());
+ addError(CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD, CDIPreferences.ILLEGAL_INTERCEPTOR_BINDING_METHOD, reference, bean.getResource());
+ }
+ }
+ }
+ }
+ }
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
}
private void validateInterceptor(IInterceptor interceptor) {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2010-07-01 16:43:40 UTC (rev 23153)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -91,6 +91,7 @@
public static String ILLEGAL_BEAN_DECLARING_DELEGATE;
public static String DELEGATE_HAS_ILLEGAL_TYPE;
public static String ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING;
+ public static String ILLEGAL_INTERCEPTOR_BINDING_CLASS;
public static String ILLEGAL_INTERCEPTOR_BINDING_METHOD;
public static String CONFLICTING_INTERCEPTOR_BINDINGS;
public static String OBSERVER_IN_INTERCEPTOR;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-07-01 16:43:40 UTC (rev 23153)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-07-01 17:25:35 UTC (rev 23154)
@@ -70,7 +70,8 @@
ILLEGAL_BEAN_DECLARING_DELEGATE=Bean class that is not a decorator cannot have an injection point annotated @Delegate [JSR-299 �8.1.2]
DELEGATE_HAS_ILLEGAL_TYPE=The delegate type must implement or extend the decorated type {0} [JSR-299 �8.1.3]
ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING=Interceptor for lifecycle callbacks may only declare interceptor binding types that are defined as @Target(TYPE) [JSR-299 �9.2]
-ILLEGAL_INTERCEPTOR_BINDING_METHOD=Non-static, non-private, final method of a managed bean has a interceptor binding (either method level, or declaring class level)
+ILLEGAL_INTERCEPTOR_BINDING_CLASS=The bean class of a managed bean that declares an interceptor binding must not be declared final [JSR-299 �9.3]
+ILLEGAL_INTERCEPTOR_BINDING_METHOD=A non-static, non-private method of a bean class of a managed bean that declares an interceptor binding must not be declared final [JSR-299 �9.3]
CONFLICTING_INTERCEPTOR_BINDINGS=The set of interceptor bindings of a bean or interceptor, including bindings inherited from stereotypes and other interceptor bindings, has two instances of a certain interceptor binding type and the instances have different values of some annotation member
OBSERVER_IN_DECORATOR=Interceptor cannot have a method with a parameter annotated @Observes [JSR-299 �10.4.2]
OBSERVER_IN_INTERCEPTOR=Decorator cannot have a method with a parameter annotated @Observes [JSR-299 �10.4.2]
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-07-01 16:43:40 UTC (rev 23153)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -113,7 +113,7 @@
{CDIPreferences.ILLEGAL_BEAN_DECLARING_DELEGATE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalBeanDeclaringDelegate_label},
{CDIPreferences.DELEGATE_HAS_ILLEGAL_TYPE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_delegateHasIllegalType_label},
{CDIPreferences.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalLifecycleCallbackInterceptorBinding_label},
-// {CDIPreferences.ILLEGAL_INTERCEPTOR_BINDING_METHOD, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalInterceptorBindingMethod_label},
+ {CDIPreferences.ILLEGAL_INTERCEPTOR_BINDING_METHOD, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalInterceptorBindingMethod_label},
// {CDIPreferences.CONFLICTING_INTERCEPTOR_BINDINGS, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_conflictingInterceptorBindings_label},
{CDIPreferences.OBSERVER_IN_INTERCEPTOR_OR_DECORATOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_observerInInterceptorOrDecorator_label},
{CDIPreferences.INTERCEPTOR_OR_DECORATOR_IS_ALTERNATIVE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_interceptorOrDecoratorIsAlternative_label},
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassLevelInterceptorBindingOk.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassLevelInterceptorBindingOk.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassLevelInterceptorBindingOk.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.interceptors;
+
+@CatInterceptorBinding
+public class ClassLevelInterceptorBindingOk {
+
+ final private void foo() {
+ }
+
+ static final public void foo2() {
+ }
+
+ public void foo3() {
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassLevelInterceptorBindingOk.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassLevelInterceptorBindingWithFinalMethodBroken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassLevelInterceptorBindingWithFinalMethodBroken.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassLevelInterceptorBindingWithFinalMethodBroken.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.interceptors;
+
+@InterceptorStereotype
+public class ClassLevelInterceptorBindingWithFinalMethodBroken {
+
+ final public void foo() {
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassLevelInterceptorBindingWithFinalMethodBroken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassWithMethodLevelInterceptorBindingOk.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassWithMethodLevelInterceptorBindingOk.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassWithMethodLevelInterceptorBindingOk.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -0,0 +1,16 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.interceptors;
+
+public class ClassWithMethodLevelInterceptorBindingOk {
+
+ @CatInterceptorBinding
+ final private void foo() {
+ }
+
+ @CatInterceptorBinding
+ static final public void foo2() {
+ }
+
+ @CatInterceptorBinding
+ public void foo3() {
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassWithMethodLevelInterceptorBindingOk.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassWithMethodLevelInterceptorBindingWithFinalMethodBroken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassWithMethodLevelInterceptorBindingWithFinalMethodBroken.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassWithMethodLevelInterceptorBindingWithFinalMethodBroken.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.interceptors;
+
+public class ClassWithMethodLevelInterceptorBindingWithFinalMethodBroken {
+
+ @CatInterceptorBinding
+ public final void foo() {
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/ClassWithMethodLevelInterceptorBindingWithFinalMethodBroken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/FinalClassWithClassLevelInterceptorBindingBroken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/FinalClassWithClassLevelInterceptorBindingBroken.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/FinalClassWithClassLevelInterceptorBindingBroken.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.interceptors;
+
+@CatInterceptorBinding
+final public class FinalClassWithClassLevelInterceptorBindingBroken {
+
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/FinalClassWithClassLevelInterceptorBindingBroken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/FinalClassWithMethodLevelInterceptorBindingBroken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/FinalClassWithMethodLevelInterceptorBindingBroken.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/FinalClassWithMethodLevelInterceptorBindingBroken.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.interceptors;
+
+final public class FinalClassWithMethodLevelInterceptorBindingBroken {
+
+ @InterceptorMethodStereotype
+ public void foo() {
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/FinalClassWithMethodLevelInterceptorBindingBroken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/InterceptorMethodStereotype.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/InterceptorMethodStereotype.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/InterceptorMethodStereotype.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.interceptors;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.Stereotype;
+
+@Stereotype
+@InterceptorStereotype
+@Target({ TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface InterceptorMethodStereotype {
+
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/InterceptorMethodStereotype.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-07-01 16:43:40 UTC (rev 23153)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-07-01 17:25:35 UTC (rev 23154)
@@ -1207,6 +1207,74 @@
}
/**
+ * 9.3. Binding an interceptor to a bean
+ * - managed bean has a class level interceptor binding and has a non-static, non-private, final method
+ *
+ * @throws Exception
+ */
+ public void testClassLevelInterceptorBindingWithFinalMethodBroken() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/ClassLevelInterceptorBindingWithFinalMethodBroken.java");
+ assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD, 6);
+ }
+
+ /**
+ * 9.3. Binding an interceptor to a bean
+ * - managed bean has a method level interceptor binding and this method is declared as non-static, non-private, final
+ *
+ * @throws Exception
+ */
+ public void testClassWithMethodLevelInterceptorBindingWithFinalMethodBroken() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/ClassWithMethodLevelInterceptorBindingWithFinalMethodBroken.java");
+ assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD, 6);
+ }
+
+ /**
+ * 9.3. Binding an interceptor to a bean
+ * - managed bean has a class level interceptor binding and is declared final
+ *
+ * @throws Exception
+ */
+ public void testFinalClassWithClassLevelInterceptorBindingBroken() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/FinalClassWithClassLevelInterceptorBindingBroken.java");
+ assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS, 4);
+ }
+
+ /**
+ * 9.3. Binding an interceptor to a bean
+ * - managed bean has a method level interceptor binding and is declared final
+ *
+ * @throws Exception
+ */
+ public void testFinalClassWithMethodLevelInterceptorBindingBroken() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/FinalClassWithMethodLevelInterceptorBindingBroken.java");
+ assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS, 3);
+ }
+
+ /**
+ * 9.3. Binding an interceptor to a bean
+ * - managed bean has a class level interceptor binding and is declared final or has a non-static, non-private, final method
+ *
+ * @throws Exception
+ */
+ public void testClassLevelInterceptorBindingOk() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/ClassLevelInterceptorBindingOk.java");
+ assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS);
+ assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD);
+ }
+
+ /**
+ * 9.3. Binding an interceptor to a bean
+ * - managed bean has a method level interceptor binding and is declared final or has a non-static, non-private, final method
+ *
+ * @throws Exception
+ */
+ public void testClassWithMethodLevelInterceptorBindingOk() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/ClassWithMethodLevelInterceptorBindingOk.java");
+ assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_CLASS);
+ assertMarkerIsNotCreated(file, CDIValidationMessages.ILLEGAL_INTERCEPTOR_BINDING_METHOD);
+ }
+
+ /**
* 10.4.2. Declaring an observer method
* - method has more than one parameter annotated @Observes
*
14 years, 6 months