JBoss Tools SVN: r22542 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-06-04 06:39:41 -0400 (Fri, 04 Jun 2010)
New Revision: 22542
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/errorList.txt
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708
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-06-04 09:57:59 UTC (rev 22541)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-06-04 10:39:41 UTC (rev 22542)
@@ -1408,7 +1408,7 @@
if(typeName!=null) {
IType memberType = type.getJavaProject().findType(typeName);
if(memberType!=null && memberType.isAnnotation()) {
- if(!CDIUtil.hasNonBindingAnnotationDeclaration(type, method)) {
+ if(!qualifier.getNonBindingMethods().contains(method)) {
ITextSourceReference reference = CDIUtil.convertToSourceReference(method.getNameRange());
addError(CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER, CDIPreferences.MISSING_NONBINDING_IN_QUALIFIER_TYPE_MEMBER, reference, qualifier.getResource());
}
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-06-04 09:57:59 UTC (rev 22541)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-06-04 10:39:41 UTC (rev 22542)
@@ -125,10 +125,6 @@
5.2.2. Legal injection point types
- injection point type is a type variable
-
-
-
-
5.2.5. Qualifier annotations with members
- array-valued or annotation-valued member of a qualifier type is not annotated @Nonbinding (Non-Portable behavior)
@@ -142,6 +138,10 @@
- Java EE component class supporting injection that is not a bean has an injection
point of type InjectionPoint and qualifier @Default
+
+
+
+
8.1.2. Decorator delegate injection points
- decorator has more than one delegate injection point, or
does not have a delegate injection point
14 years, 7 months
JBoss Tools SVN: r22541 - trunk.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-06-04 05:57:59 -0400 (Fri, 04 Jun 2010)
New Revision: 22541
Modified:
trunk/parent-pom.xml
Log:
memory params added
Modified: trunk/parent-pom.xml
===================================================================
--- trunk/parent-pom.xml 2010-06-04 08:39:50 UTC (rev 22540)
+++ trunk/parent-pom.xml 2010-06-04 09:57:59 UTC (rev 22541)
@@ -92,6 +92,7 @@
<forkedProcessTimeoutInSeconds>900</forkedProcessTimeoutInSeconds>
<useUIHarness>true</useUIHarness>
<useUIThread>true</useUIThread>
+ <argLine>-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=256m</argLine>
<!-- https://docs.sonatype.org/display/TYCHO/How+to+run+SWTBot+tests+with+Tycho -->
<!-- set useUIThread=true for regular ui tests -->
<!-- set useUIThread=false for swtbot tests (?) -->
14 years, 7 months
JBoss Tools SVN: r22540 - trunk.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-06-04 04:39:50 -0400 (Fri, 04 Jun 2010)
New Revision: 22540
Modified:
trunk/parent-pom.xml
Log:
restoring compilation for code from trunk.
two profiles created:
- helios - default one to keep behavior the same as nick wants it to be
- galileo - to use in -P option to be able to build trunk and continue porting JUnit tests
Modified: trunk/parent-pom.xml
===================================================================
--- trunk/parent-pom.xml 2010-06-04 08:03:49 UTC (rev 22539)
+++ trunk/parent-pom.xml 2010-06-04 08:39:50 UTC (rev 22540)
@@ -1,451 +1,539 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <name>JBoss Tools Parent</name>
- <packaging>pom</packaging>
-
- <properties>
- <tychoVersion>0.9.0-SNAPSHOT</tychoVersion>
- <scmBranch>trunk</scmBranch>
- <BUILD_ALIAS>M1</BUILD_ALIAS>
- </properties>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-packaging-plugin</artifactId>
- <version>${tychoVersion}</version>
- <configuration>
- <format>'v'yyyyMMdd-HHmm'-${BUILD_ALIAS}'</format>
- <archiveSite>true</archiveSite>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- <version>${tychoVersion}</version>
- <extensions>true</extensions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-scm-plugin</artifactId>
- <version>1.0</version>
- <configuration>
- <useNonInteractive>true</useNonInteractive>
- <connectionType>connection</connectionType>
- <!-- <connectionType>developerConnection</connectionType> -->
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tychoVersion}</version>
- <configuration>
- <resolver>p2</resolver>
- <environments>
- <environment>
- <os>macosx</os>
- <ws>cocoa</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>macosx</os>
- <ws>carbon</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86_64</arch>
- </environment>
- </environments>
- </configuration>
- </plugin>
-
- <!-- to skip running tests (compile only) use commandline flag: -Dmaven.test.skip
- To allow all tests in a pom to pass/fail, use commandline flag: -fae (fail
- at end) -->
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-test-plugin</artifactId>
- <version>${tychoVersion}</version>
- <configuration>
- <!-- timeout in seconds -->
- <surefire.timeout>900</surefire.timeout>
- <forkedProcessTimeoutInSeconds>900</forkedProcessTimeoutInSeconds>
- <useUIHarness>true</useUIHarness>
- <useUIThread>true</useUIThread>
- <!-- https://docs.sonatype.org/display/TYCHO/How+to+run+SWTBot+tests+with+Tycho -->
- <!-- set useUIThread=true for regular ui tests -->
- <!-- set useUIThread=false for swtbot tests (?) -->
- <product>org.eclipse.sdk.ide</product>
- <application>org.eclipse.ui.ide.workbench</application>
- <dependencies>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.eclipse.sdk.ide</artifactId>
- <version>0.0.0</version>
- </dependency>
- <!-- http://www.jmock.org/maven.html -->
- <dependency>
- <groupId>org.jmock</groupId>
- <artifactId>jmock-legacy</artifactId>
- <version>2.5.1</version>
- </dependency>
- <dependency>
- <groupId>org.jmock</groupId>
- <artifactId>jmock-junit4</artifactId>
- <version>2.5.1</version>
- </dependency>
- </dependencies>
- <includes>
- <include>**/AllTests.class</include>
- <include>**/*AllTests*.class</include>
- <include>**/*AllBotTests*.class</include>
- <include>**/*TestSuite*.class</include>
- </includes>
- <parallel>true</parallel>
- </configuration>
- </plugin>
- <!-- Enable deploy task -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <version>2.5</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.4.2</version>
- <configuration>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
-
- </plugins>
- <!-- Enable SCP -->
- <extensions>
- <extension>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-ssh</artifactId>
- <version>1.0-beta-6</version>
- </extension>
- <extension>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-ssh-external</artifactId>
- <version>1.0-beta-6</version>
- </extension>
- </extensions>
- </build>
-
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbosstools/${scmBranch}
- </connection>
- <developerConnection>scm:svn:http://anonsvn.jboss.org/repos/jbosstools/${scmBranch}
- </developerConnection>
- <url>http://anonsvn.jboss.org/repos/jbosstools/${scmBranch}
- </url>
- </scm>
-
- <issueManagement>
- <system>jira</system>
- <url>https://jira.jboss.org/jira/secure/</url>
- </issueManagement>
-
- <repositories>
- <repository>
- <id>helios</id>
- <url>http://download.eclipse.org/releases/helios/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>webtools32</id>
- <url>http://download.eclipse.org/webtools/repository/helios</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>eclipse36</id>
- <url>http://download.eclipse.org/eclipse/updates/3.6/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>birt26r</id>
- <url>http://download.eclipse.org/birt/update-site/2.6/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>birt26i</id>
- <url>http://download.eclipse.org/birt/update-site/2.6-interim/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>swtbot-helios</id>
- <url>http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/
- </url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
-
- <repository>
- <id>galileo</id>
- <url>http://download.eclipse.org/releases/galileo/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>eclipse35</id>
- <url>http://download.eclipse.org/eclipse/updates/3.5/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>birt25r</id>
- <url>http://download.eclipse.org/birt/update-site/2.5</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>swtbot-galileo</id>
- <url>http://download.eclipse.org/technology/swtbot/galileo/dev-build/update-site
- </url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>webtools</id>
- <url>http://download.eclipse.org/webtools/updates/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
-
- <repository>
- <id>m2eclipse</id>
- <url>http://m2eclipse.sonatype.org/sites/m2e/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>m2eclipse-extras</id>
- <url>http://m2eclipse.sonatype.org/sites/m2e-extras/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- </repositories>
-
- <profiles>
- <!-- TODO: verify that this profile overrides the default profile if BUILD_NUMBER
- is set (by a Hudson job) -->
- <profile>
- <id>hudson</id>
- <activation>
- <property>
- <name>BUILD_NUMBER</name>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-packaging-plugin</artifactId>
- <version>${tychoVersion}</version>
- <configuration>
- <format>'v'yyyyMMdd-HHmm'-H${BUILD_NUMBER}-${BUILD_ALIAS}'
- </format>
- <archiveSite>true</archiveSite>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>svn-repos</id>
- <activation>
- <property>
- <name>svn</name>
- </property>
- </activation>
- <repositories>
- <repository>
- <id>svnkit13</id>
- <url>http://eclipse.svnkit.com/1.3.x/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>subclipse16</id>
- <url>http://subclipse.tigris.org/update_1.6.x/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>subversive07</id>
- <url>http://download.eclipse.org/technology/subversive/0.7/update-site/
- </url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>subversive20</id>
- <url>http://community.polarion.com/projects/subversive/download/eclipse/2.0/up...
- </url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- </repositories>
- </profile>
- </profiles>
-
- <pluginRepositories>
- <pluginRepository>
- <id>sonatype-maven-central</id>
- <url>http://repository.sonatype.org/content/repositories/central/
- </url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </pluginRepository>
- <pluginRepository>
- <id>maven-snapshots-sonatype</id>
- <url>https://repository.apache.org/content/repositories/maven-snapshots-sonatype/
- </url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
- </pluginRepository>
- <pluginRepository>
- <id>tycho</id>
- <url>https://repository.sonatype.org/content/repositories/snapshots/
- </url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
- </pluginRepository>
- <pluginRepository>
- <id>apache-snapshots</id>
- <url>http://repository.apache.org/snapshots/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
- </pluginRepository>
- </pluginRepositories>
-
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <name>JBoss Tools Parent</name>
+ <packaging>pom</packaging>
+
+ <properties>
+ <tychoVersion>0.9.0-SNAPSHOT</tychoVersion>
+ <scmBranch>trunk</scmBranch>
+ <BUILD_ALIAS>M1</BUILD_ALIAS>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-packaging-plugin</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <format>'v'yyyyMMdd-HHmm'-${BUILD_ALIAS}'</format>
+ <archiveSite>true</archiveSite>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <version>${tychoVersion}</version>
+ <extensions>true</extensions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-scm-plugin</artifactId>
+ <version>1.0</version>
+ <configuration>
+ <useNonInteractive>true</useNonInteractive>
+ <connectionType>connection</connectionType>
+ <!-- <connectionType>developerConnection</connectionType> -->
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <resolver>p2</resolver>
+ <environments>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>macosx</os>
+ <ws>carbon</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86_64</arch>
+ </environment>
+ </environments>
+ </configuration>
+ </plugin>
+
+ <!-- to skip running tests (compile only) use commandline flag: -Dmaven.test.skip
+ To allow all tests in a pom to pass/fail, use commandline flag: -fae (fail
+ at end) -->
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-test-plugin</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <!-- timeout in seconds -->
+ <surefire.timeout>900</surefire.timeout>
+ <forkedProcessTimeoutInSeconds>900</forkedProcessTimeoutInSeconds>
+ <useUIHarness>true</useUIHarness>
+ <useUIThread>true</useUIThread>
+ <!-- https://docs.sonatype.org/display/TYCHO/How+to+run+SWTBot+tests+with+Tycho -->
+ <!-- set useUIThread=true for regular ui tests -->
+ <!-- set useUIThread=false for swtbot tests (?) -->
+ <product>org.eclipse.sdk.ide</product>
+ <application>org.eclipse.ui.ide.workbench</application>
+ <dependencies>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.sdk.ide</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <!-- http://www.jmock.org/maven.html -->
+ <dependency>
+ <groupId>org.jmock</groupId>
+ <artifactId>jmock-legacy</artifactId>
+ <version>2.5.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jmock</groupId>
+ <artifactId>jmock-junit4</artifactId>
+ <version>2.5.1</version>
+ </dependency>
+ </dependencies>
+ <includes>
+ <include>**/AllTests.class</include>
+ <include>**/*AllTests*.class</include>
+ <include>**/*AllBotTests*.class</include>
+ <include>**/*TestSuite*.class</include>
+ </includes>
+ <parallel>true</parallel>
+ </configuration>
+ </plugin>
+ <!-- Enable deploy task -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.5</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.4.2</version>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ <!-- Enable SCP -->
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-ssh</artifactId>
+ <version>1.0-beta-6</version>
+ </extension>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-ssh-external</artifactId>
+ <version>1.0-beta-6</version>
+ </extension>
+ </extensions>
+ </build>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbosstools/${scmBranch}
+ </connection>
+ <developerConnection>scm:svn:http://anonsvn.jboss.org/repos/jbosstools/${scmBranch}
+ </developerConnection>
+ <url>http://anonsvn.jboss.org/repos/jbosstools/${scmBranch}
+ </url>
+ </scm>
+
+ <issueManagement>
+ <system>jira</system>
+ <url>https://jira.jboss.org/jira/secure/</url>
+ </issueManagement>
+ <profiles>
+ <profile>
+ <id>helios</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <repositories>
+ <repository>
+ <id>helios</id>
+ <url>http://download.eclipse.org/releases/helios/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>webtools32</id>
+ <url>http://download.eclipse.org/webtools/repository/helios</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>eclipse36</id>
+ <url>http://download.eclipse.org/eclipse/updates/3.6/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>birt26r</id>
+ <url>http://download.eclipse.org/birt/update-site/2.6/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>birt26i</id>
+ <url>http://download.eclipse.org/birt/update-site/2.6-interim/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>swtbot-helios</id>
+ <url>http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/
+ </url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+
+ <repository>
+ <id>galileo</id>
+ <url>http://download.eclipse.org/releases/galileo/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>eclipse35</id>
+ <url>http://download.eclipse.org/eclipse/updates/3.5/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>birt25r</id>
+ <url>http://download.eclipse.org/birt/update-site/2.5</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>swtbot-galileo</id>
+ <url>http://download.eclipse.org/technology/swtbot/galileo/dev-build/update-site
+ </url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>webtools</id>
+ <url>http://download.eclipse.org/webtools/updates/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+
+ <repository>
+ <id>m2eclipse</id>
+ <url>http://m2eclipse.sonatype.org/sites/m2e/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>m2eclipse-extras</id>
+ <url>http://m2eclipse.sonatype.org/sites/m2e-extras/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ </repositories>
+ </profile>
+ <!-- TODO: verify that this profile overrides the default profile if BUILD_NUMBER
+ is set (by a Hudson job) -->
+ <profile>
+ <id>hudson</id>
+ <activation>
+ <property>
+ <name>BUILD_NUMBER</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-packaging-plugin</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <format>'v'yyyyMMdd-HHmm'-H${BUILD_NUMBER}-${BUILD_ALIAS}'
+ </format>
+ <archiveSite>true</archiveSite>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>svn-repos</id>
+ <activation>
+ <property>
+ <name>svn</name>
+ </property>
+ </activation>
+ <repositories>
+ <repository>
+ <id>svnkit13</id>
+ <url>http://eclipse.svnkit.com/1.3.x/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>subclipse16</id>
+ <url>http://subclipse.tigris.org/update_1.6.x/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>subversive07</id>
+ <url>http://download.eclipse.org/technology/subversive/0.7/update-site/
+ </url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>subversive20</id>
+ <url>http://community.polarion.com/projects/subversive/download/eclipse/2.0/up...
+ </url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ </repositories>
+ </profile>
+ <profile>
+ <id>galileo</id>
+ <repositories>
+ <repository>
+ <id>galileo</id>
+ <url>http://download.eclipse.org/releases/galileo/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>eclipse35</id>
+ <url>http://download.eclipse.org/eclipse/updates/3.5/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>birt25r</id>
+ <url>http://download.eclipse.org/birt/update-site/2.5</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>swtbot-galileo</id>
+ <url>http://download.eclipse.org/technology/swtbot/galileo/dev-build/update-site
+ </url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>webtools</id>
+ <url>http://download.eclipse.org/webtools/updates/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+
+ <repository>
+ <id>m2eclipse</id>
+ <url>http://m2eclipse.sonatype.org/sites/m2e/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>m2eclipse-extras</id>
+ <url>http://m2eclipse.sonatype.org/sites/m2e-extras/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ </repositories>
+ </profile>
+ </profiles>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>sonatype-maven-central</id>
+ <url>http://repository.sonatype.org/content/repositories/central/
+ </url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </pluginRepository>
+ <pluginRepository>
+ <id>maven-snapshots-sonatype</id>
+ <url>https://repository.apache.org/content/repositories/maven-snapshots-sonatype/
+ </url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </pluginRepository>
+ <pluginRepository>
+ <id>tycho</id>
+ <url>https://repository.sonatype.org/content/repositories/snapshots/
+ </url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </pluginRepository>
+ <pluginRepository>
+ <id>apache-snapshots</id>
+ <url>http://repository.apache.org/snapshots/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </pluginRepository>
+ </pluginRepositories>
+
+</project>
14 years, 7 months
JBoss Tools SVN: r22539 - in workspace/smooks-dmb/smooks/plugins: org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/csv and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2010-06-04 04:03:49 -0400 (Fri, 04 Jun 2010)
New Revision: 22539
Added:
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/TemplatingModelBuilder.java
Removed:
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java
Modified:
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelNodeResolver.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/csv/CSVModelBuilder.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/TemplateBuilder.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilder.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/XMLFreeMarkerTemplateBuilder.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerAttrModel.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerModelAnalyzer.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerTemplateModelLabelProvider.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerTemplateXMLModel.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanChildGraphModel.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/template/FreemarkerTemplateContentGraphModelProviderImpl.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/template/SmooksFreemarkerTemplateGraphicalEditor.java
Log:
Renamed the templating ModelBuilder class to TemplatingModelBuilder, so as not to clash with the Dynamic ModelBuilder class in Smooks
Deleted: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java 2010-06-04 07:28:16 UTC (rev 22538)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java 2010-06-04 08:03:49 UTC (rev 22539)
@@ -1,272 +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.model;
-
-import java.util.Properties;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.milyn.xml.DomUtils;
-
-import javax.xml.XMLConstants;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.ParserConfigurationException;
-
-/**
- * Abstract message model builder.
- *
- * @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
- */
-public abstract class ModelBuilder {
-
- public static final String NAMESPACE = "http://www.jboss.org/xsd/tools/smooks"; // TODO: Make same as JBT eclipse extension namespace ?? //$NON-NLS-1$
- public static final String REQUIRED = "#required"; //$NON-NLS-1$
- public static final String OPTIONAL = "#optional"; //$NON-NLS-1$
-
- private static final String HIDDEN_ELEMENT = "hidden"; //$NON-NLS-1$
-
- public static enum ElementType {
- simple,
- complex
- }
-
- private Properties namespaces = new Properties();
-
- /**
- * Build the message model.
- * @return The message model.
- * @throws ModelBuilderException Error building model.
- */
- public abstract Document buildModel() throws ModelBuilderException;
-
- /**
- * Get the namespace prefix-to-URI mappings for this model.
- * @return The namespace prefix-to-URI mappings for this model.
- */
- public Properties getNamespaces() {
- return namespaces;
- }
-
-
-
- /**
- * Mark a fragment as being hidden.
- * <p/>
- * When hidden, it is illegal to attempt a mapping onto a fragment.
- *
- * @param fragment The fragment to be marked as hidden.
- */
- public static void hideFragment(Element fragment) {
- fragment.setAttributeNS(NAMESPACE, HIDDEN_ELEMENT, "true"); //$NON-NLS-1$
- }
-
- /**
- * Unmark a fragment as being hidden.
- * <p/>
- * When hidden, it is illegal to attempt a mapping onto a fragment.
- *
- * @param fragment The fragment to be unmarked as hidden.
- */
- public static void unhideFragment(Element fragment) {
- fragment.removeAttributeNS(NAMESPACE, HIDDEN_ELEMENT);
- }
-
- /**
- * Is the specified node marked as being hidden.
- * <p/>
- * When hidden, it is illegal to attempt a mapping onto a fragment.
- *
- * @return True if the node is hidden, otherwise false.
- */
- public static boolean isHidden(Node node) {
- if(node != null) {
- switch(node.getNodeType()) {
- case Node.ATTRIBUTE_NODE :
- return isHidden(node.getParentNode());
- case Node.ELEMENT_NODE :
- if(((Element)node).getAttributeNS(NAMESPACE, HIDDEN_ELEMENT).equals("true")) { //$NON-NLS-1$
- return true;
- }
- return isHidden(node.getParentNode());
- }
- }
-
- return false;
- }
-
- /**
- * Is the specified node required.
- * <p/>
- * For an Element node, this means does it have a minOccurs > 0. For an Attr node,
- * it means is its value set to "#REQUIRED".
- *
- * @return True if the node is hidden, otherwise false.
- */
- public static boolean isRequired(Node node) {
- if(node != null) {
- switch(node.getNodeType()) {
- case Node.ATTRIBUTE_NODE :
- return (REQUIRED.equals(node.getTextContent()) || XMLConstants.XML_NS_URI.equals(node.getNamespaceURI()));
- case Node.ELEMENT_NODE :
- if(getMinOccurs((Element) node) > 0) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- /**
- * Is the specified node in the reserved namespace.
- *
- * @return True if the node is in the reserved namespace, otherwise false.
- */
- public static boolean isInReservedNamespace(Node node) {
- if(node != null) {
- return NAMESPACE.equals(node.getNamespaceURI());
- }
-
- return false;
- }
-
- protected Document createModelInstance() throws ModelBuilderException {
- DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
- DocumentBuilder builder;
-
- try {
- builder = builderFactory.newDocumentBuilder();
- } catch (ParserConfigurationException e) {
- throw new ModelBuilderException("Error constructing DOM DocumentBuilder.", e); //$NON-NLS-1$
- }
-
- return builder.newDocument();
- }
-
- public static void setMinMax(Element element, int minOccurs, int maxOccurs) {
- element.setAttributeNS(NAMESPACE, "smk:minOccurs", Integer.toString(minOccurs)); //$NON-NLS-1$
- element.setAttributeNS(NAMESPACE, "smk:maxOccurs", Integer.toString(maxOccurs)); //$NON-NLS-1$
- }
-
- public static Node getParentNode(Node node) {
- if(node.getNodeType() == Node.ATTRIBUTE_NODE) {
- return ((Attr)node).getOwnerElement();
- } else {
- return node.getParentNode();
- }
- }
-
- public static int getMinOccurs(Element element) {
- String minOccurs = element.getAttributeNS(NAMESPACE, "minOccurs"); //$NON-NLS-1$
-
- if(minOccurs.equals("")) { //$NON-NLS-1$
- return 1;
- }
-
- return Integer.parseInt(minOccurs);
- }
-
- public static int getMaxOccurs(Element element) {
- String maxOccurs = element.getAttributeNS(NAMESPACE, "maxOccurs"); //$NON-NLS-1$
-
- if(maxOccurs.equals("")) { //$NON-NLS-1$
- return 1;
- }
-
- return Integer.parseInt(maxOccurs);
- }
-
- public static boolean isCollection(Element element) {
- int maxOccurs = getMaxOccurs(element);
-
- return (maxOccurs > 1 || maxOccurs == -1);
- }
-
- public static void setElementType(Element element, ElementType type) {
- element.setAttributeNS(NAMESPACE, "smk:elementType", type.toString()); //$NON-NLS-1$
- }
-
- public static ElementType getElementType(Element element) {
- String elementType = element.getAttributeNS(NAMESPACE, "elementType"); //$NON-NLS-1$
-
- if(elementType == null || elementType.length() == 0) {
- return null;
- }
-
- return ElementType.valueOf(elementType);
- }
-
- /**
- * Create a compositor Element.
- * @param document Owner Document node.
- * @return The compositor Element.
- */
- public static Element createCompositor(Document document) {
- return document.createElementNS(NAMESPACE, "smk:compositor"); //$NON-NLS-1$
- }
-
- /**
- * Is the supplied DOM node the compositor Element.
- * @param node The DOM node to test.
- * @return True if the node is the compositor element, otherwise false.
- */
- public static boolean isCompositor(Node node) {
- if(node.getNodeType() == Node.ELEMENT_NODE) {
- if(DomUtils.getName((Element)node).equals("compositor")) { //$NON-NLS-1$
- if(NAMESPACE.equals(node.getNamespaceURI())) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * Turn on/off enforcement of collection sub-mapping rules.
- * <p/>
- * If turned on, the collection mapping must be made on the model collection element (having maxOccurs > 1)
- * before mappings can be made on sub elements.
- *
- * @param element The model element.
- * @param enforce True if enforcement is to be turned on, otherwise false.
- */
- public static void setEnforceCollectionSubMappingRules(Element element, boolean enforce) {
- element.setAttributeNS(NAMESPACE, "smk:enforceCollectionSubMappingRules", Boolean.toString(enforce)); //$NON-NLS-1$
- }
-
- /**
- * Is collection sub-mapping rules turned on for the supplied model element.
- * @param element The model element.
- * @return True if enforcement is turned on, otherwise false.
- * @see #setEnforceCollectionSubMappingRules(Element, boolean)
- */
- public static boolean getEnforceCollectionSubMappingRules(Element element) {
- String enforce = element.getAttributeNS(NAMESPACE, "enforceCollectionSubMappingRules"); //$NON-NLS-1$
-
- if(enforce == null || enforce.length() == 0) {
- return true;
- }
-
- return !enforce.equals("false"); //$NON-NLS-1$
- }
-}
Modified: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelNodeResolver.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelNodeResolver.java 2010-06-04 07:28:16 UTC (rev 22538)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelNodeResolver.java 2010-06-04 08:03:49 UTC (rev 22539)
@@ -54,7 +54,7 @@
StringBuilder pathBuilder = new StringBuilder();
while(node != null && node.getNodeType() != Node.DOCUMENT_NODE) {
- if(!ModelBuilder.isInReservedNamespace(node)) {
+ if(!TemplatingModelBuilder.isInReservedNamespace(node)) {
if(pathBuilder.length() > 0) {
pathBuilder.insert(0, '/'); //$NON-NLS-1$
}
@@ -76,7 +76,7 @@
}
}
- node = ModelBuilder.getParentNode(node);
+ node = TemplatingModelBuilder.getParentNode(node);
}
return pathBuilder.toString();
@@ -85,7 +85,7 @@
private void buildModelNodeMap(Element element, String parentPath) {
String elementPath = parentPath;
- if(!ModelBuilder.isInReservedNamespace(element)) {
+ if(!TemplatingModelBuilder.isInReservedNamespace(element)) {
String elNS = element.getNamespaceURI();
if(parentPath.length() > 0) {
@@ -104,7 +104,7 @@
int attrCount = attributes.getLength();
for(int i = 0; i < attrCount; i++) {
Attr attribute = (Attr) attributes.item(i);
- if(!ModelBuilder.isInReservedNamespace(attribute)) {
+ if(!TemplatingModelBuilder.isInReservedNamespace(attribute)) {
String attrNS = attribute.getNamespaceURI();
if(attrNS != null && attrNS.length() > 0) {
modelNodeMap.put(elementPath + "/@" + getPrefix(attrNS) + ":" + attribute.getName(), attribute); //$NON-NLS-1$ //$NON-NLS-2$
Copied: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/TemplatingModelBuilder.java (from rev 22508, workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java)
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/TemplatingModelBuilder.java (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/TemplatingModelBuilder.java 2010-06-04 08:03:49 UTC (rev 22539)
@@ -0,0 +1,272 @@
+/*
+ * 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.model;
+
+import java.util.Properties;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.milyn.xml.DomUtils;
+
+import javax.xml.XMLConstants;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.ParserConfigurationException;
+
+/**
+ * Abstract message model builder.
+ *
+ * @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
+ */
+public abstract class TemplatingModelBuilder {
+
+ public static final String NAMESPACE = "http://www.jboss.org/xsd/tools/smooks"; // TODO: Make same as JBT eclipse extension namespace ?? //$NON-NLS-1$
+ public static final String REQUIRED = "#required"; //$NON-NLS-1$
+ public static final String OPTIONAL = "#optional"; //$NON-NLS-1$
+
+ private static final String HIDDEN_ELEMENT = "hidden"; //$NON-NLS-1$
+
+ public static enum ElementType {
+ simple,
+ complex
+ }
+
+ private Properties namespaces = new Properties();
+
+ /**
+ * Build the message model.
+ * @return The message model.
+ * @throws ModelBuilderException Error building model.
+ */
+ public abstract Document buildModel() throws ModelBuilderException;
+
+ /**
+ * Get the namespace prefix-to-URI mappings for this model.
+ * @return The namespace prefix-to-URI mappings for this model.
+ */
+ public Properties getNamespaces() {
+ return namespaces;
+ }
+
+
+
+ /**
+ * Mark a fragment as being hidden.
+ * <p/>
+ * When hidden, it is illegal to attempt a mapping onto a fragment.
+ *
+ * @param fragment The fragment to be marked as hidden.
+ */
+ public static void hideFragment(Element fragment) {
+ fragment.setAttributeNS(NAMESPACE, HIDDEN_ELEMENT, "true"); //$NON-NLS-1$
+ }
+
+ /**
+ * Unmark a fragment as being hidden.
+ * <p/>
+ * When hidden, it is illegal to attempt a mapping onto a fragment.
+ *
+ * @param fragment The fragment to be unmarked as hidden.
+ */
+ public static void unhideFragment(Element fragment) {
+ fragment.removeAttributeNS(NAMESPACE, HIDDEN_ELEMENT);
+ }
+
+ /**
+ * Is the specified node marked as being hidden.
+ * <p/>
+ * When hidden, it is illegal to attempt a mapping onto a fragment.
+ *
+ * @return True if the node is hidden, otherwise false.
+ */
+ public static boolean isHidden(Node node) {
+ if(node != null) {
+ switch(node.getNodeType()) {
+ case Node.ATTRIBUTE_NODE :
+ return isHidden(node.getParentNode());
+ case Node.ELEMENT_NODE :
+ if(((Element)node).getAttributeNS(NAMESPACE, HIDDEN_ELEMENT).equals("true")) { //$NON-NLS-1$
+ return true;
+ }
+ return isHidden(node.getParentNode());
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Is the specified node required.
+ * <p/>
+ * For an Element node, this means does it have a minOccurs > 0. For an Attr node,
+ * it means is its value set to "#REQUIRED".
+ *
+ * @return True if the node is hidden, otherwise false.
+ */
+ public static boolean isRequired(Node node) {
+ if(node != null) {
+ switch(node.getNodeType()) {
+ case Node.ATTRIBUTE_NODE :
+ return (REQUIRED.equals(node.getTextContent()) || XMLConstants.XML_NS_URI.equals(node.getNamespaceURI()));
+ case Node.ELEMENT_NODE :
+ if(getMinOccurs((Element) node) > 0) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Is the specified node in the reserved namespace.
+ *
+ * @return True if the node is in the reserved namespace, otherwise false.
+ */
+ public static boolean isInReservedNamespace(Node node) {
+ if(node != null) {
+ return NAMESPACE.equals(node.getNamespaceURI());
+ }
+
+ return false;
+ }
+
+ protected Document createModelInstance() throws ModelBuilderException {
+ DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder builder;
+
+ try {
+ builder = builderFactory.newDocumentBuilder();
+ } catch (ParserConfigurationException e) {
+ throw new ModelBuilderException("Error constructing DOM DocumentBuilder.", e); //$NON-NLS-1$
+ }
+
+ return builder.newDocument();
+ }
+
+ public static void setMinMax(Element element, int minOccurs, int maxOccurs) {
+ element.setAttributeNS(NAMESPACE, "smk:minOccurs", Integer.toString(minOccurs)); //$NON-NLS-1$
+ element.setAttributeNS(NAMESPACE, "smk:maxOccurs", Integer.toString(maxOccurs)); //$NON-NLS-1$
+ }
+
+ public static Node getParentNode(Node node) {
+ if(node.getNodeType() == Node.ATTRIBUTE_NODE) {
+ return ((Attr)node).getOwnerElement();
+ } else {
+ return node.getParentNode();
+ }
+ }
+
+ public static int getMinOccurs(Element element) {
+ String minOccurs = element.getAttributeNS(NAMESPACE, "minOccurs"); //$NON-NLS-1$
+
+ if(minOccurs.equals("")) { //$NON-NLS-1$
+ return 1;
+ }
+
+ return Integer.parseInt(minOccurs);
+ }
+
+ public static int getMaxOccurs(Element element) {
+ String maxOccurs = element.getAttributeNS(NAMESPACE, "maxOccurs"); //$NON-NLS-1$
+
+ if(maxOccurs.equals("")) { //$NON-NLS-1$
+ return 1;
+ }
+
+ return Integer.parseInt(maxOccurs);
+ }
+
+ public static boolean isCollection(Element element) {
+ int maxOccurs = getMaxOccurs(element);
+
+ return (maxOccurs > 1 || maxOccurs == -1);
+ }
+
+ public static void setElementType(Element element, ElementType type) {
+ element.setAttributeNS(NAMESPACE, "smk:elementType", type.toString()); //$NON-NLS-1$
+ }
+
+ public static ElementType getElementType(Element element) {
+ String elementType = element.getAttributeNS(NAMESPACE, "elementType"); //$NON-NLS-1$
+
+ if(elementType == null || elementType.length() == 0) {
+ return null;
+ }
+
+ return ElementType.valueOf(elementType);
+ }
+
+ /**
+ * Create a compositor Element.
+ * @param document Owner Document node.
+ * @return The compositor Element.
+ */
+ public static Element createCompositor(Document document) {
+ return document.createElementNS(NAMESPACE, "smk:compositor"); //$NON-NLS-1$
+ }
+
+ /**
+ * Is the supplied DOM node the compositor Element.
+ * @param node The DOM node to test.
+ * @return True if the node is the compositor element, otherwise false.
+ */
+ public static boolean isCompositor(Node node) {
+ if(node.getNodeType() == Node.ELEMENT_NODE) {
+ if(DomUtils.getName((Element)node).equals("compositor")) { //$NON-NLS-1$
+ if(NAMESPACE.equals(node.getNamespaceURI())) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Turn on/off enforcement of collection sub-mapping rules.
+ * <p/>
+ * If turned on, the collection mapping must be made on the model collection element (having maxOccurs > 1)
+ * before mappings can be made on sub elements.
+ *
+ * @param element The model element.
+ * @param enforce True if enforcement is to be turned on, otherwise false.
+ */
+ public static void setEnforceCollectionSubMappingRules(Element element, boolean enforce) {
+ element.setAttributeNS(NAMESPACE, "smk:enforceCollectionSubMappingRules", Boolean.toString(enforce)); //$NON-NLS-1$
+ }
+
+ /**
+ * Is collection sub-mapping rules turned on for the supplied model element.
+ * @param element The model element.
+ * @return True if enforcement is turned on, otherwise false.
+ * @see #setEnforceCollectionSubMappingRules(Element, boolean)
+ */
+ public static boolean getEnforceCollectionSubMappingRules(Element element) {
+ String enforce = element.getAttributeNS(NAMESPACE, "enforceCollectionSubMappingRules"); //$NON-NLS-1$
+
+ if(enforce == null || enforce.length() == 0) {
+ return true;
+ }
+
+ return !enforce.equals("false"); //$NON-NLS-1$
+ }
+}
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/TemplatingModelBuilder.java
___________________________________________________________________
Name: svn:executable
+ *
Modified: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/csv/CSVModelBuilder.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/csv/CSVModelBuilder.java 2010-06-04 07:28:16 UTC (rev 22538)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/csv/CSVModelBuilder.java 2010-06-04 08:03:49 UTC (rev 22539)
@@ -20,7 +20,7 @@
package org.jboss.tools.smooks.templating.model.csv;
import org.eclipse.core.runtime.Assert;
-import org.jboss.tools.smooks.templating.model.ModelBuilder;
+import org.jboss.tools.smooks.templating.model.TemplatingModelBuilder;
import org.jboss.tools.smooks.templating.model.ModelBuilderException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -29,7 +29,7 @@
* CSV Model Builder.
* @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
*/
-public class CSVModelBuilder extends ModelBuilder {
+public class CSVModelBuilder extends TemplatingModelBuilder {
public static final String CSV_RECORD_ELEMENT = "csv-record"; //$NON-NLS-1$
private String[] csvFields;
Modified: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java 2010-06-04 07:28:16 UTC (rev 22538)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java 2010-06-04 08:03:49 UTC (rev 22539)
@@ -38,7 +38,7 @@
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
-import org.jboss.tools.smooks.templating.model.ModelBuilder;
+import org.jboss.tools.smooks.templating.model.TemplatingModelBuilder;
import org.jboss.tools.smooks.templating.model.ModelBuilderException;
import org.jboss.tools.smooks.templating.template.xml.XMLFreeMarkerTemplateBuilder;
import org.milyn.xml.DomUtils;
@@ -50,7 +50,7 @@
*
* @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
*/
-public class XMLSampleModelBuilder extends ModelBuilder {
+public class XMLSampleModelBuilder extends TemplatingModelBuilder {
private static DocumentBuilder docBuilder;
private Document model;
@@ -115,7 +115,7 @@
if(childCount > 0) {
// Has child elements, therefore it's a "complex" element type...
- ModelBuilder.setElementType(element, ElementType.complex);
+ TemplatingModelBuilder.setElementType(element, ElementType.complex);
for(int i = 0; i < childCount; i++) {
Node child = children.item(i);
@@ -128,7 +128,7 @@
}
} else {
// Has no child elements, therefore it's a "simple" element type...
- ModelBuilder.setElementType(element, ElementType.simple);
+ TemplatingModelBuilder.setElementType(element, ElementType.simple);
}
}
@@ -147,19 +147,19 @@
Element earlierOccurance = childElementByNames.get(elementName);
// Mark every element as being optional and possibly being multiple...
- ModelBuilder.setMinMax(childElement, 0, -1);
+ TemplatingModelBuilder.setMinMax(childElement, 0, -1);
if(earlierOccurance != null) {
// According to the sample XML, this element is definitely a
// collection item because it exists more than once, so lets mark it
// such that sub mappings on this element require this collection to be mapped beforehand...
- ModelBuilder.setEnforceCollectionSubMappingRules(earlierOccurance, true);
+ TemplatingModelBuilder.setEnforceCollectionSubMappingRules(earlierOccurance, true);
// And remove the duplicates...
removeableChildren.add(childElement);
} else {
// We've no way of knowing whether or not this element is a collection
// item or not, so lets not enforce the collection sub mapping rules...
- ModelBuilder.setEnforceCollectionSubMappingRules(childElement, false);
+ TemplatingModelBuilder.setEnforceCollectionSubMappingRules(childElement, false);
}
configureModelElementCardinality(childElement);
Modified: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java 2010-06-04 07:28:16 UTC (rev 22538)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java 2010-06-04 08:03:49 UTC (rev 22539)
@@ -31,7 +31,7 @@
import org.w3c.dom.Node;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
-import org.jboss.tools.smooks.templating.model.ModelBuilder;
+import org.jboss.tools.smooks.templating.model.TemplatingModelBuilder;
import org.jboss.tools.smooks.templating.model.ModelBuilderException;
import org.jboss.tools.smooks.templating.template.xml.XMLFreeMarkerTemplateBuilder;
@@ -56,7 +56,7 @@
*
* @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
*/
-public class XSDModelBuilder extends ModelBuilder {
+public class XSDModelBuilder extends TemplatingModelBuilder {
private Map<String, XSDElementDeclaration> elements = new LinkedHashMap<String, XSDElementDeclaration>();
private Map<String, XSDTypeDefinition> types = new LinkedHashMap<String, XSDTypeDefinition>();
@@ -207,17 +207,17 @@
parent.appendChild(element);
if(typeDef instanceof XSDComplexTypeDefinition) {
- ModelBuilder.setElementType(element, ElementType.complex);
+ TemplatingModelBuilder.setElementType(element, ElementType.complex);
processComplexType(document, element, (XSDComplexTypeDefinition) typeDef);
} else if(typeDef instanceof XSDSimpleTypeDefinition) {
XSDSimpleTypeDefinition simpleTypeDef = (XSDSimpleTypeDefinition) typeDef;
XSDTypeDefinition loadedType = types.get(simpleTypeDef.getName());
if(loadedType instanceof XSDComplexTypeDefinition) {
- ModelBuilder.setElementType(element, ElementType.complex);
+ TemplatingModelBuilder.setElementType(element, ElementType.complex);
processComplexType(document, element, (XSDComplexTypeDefinition) loadedType);
} else {
- ModelBuilder.setElementType(element, ElementType.simple);
+ TemplatingModelBuilder.setElementType(element, ElementType.simple);
}
} else if(typeDef != null) {
System.out.println("?? " + typeDef); //$NON-NLS-1$
@@ -256,7 +256,7 @@
String compositorType = compositor.getName();
if(particles.size() > 1 && compositorType.equals("choice")) { //$NON-NLS-1$
- Element compositorEl = ModelBuilder.createCompositor(document);
+ Element compositorEl = TemplatingModelBuilder.createCompositor(document);
compositorEl.setAttribute("type", compositorType); //$NON-NLS-1$
setMinMax(compositorEl, minOccurs, maxOccurs);
Modified: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/TemplateBuilder.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/TemplateBuilder.java 2010-06-04 07:28:16 UTC (rev 22538)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/TemplateBuilder.java 2010-06-04 08:03:49 UTC (rev 22539)
@@ -34,7 +34,7 @@
import javax.xml.xpath.XPathFactory;
import org.eclipse.core.runtime.Assert;
-import org.jboss.tools.smooks.templating.model.ModelBuilder;
+import org.jboss.tools.smooks.templating.model.TemplatingModelBuilder;
import org.jboss.tools.smooks.templating.model.ModelBuilderException;
import org.jboss.tools.smooks.templating.model.ModelNodeResolver;
import org.jboss.tools.smooks.templating.template.exception.InvalidMappingException;
@@ -56,7 +56,7 @@
*/
public abstract class TemplateBuilder {
- private ModelBuilder modelBuilder;
+ private TemplatingModelBuilder modelBuilder;
private Document model;
private List<Mapping> mappings = new ArrayList<Mapping>();
private XPathFactory xpathFactory = XPathFactory.newInstance();
@@ -70,7 +70,7 @@
* @throws ModelBuilderException
* Error building model.
*/
- public TemplateBuilder(ModelBuilder modelBuilder) throws ModelBuilderException {
+ public TemplateBuilder(TemplatingModelBuilder modelBuilder) throws ModelBuilderException {
Assert.isNotNull(modelBuilder, "modelBuilder"); //$NON-NLS-1$
this.modelBuilder = modelBuilder;
this.model = modelBuilder.buildModel();
@@ -112,13 +112,13 @@
}
/**
- * Get the {@link ModelBuilder} instance associated with this
+ * Get the {@link TemplatingModelBuilder} instance associated with this
* {@link TemplateBuilder}.
*
- * @return The {@link ModelBuilder} instance associated with this
+ * @return The {@link TemplatingModelBuilder} instance associated with this
* {@link TemplateBuilder}.
*/
- public ModelBuilder getModelBuilder() {
+ public TemplatingModelBuilder getModelBuilder() {
return modelBuilder;
}
@@ -187,7 +187,7 @@
for (Node hiddenNode : hideNodes) {
if (hiddenNode.getNodeType() == Node.ELEMENT_NODE) {
if (!isOnMappingPath((Element) hiddenNode)) {
- ModelBuilder.unhideFragment((Element) hiddenNode);
+ TemplatingModelBuilder.unhideFragment((Element) hiddenNode);
showNodes.add(hiddenNode);
}
}
@@ -198,19 +198,19 @@
}
private void addHideNodes(Node modelPath, Mapping mapping) {
- Node parent = ModelBuilder.getParentNode(modelPath);
+ Node parent = TemplatingModelBuilder.getParentNode(modelPath);
while (parent != null) {
- if (ModelBuilder.isCompositor(parent)) {
+ if (TemplatingModelBuilder.isCompositor(parent)) {
Element compositor = (Element) parent;
- int maxOccurs = ModelBuilder.getMaxOccurs(compositor);
+ int maxOccurs = TemplatingModelBuilder.getMaxOccurs(compositor);
int numElementsOnMappingPath = getNumElementsOnMappingPath(compositor);
if (numElementsOnMappingPath == maxOccurs) {
hideUnmappedPaths(compositor, mapping);
}
}
- parent = ModelBuilder.getParentNode(parent);
+ parent = TemplatingModelBuilder.getParentNode(parent);
}
}
@@ -224,7 +224,7 @@
Element nodeToHide = (Element) child;
if (!isOnMappingPath(nodeToHide)) {
mapping.addHideNode(nodeToHide);
- ModelBuilder.hideFragment(nodeToHide);
+ TemplatingModelBuilder.hideFragment(nodeToHide);
}
}
}
@@ -264,11 +264,11 @@
throw new InvalidMappingException(
"Unsupported XML target node mapping. Support XML elements and attributes only."); //$NON-NLS-1$
}
- if (ModelBuilder.NAMESPACE.equals(mappingNode.getNamespaceURI())) {
+ if (TemplatingModelBuilder.NAMESPACE.equals(mappingNode.getNamespaceURI())) {
throw new InvalidMappingException(
- "Unsupported XML target node mapping. Cannot map to a reserved model node from the '" + ModelBuilder.NAMESPACE + "' namespace."); //$NON-NLS-1$ //$NON-NLS-2$
+ "Unsupported XML target node mapping. Cannot map to a reserved model node from the '" + TemplatingModelBuilder.NAMESPACE + "' namespace."); //$NON-NLS-1$ //$NON-NLS-2$
}
- if (ModelBuilder.isHidden(mappingNode)) {
+ if (TemplatingModelBuilder.isHidden(mappingNode)) {
throw new InvalidMappingException(
"Illegal XML target node mapping for node '" + mappingNode + "'. This node (or one of it's ancestors) is hidden."); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -278,7 +278,7 @@
Element collectionElement = getNearestCollectionElement(mappingNode);
if (collectionElement != null) {
CollectionMapping parentCollectionMapping = getCollectionMapping(collectionElement);
- if (parentCollectionMapping == null && ModelBuilder.getEnforceCollectionSubMappingRules(collectionElement)) {
+ if (parentCollectionMapping == null && TemplatingModelBuilder.getEnforceCollectionSubMappingRules(collectionElement)) {
throw new UnmappedCollectionNodeException(collectionElement);
}
}
@@ -299,12 +299,12 @@
while (nextNode != null) {
if (nextNode.getNodeType() == Node.ELEMENT_NODE) {
- if(ModelBuilder.isCollection((Element) nextNode)) {
+ if(TemplatingModelBuilder.isCollection((Element) nextNode)) {
return (Element) nextNode;
}
}
- nextNode = ModelBuilder.getParentNode(nextNode);
+ nextNode = TemplatingModelBuilder.getParentNode(nextNode);
}
return null;
@@ -347,11 +347,11 @@
// it's attributes and
// child elements) i.e. it is not a parent of any of the mappings.
- if (ModelBuilder.isInReservedNamespace(element)) {
+ if (TemplatingModelBuilder.isInReservedNamespace(element)) {
return false;
- } else if (ModelBuilder.isHidden(element)) {
+ } else if (TemplatingModelBuilder.isHidden(element)) {
return false;
- } else if (ModelBuilder.getMinOccurs(element) == 0 && !isOnMappingPath(element)) {
+ } else if (TemplatingModelBuilder.getMinOccurs(element) == 0 && !isOnMappingPath(element)) {
return false;
}
@@ -375,7 +375,7 @@
if (element == pathNode) {
return true;
}
- pathNode = ModelBuilder.getParentNode(pathNode);
+ pathNode = TemplatingModelBuilder.getParentNode(pathNode);
}
}
@@ -404,8 +404,8 @@
if (child.getNodeType() == Node.ELEMENT_NODE) {
Node targetModelNode = modelNodeResolver.resolveNodeMapping(child);
- String srcPath = element.getAttributeNS(ModelBuilder.NAMESPACE, "srcPath"); //$NON-NLS-1$
- String collectionItemName = element.getAttributeNS(ModelBuilder.NAMESPACE, "collectionItemName"); //$NON-NLS-1$
+ String srcPath = element.getAttributeNS(TemplatingModelBuilder.NAMESPACE, "srcPath"); //$NON-NLS-1$
+ String collectionItemName = element.getAttributeNS(TemplatingModelBuilder.NAMESPACE, "collectionItemName"); //$NON-NLS-1$
addCollectionMapping(srcPath, (Element) targetModelNode, collectionItemName);
@@ -435,7 +435,7 @@
}
public static void writeListStart(StringWriter writer, String srcPath, String collectionItemName) {
- writer.write("<smk:list smk:srcPath=\"" + srcPath + "\" smk:collectionItemName=\"" + collectionItemName + "\" xmlns:smk=\"" + ModelBuilder.NAMESPACE + "\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ writer.write("<smk:list smk:srcPath=\"" + srcPath + "\" smk:collectionItemName=\"" + collectionItemName + "\" xmlns:smk=\"" + TemplatingModelBuilder.NAMESPACE + "\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
public static void writeListEnd(StringWriter writer) {
@@ -443,7 +443,7 @@
}
public static boolean isListElement(Element element) {
- if (ModelBuilder.isInReservedNamespace(element)) {
+ if (TemplatingModelBuilder.isInReservedNamespace(element)) {
if (DomUtils.getName(element).equals("list")) { //$NON-NLS-1$
return true;
}
@@ -473,7 +473,7 @@
public String getNamespaceURI(String prefix) {
if (prefix.equals("smk")) { //$NON-NLS-1$
- return ModelBuilder.NAMESPACE;
+ return TemplatingModelBuilder.NAMESPACE;
} else {
return namespaces.getProperty(prefix);
}
Modified: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilder.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilder.java 2010-06-04 07:28:16 UTC (rev 22538)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilder.java 2010-06-04 08:03:49 UTC (rev 22539)
@@ -26,7 +26,7 @@
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
-import org.jboss.tools.smooks.templating.model.ModelBuilder;
+import org.jboss.tools.smooks.templating.model.TemplatingModelBuilder;
import org.jboss.tools.smooks.templating.model.ModelBuilderException;
import org.jboss.tools.smooks.templating.template.*;
import org.jboss.tools.smooks.templating.template.exception.TemplateBuilderException;
@@ -59,7 +59,7 @@
* @param includeFieldNames True if field names are to be added at the start of the generated message, otherwise false.
* @throws ModelBuilderException Error building model.
*/
- public CSVFreeMarkerTemplateBuilder(ModelBuilder modelBuilder, char separatorChar, char quoteChar, boolean includeFieldNames) throws ModelBuilderException {
+ public CSVFreeMarkerTemplateBuilder(TemplatingModelBuilder modelBuilder, char separatorChar, char quoteChar, boolean includeFieldNames) throws ModelBuilderException {
super(modelBuilder);
this.separatorChar = separatorChar;
this.quoteChar = quoteChar;
@@ -77,7 +77,7 @@
* @throws ModelBuilderException Error building model.
* @throws TemplateBuilderException Error adding mappings extracted from template.
*/
- public CSVFreeMarkerTemplateBuilder(ModelBuilder modelBuilder, char separatorChar, char quoteChar, boolean includeFieldNames, String ftlTemplate) throws ModelBuilderException, TemplateBuilderException {
+ public CSVFreeMarkerTemplateBuilder(TemplatingModelBuilder modelBuilder, char separatorChar, char quoteChar, boolean includeFieldNames, String ftlTemplate) throws ModelBuilderException, TemplateBuilderException {
this(modelBuilder, separatorChar, quoteChar, includeFieldNames);
addMappings(ftlTemplate);
}
Modified: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/XMLFreeMarkerTemplateBuilder.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/XMLFreeMarkerTemplateBuilder.java 2010-06-04 07:28:16 UTC (rev 22538)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/XMLFreeMarkerTemplateBuilder.java 2010-06-04 08:03:49 UTC (rev 22539)
@@ -33,10 +33,10 @@
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import org.jboss.tools.smooks.templating.model.ModelBuilder;
+import org.jboss.tools.smooks.templating.model.TemplatingModelBuilder;
import org.jboss.tools.smooks.templating.model.ModelBuilderException;
import org.jboss.tools.smooks.templating.model.ModelNodeResolver;
-import org.jboss.tools.smooks.templating.model.ModelBuilder.ElementType;
+import org.jboss.tools.smooks.templating.model.TemplatingModelBuilder.ElementType;
import org.jboss.tools.smooks.templating.model.xml.XSDModelBuilder;
import org.jboss.tools.smooks.templating.template.*;
import org.jboss.tools.smooks.templating.template.exception.InvalidMappingException;
@@ -63,13 +63,13 @@
* <p/>
* This constructor is used when an existing template doesn't exist i.e. for creating new
* templates with a new set of mappings. When creating an {@link XMLFreeMarkerTemplateBuilder} instance to incorporate
- * mappings from an existing template, use the {@link #XMLFreeMarkerTemplateBuilder(ModelBuilder, String)}
+ * mappings from an existing template, use the {@link #XMLFreeMarkerTemplateBuilder(TemplatingModelBuilder, String)}
* constructor.
*
- * @param modelBuilder The {@link ModelBuilder} instance that describes the XML model (e.g. {@link XSDModelBuilder}).
- * @throws ModelBuilderException Invalid {@link ModelBuilder} instance.
+ * @param modelBuilder The {@link TemplatingModelBuilder} instance that describes the XML model (e.g. {@link XSDModelBuilder}).
+ * @throws ModelBuilderException Invalid {@link TemplatingModelBuilder} instance.
*/
- public XMLFreeMarkerTemplateBuilder(ModelBuilder modelBuilder) throws ModelBuilderException {
+ public XMLFreeMarkerTemplateBuilder(TemplatingModelBuilder modelBuilder) throws ModelBuilderException {
super(modelBuilder);
}
@@ -79,12 +79,12 @@
* Used to construct an {@link XMLFreeMarkerTemplateBuilder} instance to incorporate mappings from an
* existing FreeMarker template.
*
- * @param modelBuilder The {@link ModelBuilder} instance that describes the XML model (e.g. {@link XSDModelBuilder}).
+ * @param modelBuilder The {@link TemplatingModelBuilder} instance that describes the XML model (e.g. {@link XSDModelBuilder}).
* @param ftlTemplate FreeMarker template from which to extract existing {@link ValueMapping mappings}.
- * @throws ModelBuilderException Invalid {@link ModelBuilder} instance.
+ * @throws ModelBuilderException Invalid {@link TemplatingModelBuilder} instance.
* @throws TemplateBuilderException Error processing FreeMarker template.
*/
- public XMLFreeMarkerTemplateBuilder(ModelBuilder modelBuilder, String ftlTemplate) throws ModelBuilderException, TemplateBuilderException {
+ public XMLFreeMarkerTemplateBuilder(TemplatingModelBuilder modelBuilder, String ftlTemplate) throws ModelBuilderException, TemplateBuilderException {
super(modelBuilder);
addMappings(ftlTemplate);
}
@@ -125,7 +125,7 @@
*/
private void writeElement(Element element, int indent, boolean addNewline, Writer templateWriter) {
try {
- if(ModelBuilder.isInReservedNamespace(element)) {
+ if(TemplatingModelBuilder.isInReservedNamespace(element)) {
writeElementChildren(element, indent, templateWriter);
} else if(assertAddNodeToTemplate(element)) {
if(addNewline) {
@@ -171,12 +171,12 @@
for(int i = 0; i < attributes.getLength(); i++) {
Attr attribute = (Attr) attributes.item(i);
- if(!ModelBuilder.isInReservedNamespace(attribute)) {
+ if(!TemplatingModelBuilder.isInReservedNamespace(attribute)) {
Mapping mapping = getMapping(attribute);
if(mapping != null) {
writeAttribute(attribute.getNodeName(), FreeMarkerUtil.toFreeMarkerVariable((ValueMapping)mapping), templateWriter); //$NON-NLS-1$
- } else if(ModelBuilder.isRequired(attribute)) {
+ } else if(TemplatingModelBuilder.isRequired(attribute)) {
writeAttribute(attribute.getNodeName(), attribute.getValue(), templateWriter);
}
}
@@ -213,16 +213,16 @@
if(children.getLength() == 0) {
Mapping mapping = getMapping(element);
- if(ModelBuilder.getElementType(element) == ElementType.simple) {
+ if(TemplatingModelBuilder.getElementType(element) == ElementType.simple) {
templateWriter.write(">"); //$NON-NLS-1$
if(mapping != null) {
templateWriter.write(FreeMarkerUtil.toFreeMarkerVariable((ValueMapping)mapping));
} else {
- templateWriter.write(ModelBuilder.REQUIRED);
+ templateWriter.write(TemplatingModelBuilder.REQUIRED);
}
}
} else {
- if(!ModelBuilder.isInReservedNamespace(element)) {
+ if(!TemplatingModelBuilder.isInReservedNamespace(element)) {
templateWriter.write(">"); //$NON-NLS-1$
}
for(int i = 0; i < children.getLength(); i++) {
@@ -232,7 +232,7 @@
numElementsWritten++;
}
}
- if(!ModelBuilder.isInReservedNamespace(element)) {
+ if(!TemplatingModelBuilder.isInReservedNamespace(element)) {
templateWriter.write('\n'); //$NON-NLS-1$
}
}
@@ -241,7 +241,7 @@
}
private void writeElementEnd(Element element, boolean hasChildren, Writer templateWriter) throws IOException {
- if(hasChildren || ModelBuilder.getElementType(element) == ElementType.simple) {
+ if(hasChildren || TemplatingModelBuilder.getElementType(element) == ElementType.simple) {
templateWriter.write("</"); //$NON-NLS-1$
templateWriter.write(element.getNodeName());
templateWriter.write(">"); //$NON-NLS-1$
@@ -295,7 +295,7 @@
private void addMappings(Element element, ModelNodeResolver modelNodeResolver) throws TemplateBuilderException {
if(TemplateBuilder.isListElement(element)) {
addCollectionMapping(element, modelNodeResolver);
- } else if(!ModelBuilder.isInReservedNamespace(element)) {
+ } else if(!TemplatingModelBuilder.isInReservedNamespace(element)) {
String elementText = DomUtils.getAllText(element, false);
// Handle the element itself...
@@ -309,7 +309,7 @@
for(int i = 0; i < attribCount; i++) {
Attr attribute = (Attr) attributes.item(i);
- if(!ModelBuilder.isInReservedNamespace(attribute)) {
+ if(!TemplatingModelBuilder.isInReservedNamespace(attribute)) {
String attrValue = attribute.getValue();
if(FreeMarkerUtil.isDollarVariable(attrValue)) {
Modified: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerAttrModel.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerAttrModel.java 2010-06-04 07:28:16 UTC (rev 22538)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerAttrModel.java 2010-06-04 08:03:49 UTC (rev 22539)
@@ -15,7 +15,7 @@
import org.jboss.tools.smooks.configuration.editors.xml.AbstractXMLObject;
import org.jboss.tools.smooks.configuration.editors.xml.TagPropertyObject;
-import org.jboss.tools.smooks.templating.model.ModelBuilder;
+import org.jboss.tools.smooks.templating.model.TemplatingModelBuilder;
import org.jboss.tools.smooks.templating.template.Mapping;
import org.jboss.tools.smooks.templating.template.ValueMapping;
import org.jboss.tools.smooks.templating.template.TemplateBuilder;
@@ -47,7 +47,7 @@
public boolean isRequired() {
Attr element = this.getReferenceAttibute();
if (element != null) {
- return ModelBuilder.isRequired(element);
+ return TemplatingModelBuilder.isRequired(element);
}
return false;
}
Modified: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerModelAnalyzer.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerModelAnalyzer.java 2010-06-04 07:28:16 UTC (rev 22538)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerModelAnalyzer.java 2010-06-04 08:03:49 UTC (rev 22539)
@@ -24,7 +24,7 @@
import org.jboss.tools.smooks.configuration.editors.xml.TagObject;
import org.jboss.tools.smooks.configuration.editors.xml.TagPropertyObject;
import org.jboss.tools.smooks.configuration.editors.xml.XMLUtils;
-import org.jboss.tools.smooks.templating.model.ModelBuilder;
+import org.jboss.tools.smooks.templating.model.TemplatingModelBuilder;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -120,7 +120,7 @@
if (element != null) {
Node parentNode = element.getParentNode();
if (parentNode instanceof Element) {
- if (ModelBuilder.isCompositor(parentNode)) {
+ if (TemplatingModelBuilder.isCompositor(parentNode)) {
return true;
}
}
@@ -134,7 +134,7 @@
return null;
boolean canAdd = false;
TagObject tag = null;
- if (ModelBuilder.isCompositor(element)) {
+ if (TemplatingModelBuilder.isCompositor(element)) {
tag = parentTag;
} else {
tag = getChildTagByName(element.getNodeName(), parentTag, ignoreNodeNames);
@@ -207,7 +207,7 @@
localName = name;
}
- if(ModelBuilder.isInReservedNamespace(attr)) {
+ if(TemplatingModelBuilder.isInReservedNamespace(attr)) {
continue;
}
Modified: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerTemplateModelLabelProvider.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerTemplateModelLabelProvider.java 2010-06-04 07:28:16 UTC (rev 22538)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerTemplateModelLabelProvider.java 2010-06-04 08:03:49 UTC (rev 22539)
@@ -15,7 +15,7 @@
import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
import org.jboss.tools.smooks.configuration.editors.GraphicsConstants;
import org.jboss.tools.smooks.configuration.editors.xml.XMLStructuredDataLabelProvider;
-import org.jboss.tools.smooks.templating.model.ModelBuilder;
+import org.jboss.tools.smooks.templating.model.TemplatingModelBuilder;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -41,7 +41,7 @@
}
Node modelNode = ((FreemarkerTemplateXMLModel) element).getModelNode();
if (((FreemarkerTemplateXMLModel) element).isManyOccurs()) {
- if(modelNode instanceof Element && ModelBuilder.getEnforceCollectionSubMappingRules((Element) modelNode)) {
+ if(modelNode instanceof Element && TemplatingModelBuilder.getEnforceCollectionSubMappingRules((Element) modelNode)) {
return imageRegistry.get(GraphicsConstants.IMAGE_XSL_FOREACH);
}
}
Modified: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerTemplateXMLModel.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerTemplateXMLModel.java 2010-06-04 07:28:16 UTC (rev 22538)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerTemplateXMLModel.java 2010-06-04 08:03:49 UTC (rev 22539)
@@ -17,7 +17,7 @@
import org.jboss.tools.smooks.configuration.editors.xml.AbstractXMLObject;
import org.jboss.tools.smooks.configuration.editors.xml.TagObject;
import org.jboss.tools.smooks.configuration.editors.xml.TagPropertyObject;
-import org.jboss.tools.smooks.templating.model.ModelBuilder;
+import org.jboss.tools.smooks.templating.model.TemplatingModelBuilder;
import org.jboss.tools.smooks.templating.template.Mapping;
import org.jboss.tools.smooks.templating.template.ValueMapping;
import org.jboss.tools.smooks.templating.template.TemplateBuilder;
@@ -67,7 +67,7 @@
return false;
}
if (element != null) {
- return ModelBuilder.isRequired(element);
+ return TemplatingModelBuilder.isRequired(element);
}
return false;
}
@@ -75,7 +75,7 @@
public boolean isManyOccurs() {
Element refElement = this.getReferenceElement();
if (refElement != null) {
- return ModelBuilder.isCollection(refElement);
+ return TemplatingModelBuilder.isCollection(refElement);
}
return false;
}
Modified: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanChildGraphModel.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanChildGraphModel.java 2010-06-04 07:28:16 UTC (rev 22538)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanChildGraphModel.java 2010-06-04 08:03:49 UTC (rev 22539)
@@ -56,7 +56,7 @@
import org.jboss.tools.smooks.model.javabean12.Javabean12Package;
import org.jboss.tools.smooks.model.javabean12.ValueType;
import org.jboss.tools.smooks.model.javabean12.WiringType;
-import org.jboss.tools.smooks.templating.model.ModelBuilder;
+import org.jboss.tools.smooks.templating.model.TemplatingModelBuilder;
import org.jboss.tools.smooks.templating.template.TemplateBuilder;
import org.jboss.tools.smooks.templating.template.ValueMapping;
import org.w3c.dom.Element;
@@ -179,7 +179,7 @@
if (iFreemarkerTemplateModel.isManyOccurs() && pgm.getTargetConnections().isEmpty()) {
Node modelNode = iFreemarkerTemplateModel.getModelNode();
if (modelNode instanceof Element) {
- return !ModelBuilder.getEnforceCollectionSubMappingRules((Element) modelNode);
+ return !TemplatingModelBuilder.getEnforceCollectionSubMappingRules((Element) modelNode);
} else {
return false;
}
Modified: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/template/FreemarkerTemplateContentGraphModelProviderImpl.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/template/FreemarkerTemplateContentGraphModelProviderImpl.java 2010-06-04 07:28:16 UTC (rev 22538)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/template/FreemarkerTemplateContentGraphModelProviderImpl.java 2010-06-04 08:03:49 UTC (rev 22539)
@@ -33,7 +33,7 @@
import org.jboss.tools.smooks.graphical.editors.model.freemarker.FreemarkerTemplateXMLModel;
import org.jboss.tools.smooks.graphical.editors.model.freemarker.FreemarkerXMLNodeGraphicalModel;
import org.jboss.tools.smooks.model.freemarker.Freemarker;
-import org.jboss.tools.smooks.templating.model.ModelBuilder;
+import org.jboss.tools.smooks.templating.model.TemplatingModelBuilder;
import org.jboss.tools.smooks.templating.model.ModelBuilderException;
import org.jboss.tools.smooks.templating.model.csv.CSVModelBuilder;
import org.jboss.tools.smooks.templating.model.xml.XMLSampleModelBuilder;
@@ -147,7 +147,7 @@
String filePath = SmooksModelUtils.getFreemarkerXMLFilePath(freemarker);
String rootName = SmooksModelUtils.getFreemarkerXMLRootName(freemarker);
String newFilePath = SmooksUIUtils.parseFilePath(filePath);
- ModelBuilder builder;
+ TemplatingModelBuilder builder;
if (SmooksModelUtils.KEY_XML_FILE_TYPE_XSD.equals(fileType)) {
builder = new XSDModelBuilder(URI.createFileURI(newFilePath));
Modified: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/template/SmooksFreemarkerTemplateGraphicalEditor.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/template/SmooksFreemarkerTemplateGraphicalEditor.java 2010-06-04 07:28:16 UTC (rev 22538)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/template/SmooksFreemarkerTemplateGraphicalEditor.java 2010-06-04 08:03:49 UTC (rev 22539)
@@ -29,7 +29,7 @@
import org.jboss.tools.smooks.graphical.editors.model.freemarker.FreemarkerTemplateGraphicalModel;
import org.jboss.tools.smooks.graphical.editors.model.freemarker.IFreemarkerTemplateModel;
import org.jboss.tools.smooks.model.freemarker.Freemarker;
-import org.jboss.tools.smooks.templating.model.ModelBuilder;
+import org.jboss.tools.smooks.templating.model.TemplatingModelBuilder;
import org.jboss.tools.smooks.templating.template.TemplateBuilder;
import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
import org.w3c.dom.Element;
@@ -163,7 +163,7 @@
if (data instanceof IFreemarkerTemplateModel) {
Node modelNode = ((IFreemarkerTemplateModel) data).getModelNode();
if(modelNode instanceof Element) {
- return ModelBuilder.getEnforceCollectionSubMappingRules((Element) modelNode);
+ return TemplatingModelBuilder.getEnforceCollectionSubMappingRules((Element) modelNode);
}
}
return true;
14 years, 7 months
JBoss Tools SVN: r22538 - in trunk/ws: plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2010-06-04 03:28:16 -0400 (Fri, 04 Jun 2010)
New Revision: 22538
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSWizardTest.java
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data/ServiceModel.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/WSDL2JavaCodeGenConfigWidget.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/JBossWSProjectFacetBotTest.java
Log:
JBIDE-6250: fix and create bot test to trunk
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommand.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommand.java 2010-06-04 02:28:26 UTC (rev 22537)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/WSDL2JavaCommand.java 2010-06-04 07:28:16 UTC (rev 22538)
@@ -4,7 +4,6 @@
import java.util.List;
import org.jboss.tools.ws.creation.core.data.ServiceModel;
-import org.jboss.tools.ws.creation.core.utils.JBossWSCreationUtils;
public class WSDL2JavaCommand extends AbstractGenerateCodeCommand{
@@ -56,7 +55,7 @@
command.add(model.getTarget());
}
- if(model.enableSOAP12() && JBossWSCreationUtils.supportSOAP12(model.getWebProjectName())){
+ if(model.enableSOAP12()){
command.add("-e"); //$NON-NLS-1$
}
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data/ServiceModel.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data/ServiceModel.java 2010-06-04 02:28:26 UTC (rev 22537)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data/ServiceModel.java 2010-06-04 07:28:16 UTC (rev 22538)
@@ -18,7 +18,7 @@
private boolean isGenWSDL;
private String target;
private int wsScenario;
- private boolean extension;
+ private boolean extension = true;
private String serviceName;
private String customClassName;
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2010-06-04 02:28:26 UTC (rev 22537)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2010-06-04 07:28:16 UTC (rev 22538)
@@ -21,7 +21,7 @@
Label_Binding_File=Binding files
Label_JaxWS_Target=JAX-WS specification
Label_Update_Webxml=Update the default Web.xml
-Label_EnableSOAP12_Binding_Extension=Enable SOAP 1.2 binding extension (This option is only available for JBossWS 3.0 or later)
+Label_EnableSOAP12_Binding_Extension=Enable binding extension support (Only available for JBossWS 3.0 or later)
Label_Button_Text_Remove=Remove
Progress_Message_Generating=Generating Web Service resources...
Client_Sample_Run_Over= Call Over!
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/WSDL2JavaCodeGenConfigWidget.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/WSDL2JavaCodeGenConfigWidget.java 2010-06-04 02:28:26 UTC (rev 22537)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/widgets/WSDL2JavaCodeGenConfigWidget.java 2010-06-04 07:28:16 UTC (rev 22538)
@@ -215,7 +215,7 @@
});
}
- // enable enable soap12 checkbox if the target jbossws runtime is less
+ // select soap12 checkbox if the target jbossws runtime is more
// than 3.0
updateExtensionButtonStatus();
@@ -223,8 +223,9 @@
}
private void updateExtensionButtonStatus() {
- btnExtension.setEnabled(JBossWSCreationUtils.supportSOAP12(model
- .getWebProjectName()));
+ boolean a = JBossWSCreationUtils.supportSOAP12(model.getWebProjectName());
+ btnExtension.setEnabled(a);
+ btnExtension.setSelection(a);
}
private void loadBindingFiles(List bindingList) {
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF 2010-06-04 02:28:26 UTC (rev 22537)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF 2010-06-04 07:28:16 UTC (rev 22538)
@@ -15,10 +15,12 @@
org.eclipse.swtbot.junit4_x;bundle-version="2.0.0",
org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
org.eclipse.ui.ide;bundle-version="3.5.1",
- org.eclipse.ui.forms;bundle-version="3.4.1",
+ org.eclipse.ui.forms;bundle-version="3.4.1",
org.junit4;bundle-version="4.5.0",
org.jboss.tools.ws.ui;bundle-version="1.1.0",
- org.eclipse.core.resources
+ org.eclipse.core.resources,
+ org.jboss.tools.tests,
+ org.eclipse.wst.common.project.facet.core
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Eclipse-RegisterBuddy: org.apache.log4j
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/JBossWSProjectFacetBotTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/JBossWSProjectFacetBotTest.java 2010-06-04 02:28:26 UTC (rev 22537)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/JBossWSProjectFacetBotTest.java 2010-06-04 07:28:16 UTC (rev 22538)
@@ -2,106 +2,95 @@
import java.io.IOException;
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebServicesWSDL;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
-public class JBossWSProjectFacetBotTest extends TestCase {
- private static SWTWorkbenchBot bot;
- private static final String JBOSSWS_HOME_DEFAULT = "D:/softinstall/jboss-5.1.0.GA";
- public static final String JBOSSWS_42_HOME = "jbosstools.test.jboss.home.5.1";
- public static final String JBOSS_AS_42_HOME = System.getProperty(
- JBOSSWS_42_HOME, JBOSSWS_HOME_DEFAULT);
- private IProject project;
+public class JBossWSProjectFacetBotTest extends WSWizardTest {
- protected void setUp() throws Exception {
- bot = new SWTWorkbenchBot();
- bot.viewByTitle("Welcome").close();
- createServerRuntime();
- }
-
public void testNewWizard() throws IOException, CoreException {
bot.menu("File").menu("New").menu("Project...").click();
bot.shell("New Project").activate();
- SWTBotTree tree = bot.tree();
+ SWTBotTree tree = bot.tree();
tree.expandNode("Web").expandNode("Dynamic Web Project").select();
- assertTrue(bot.button("Next >").isEnabled());
- bot.button("Next >").click();
- bot.shell("New Dynamic Web Project").activate();
- assertFalse(bot.button("Finish").isEnabled());
-
- bot.textWithLabel("Project name:").setText("A");
- assertTrue(bot.button("Finish").isEnabled());
- bot.comboBoxInGroup("Dynamic web module version").setSelection("2.5");
- bot.comboBoxInGroup("Configuration").setSelection("JBossWS Web Service Project v3.0");
- assertFalse(bot.button("Finish").isEnabled());
- bot.button("Next >").click();
- bot.button("Next >").click();
- bot.button("Next >").click();
- bot.radio(0).click();
- bot.sleep(6000);
- assertTrue(bot.button("Finish").isEnabled());
- bot.button("Finish").click();
-
- project = ResourcesPlugin.getWorkspace().getRoot().getProject("A");
- assertNotNull(project);
-
- }
+ assertTrue(bot.button("Next >").isEnabled());
+ bot.button("Next >").click();
+ bot.shell("New Dynamic Web Project").activate();
+ assertFalse(bot.button("Finish").isEnabled());
- protected void tearDown() throws Exception {
- bot = null;
+ bot.textWithLabel("Project name:").setText("B");
+ assertTrue(bot.button("Finish").isEnabled());
+ bot.comboBoxInGroup("Dynamic web module version").setSelection("2.5");
+ bot.comboBoxInGroup("Configuration").setSelection(
+ "JBossWS Web Service Project v3.0");
+ assertFalse(bot.button("Finish").isEnabled());
+ bot.button("Next >").click();
+ bot.button("Next >").click();
+ bot.button("Next >").click();
+ bot.radio(0).click();
+ bot.sleep(2000);
+ assertTrue(bot.button("Finish").isEnabled());
+ open.finish(bot);
+ project = ResourcesPlugin.getWorkspace().getRoot().getProject("B");
+ assertNotNull(project);
+ IFacetedProject fproj = ProjectFacetsManager.create(project);
+ assertNotNull(fproj
+ .getProjectFacetVersion((IProjectFacet) ProjectFacetsManager
+ .getProjectFacet("jbossws.core")));
+ tryJBIDE6250();
}
- protected void createServerRuntime() {
- if (!isServerRuntimeDefined(bot, "AS4.2Runtime")) {
- bot.menu("File").menu("New").menu("Other...").click();
- bot.shell("New").activate();
- SWTBotTree tree = bot.tree();
+ private void tryJBIDE6250() {
+ setDefaultWSRuntime();
+
+ SWTBot wiz = open.newObject(WebServicesWSDL.LABEL);
+ wiz.textWithLabel(WebServicesWSDL.TEXT_FILE_NAME).setText(
+ "ClassB" + ".wsdl");
+ wiz.textWithLabel(
+ WebServicesWSDL.TEXT_ENTER_OR_SELECT_THE_PARENT_FOLDER)
+ .setText("B");
+ wiz.button(IDELabel.Button.NEXT).click();
+ open.finish(wiz);
+ eclipse.setClassContentFromResource(bot.editorByTitle("ClassB"
+ + ".wsdl"), true,
+ org.jboss.tools.ws.ui.bot.test.Activator.PLUGIN_ID,
+ "jbossws", "ClassB" + ".wsdl");
+
+ bot.sleep(1000);
+ bot.menu("File").menu("New").menu("Other...").click();
+ bot.shell("New").activate();
+
+ SWTBotTree tree = bot.tree();
+ SWTBotTreeItem item = tree.getTreeItem("Web Services");
+ tree.select(item);
+ item.expand();
+ try {
+ item.getNode("Web Service").select();
+ } catch (Exception e) {
+ item.collapse();
+ item.expand();
+ item.getNode("Web Service").select();
+ }
+ bot.sleep(1000);
+ assertTrue(bot.button("Next >").isEnabled());
+ bot.button("Next >").click();
+ bot.shell("Web Service").activate();
+ bot.comboBoxWithLabel("Web service type:").setSelection(1);
+ bot.comboBoxWithLabel("Service definition:").setText(
+ "/B/ClassB.wsdl");
+ while (!bot.button("Next >").isEnabled()) {
bot.sleep(1000);
- tree.expandNode("Server").select("Server");
- bot.button("Next >").click();
- SWTBotTree tree2 = bot.tree();
- tree2.expandNode("JBoss Community").select("JBoss AS 5.1");
- bot.textWithLabel("Server name:").setText("AS4.2Server");
- bot.button("Next >").click();
- bot.textWithLabel("Name").setText("AS4.2Runtime");
- bot.textWithLabel("Home Directory").setText(JBOSS_AS_42_HOME);
- bot.button("Finish").click();
- bot.sleep(2000);
}
+ selectProject();
+ bot.button("Next >").click();
+ bot.sleep(1000);
+ assertTrue(bot.checkBox(0).isChecked());
}
-
- public static boolean isServerRuntimeDefined(SWTWorkbenchBot bot,
- String runtimeName) {
-
- boolean serverRuntimeNotDefined = true;
-
- bot.menu("Window").menu("Preferences").click();
- bot.shell("Preferences").activate();
- bot.tree().expandNode("Server").select("Runtime Environments");
-
- SWTBotTable tbRuntimeEnvironments = bot.table();
- int numRows = tbRuntimeEnvironments.rowCount();
- if (numRows > 0) {
- int currentRow = 0;
- while (serverRuntimeNotDefined && currentRow < numRows) {
- if (tbRuntimeEnvironments.cell(currentRow, 0).equalsIgnoreCase(
- runtimeName)) {
- serverRuntimeNotDefined = false;
- } else {
- currentRow++;
- }
- }
- }
-
- bot.button("OK").click();
-
- return !serverRuntimeNotDefined;
-
- }
}
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSWizardTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSWizardTest.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSWizardTest.java 2010-06-04 07:28:16 UTC (rev 22538)
@@ -0,0 +1,115 @@
+package org.jboss.tools.ws.ui.bot.test;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.test.util.TestProjectProvider;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
+import org.jboss.tools.ui.bot.ext.SWTOpenExt;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotHyperlinkExt;
+
+public class WSWizardTest extends TestCase{
+ protected static SWTBotExt bot = new SWTBotExt();
+ public static final SWTOpenExt open = new SWTOpenExt(bot);
+ public static final SWTEclipseExt eclipse = new SWTEclipseExt(bot);
+ public static final String JBOSSWS_HOME_DEFAULT = "D:/softinstall/jboss-5.1.0.GA";
+ public static final String JBOSSWS_42_HOME = "jbosstools.test.jboss.home.5.1";
+ public static final String JBOSS_AS_42_HOME = System.getProperty(
+ JBOSSWS_42_HOME, JBOSSWS_HOME_DEFAULT);
+ IProject project;
+
+ protected void setUp() throws Exception {
+ bot.viewByTitle("Welcome").close();
+ bot.perspectiveByLabel("Java EE").activate();
+ createServerRuntime();
+ }
+ protected void tearDown() throws Exception {
+ bot = null;
+ }
+
+ public void createServerRuntime() {
+ if (!isServerRuntimeDefined(bot, "AS4.2Runtime")) {
+ bot.menu("File").menu("New").menu("Other...").click();
+ bot.shell("New").activate();
+ SWTBotTree tree = bot.tree();
+ bot.sleep(1000);
+ tree.expandNode("Server").select("Server");
+ bot.button("Next >").click();
+ SWTBotTree tree2 = bot.tree();
+ tree2.expandNode("JBoss Community").select("JBoss AS 5.1");
+ bot.textWithLabel("Server name:").setText("AS4.2Server");
+ bot.button("Next >").click();
+ bot.textWithLabel("Name").setText("AS4.2Runtime");
+ bot.textWithLabel("Home Directory").setText(JBOSS_AS_42_HOME);
+ bot.button("Finish").click();
+ bot.sleep(2000);
+ }
+ }
+
+ public static boolean isServerRuntimeDefined(SWTWorkbenchBot bot,
+ String runtimeName) {
+
+ boolean serverRuntimeNotDefined = true;
+
+ bot.menu("Window").menu("Preferences").click();
+ bot.shell("Preferences").activate();
+ bot.tree().expandNode("Server").select("Runtime Environments");
+
+ SWTBotTable tbRuntimeEnvironments = bot.table();
+ int numRows = tbRuntimeEnvironments.rowCount();
+ if (numRows > 0) {
+ int currentRow = 0;
+ while (serverRuntimeNotDefined && currentRow < numRows) {
+ if (tbRuntimeEnvironments.cell(currentRow, 0).equalsIgnoreCase(
+ runtimeName)) {
+ serverRuntimeNotDefined = false;
+ } else {
+ currentRow++;
+ }
+ }
+ }
+
+ bot.button("OK").click();
+
+ return !serverRuntimeNotDefined;
+
+ }
+
+
+ public IProject importProject() throws CoreException, IOException, InvocationTargetException, InterruptedException {
+ TestProjectProvider provider = new TestProjectProvider("org.jboss.tools.ws.ui.bot.test", "/projects/" + "A",
+ "A", true);
+ IProject prj = provider.getProject();
+ return prj;
+ }
+
+ public void selectProject() {
+ SWTBotHyperlinkExt link = bot.hyperlink(2);
+ if(!"Service project: B".equals(link.getText())){
+ link.click();
+
+ SWTBot dBot = bot.activeShell().bot();
+ dBot.comboBoxWithLabel("Service project:").setText("B");
+ dBot.button("OK").click();
+ dBot.sleep(1000);
+ }
+ }
+ public void setDefaultWSRuntime(){
+ bot.menu("Window").menu("Preferences").click();
+ bot.shell("Preferences").activate();
+ SWTBotTree tree = bot.tree();
+ tree.expandNode("Web Services").expandNode("Server and Runtime").select();
+ bot.comboBoxWithLabel("Web service runtime:").setSelection("JBossWS");
+ bot.button("OK").click();
+ bot.sleep(2000);
+ }
+}
Property changes on: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSWizardTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 7 months
JBoss Tools SVN: r22537 - trunk/documentation/guides/JBDS_Release_Notes/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-06-03 22:28:26 -0400 (Thu, 03 Jun 2010)
New Revision: 22537
Modified:
trunk/documentation/guides/JBDS_Release_Notes/en-US/master.xml
Log:
updated master file to fix build error
Modified: trunk/documentation/guides/JBDS_Release_Notes/en-US/master.xml
===================================================================
--- trunk/documentation/guides/JBDS_Release_Notes/en-US/master.xml 2010-06-04 00:50:17 UTC (rev 22536)
+++ trunk/documentation/guides/JBDS_Release_Notes/en-US/master.xml 2010-06-04 02:28:26 UTC (rev 22537)
@@ -42,6 +42,6 @@
<!-- &NewFeatures; -->
&ComponentVersions;
&FixedIssues;
- &KnownIssues;
+<!-- &KnownIssues; -->
</article>
14 years, 7 months
JBoss Tools SVN: r22536 - trunk/documentation/guides/JBDS_Release_Notes/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-06-03 20:50:17 -0400 (Thu, 03 Jun 2010)
New Revision: 22536
Modified:
trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
trunk/documentation/guides/JBDS_Release_Notes/en-US/Known_Issues.xml
trunk/documentation/guides/JBDS_Release_Notes/en-US/Release_Notes.xml
Log:
updated to take 1222 from known issues to fixed
Modified: trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
===================================================================
--- trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-06-04 00:44:40 UTC (rev 22535)
+++ trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-06-04 00:50:17 UTC (rev 22536)
@@ -214,6 +214,11 @@
<ulink url="http://jira.jboss.com/jira/browse/JBDS-1168">JBDS-1168</ulink>: The JBoss Developer Studio Installer was missleading in terms of system requirements. The consequence of this was that some users were unsure if the JBoss Developer Studio supported Java 6 even though it was required for the JBoss Enterprise Application Platform 5 and which JDK distributions were supported. The text in Step 4 of installation has been updated to inform the user that the JBoss Developer Studio works with both Java 5 and 6 (though Java 6 is required for JBoss Enterprise Application Platform 5), has been tested with the OpenJDK, SunJDK and IBM JDK distributions and the misspelt <emphasis>gij Java</emphasis> has been corrected to <emphasis>gcj Java</emphasis>.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="https://jira.jboss.org/jira/browse/JBDS-1222">JBDS-1222</ulink>: A bug existed in the JBoss Developer Studio that caused stylesheets to not render correctly in the JBoss Enterprise Application Platform 5 and a <exceptionname>org.ajax4jsf.resource.ResourceNotFoundException: Static resource not found for path <resource name></exceptionname> exception when using the JBoss Enterprise Portal Platform 5 to load a JSF page through a Portlet. These errors were caused by the code to load the style sheet being: <code><a:loadStyle src="resource:///stylesheet/theme.xcss"/></code> instead of <code><a:loadStyle src="/stylesheet/theme.xcss"/></code>. This issue has now been corrected for this release.
+ </para>
+ </listitem>
<!-- Reopened <listitem>
<para>
<ulink url="http://jira.jboss.com/jira/browse/JBDS-1147">JBDS-1147</ulink>: An incorrect link to the Guvnor Rules repository was included in the JBoss Developer Studio. This bug caused the repository to become unreachable. This has been fixed by correcting the link to be <ulink url="http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav">http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav</ulink>. The JBoss Developer Studio is now able to connect to the Guvnor Rules repository.
Modified: trunk/documentation/guides/JBDS_Release_Notes/en-US/Known_Issues.xml
===================================================================
--- trunk/documentation/guides/JBDS_Release_Notes/en-US/Known_Issues.xml 2010-06-04 00:44:40 UTC (rev 22535)
+++ trunk/documentation/guides/JBDS_Release_Notes/en-US/Known_Issues.xml 2010-06-04 00:50:17 UTC (rev 22536)
@@ -10,19 +10,7 @@
<title>General Known Issues</title>
<para>
<itemizedlist>
- <listitem>
- <para>
- <ulink url="https://jira.jboss.org/jira/browse/JBDS-1222">JBDS-1222</ulink>: A bug exists in the JBoss Developer Studio that causes stylesheets to not render correctly in the JBoss Enterprise Application Platform 5 and a <exceptionname>org.ajax4jsf.resource.ResourceNotFoundException: Static resource not found for path <resource name></exceptionname> exception when using the JBoss Enterprise Portal Platform 5 to load a JSF page through a Portlet. These errors are caused by the code to load the style sheet being: <code><a:loadStyle src="resource:///stylesheet/theme.xcss"/></code> instead of <code><a:loadStyle src="/stylesheet/theme.xcss"/></code>.
- </para>
- <para>
- The current workaround for this issue is to manually remove the code <code>resource://</code> from the beginning of the stylesheet location.
- </para>
- <note>
- <para>
- This issue does not present in the JBoss Enterprise Application Platform 4.3 because of a bug that exists in it that hides this issue.
- </para>
- </note>
- </listitem>
+
</itemizedlist>
</para>
</formalpara>
Modified: trunk/documentation/guides/JBDS_Release_Notes/en-US/Release_Notes.xml
===================================================================
--- trunk/documentation/guides/JBDS_Release_Notes/en-US/Release_Notes.xml 2010-06-04 00:44:40 UTC (rev 22535)
+++ trunk/documentation/guides/JBDS_Release_Notes/en-US/Release_Notes.xml 2010-06-04 00:50:17 UTC (rev 22536)
@@ -7,6 +7,6 @@
<xi:include href="Component_Versions.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="Updating_to_the_new_Web_Tools_Platform_packages.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="Fixed_Issues.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
- <xi:include href="Known_Issues.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<!-- <xi:include href="Known_Issues.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include> -->
<xi:include href="Revision_History.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
</article>
14 years, 7 months
JBoss Tools SVN: r22535 - in trunk/archives/tests/org.jboss.ide.eclipse.archives.test: libs and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-06-03 20:44:40 -0400 (Thu, 03 Jun 2010)
New Revision: 22535
Added:
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/libs/
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/libs/some.jar
Modified:
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/build.properties
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTruezipBridgeTest.java
Log:
https://jira.jboss.org/browse/JBDS-1202 problems running tests
archives.test freeze fix
Modified: trunk/archives/tests/org.jboss.ide.eclipse.archives.test/build.properties
===================================================================
--- trunk/archives/tests/org.jboss.ide.eclipse.archives.test/build.properties 2010-06-03 22:35:23 UTC (rev 22534)
+++ trunk/archives/tests/org.jboss.ide.eclipse.archives.test/build.properties 2010-06-04 00:44:40 UTC (rev 22535)
@@ -4,7 +4,8 @@
inputs/,\
expectedOutputs/,\
tmp/,\
- plugin.properties
+ plugin.properties,\
+ libs/
jars.compile.order = .
source.. = src/
output.. = bin/
Added: trunk/archives/tests/org.jboss.ide.eclipse.archives.test/libs/some.jar
===================================================================
(Binary files differ)
Property changes on: trunk/archives/tests/org.jboss.ide.eclipse.archives.test/libs/some.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTruezipBridgeTest.java
===================================================================
--- trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTruezipBridgeTest.java 2010-06-03 22:35:23 UTC (rev 22534)
+++ trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTruezipBridgeTest.java 2010-06-04 00:44:40 UTC (rev 22535)
@@ -65,7 +65,7 @@
}
proj = ResourcesUtils.importProject("org.jboss.ide.eclipse.archives.test", "/inputs/projects/GenericProject");
- proj.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+// proj.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
}
protected void tearDown() throws Exception {
ResourcesUtils.deleteProject(proj.getName());
@@ -252,42 +252,26 @@
IClasspathEntry e =
JavaCore.newLibraryEntry(new Path(file.getAbsolutePath()), null, null);
JavaModelManager.getUserLibraryManager().setUserLibrary(
- "userLibTest", new IClasspathEntry[] { e }, false);
- try {
- IArchive zipped = createArchive("zipped.war", new Path(proj.getName()).append("outputs").makeAbsolute().toString());
- zipped.setInWorkspace(true);
- zipped.setExploded(false);
- ModelTruezipBridge.createFile(zipped);
- File zippedF = proj.getLocation().append("outputs").append("zipped.war").toFile();
- assertTrue(zippedF.exists());
- assertTrue(!zippedF.isDirectory());
+ "userLibTest", new IClasspathEntry[] { e }, false);
+ IArchive zipped = createArchive("zipped.war", new Path(proj.getName()).append("outputs").makeAbsolute().toString());
+ zipped.setInWorkspace(true);
+ zipped.setExploded(false);
+ ModelTruezipBridge.createFile(zipped);
+ File zippedF = proj.getLocation().append("outputs").append("zipped.war").toFile();
+ assertTrue(zippedF.exists());
+ assertTrue(!zippedF.isDirectory());
- IArchiveFileSet fs = createLibFileSet("userLibTest");
- zipped.addChild(fs);
- ModelTruezipBridge.fullFilesetBuild(fs, new NullProgressMonitor(), true);
+ IArchiveFileSet fs = createLibFileSet("userLibTest");
+ zipped.addChild(fs);
+ ModelTruezipBridge.fullFilesetBuild(fs, new NullProgressMonitor(), true);
- // should be two less files and 3 less folders created
- assertEquals(1, countEntries(zippedF));
- } finally {
- JavaModelManager.getUserLibraryManager().removeUserLibrary("userLibTest");
- }
+ // should be two less files and 3 less folders created
+ assertEquals(1, countEntries(zippedF));
}
}
protected File findSomeJar() {
- String loc = System.getProperty("osgi.syspath");
- File f = new File(loc);
- String[] children = f.list();
- boolean found = false;
- int i = 0;
- File tempFile;
- while( !found && i < children.length) {
- tempFile = new File(f, children[i]);
- if( tempFile.exists() && tempFile.isFile() && children[i].endsWith("jar")) {
- return tempFile;
- }
- }
- return null;
+ return bundlePath.append("libs").append("some.jar").toFile();
}
protected IArchiveNode getDummyParent() {
14 years, 7 months
JBoss Tools SVN: r22534 - trunk/common/tests/org.jboss.tools.common.model.ui.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-06-03 18:35:23 -0400 (Thu, 03 Jun 2010)
New Revision: 22534
Modified:
trunk/common/tests/org.jboss.tools.common.model.ui.test/META-INF/MANIFEST.MF
Log:
junit version updated
Modified: trunk/common/tests/org.jboss.tools.common.model.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.ui.test/META-INF/MANIFEST.MF 2010-06-03 22:16:09 UTC (rev 22533)
+++ trunk/common/tests/org.jboss.tools.common.model.ui.test/META-INF/MANIFEST.MF 2010-06-03 22:35:23 UTC (rev 22534)
@@ -3,7 +3,7 @@
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.jboss.tools.common.model.ui.test;singleton:=true
Bundle-Version: 3.1.0.qualifier
-Require-Bundle: org.junit;visibility:=reexport,
+Require-Bundle: org.junit;bundle-version="3.8.2";visibility:=reexport,
org.eclipse.jface,
org.jboss.tools.tests,
org.eclipse.ui,
14 years, 7 months
JBoss Tools SVN: r22532 - trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-06-03 18:01:07 -0400 (Thu, 03 Jun 2010)
New Revision: 22532
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlComponentContentTest.java
Log:
testTitle method is commented
Modified: trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlComponentContentTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlComponentContentTest.java 2010-06-03 21:57:35 UTC (rev 22531)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlComponentContentTest.java 2010-06-03 22:01:07 UTC (rev 22532)
@@ -138,7 +138,7 @@
performInvisibleTagTest("components/core/style.html", "style"); //$NON-NLS-1$ //$NON-NLS-2$
}
- public void testTitle() throws Throwable {
+ public void _testTitle() throws Throwable {
performContentTest("components/core/title.html"); //$NON-NLS-1$
}
14 years, 7 months