JBoss Tools SVN: r23255 - in trunk/struts: features and 14 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-06 14:06:58 -0400 (Tue, 06 Jul 2010)
New Revision: 23255
Modified:
trunk/struts/features/org.jboss.tools.struts.feature/pom.xml
trunk/struts/features/pom.xml
trunk/struts/plugins/org.jboss.tools.struts.text.ext/pom.xml
trunk/struts/plugins/org.jboss.tools.struts.ui/pom.xml
trunk/struts/plugins/org.jboss.tools.struts.validator.ui/pom.xml
trunk/struts/plugins/org.jboss.tools.struts.verification/pom.xml
trunk/struts/plugins/org.jboss.tools.struts.vpe.struts/pom.xml
trunk/struts/plugins/org.jboss.tools.struts/pom.xml
trunk/struts/plugins/pom.xml
trunk/struts/pom.xml
trunk/struts/site/pom.xml
trunk/struts/tests/org.jboss.tools.struts.text.ext.test/pom.xml
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/pom.xml
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/META-INF/MANIFEST.MF
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/pom.xml
trunk/struts/tests/pom.xml
Log:
1. struts maven repo structure updated to match svn structure
2. code coverage enabled for test plugins
Modified: trunk/struts/features/org.jboss.tools.struts.feature/pom.xml
===================================================================
--- trunk/struts/features/org.jboss.tools.struts.feature/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
+++ trunk/struts/features/org.jboss.tools.struts.feature/pom.xml 2010-07-06 18:06:58 UTC (rev 23255)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.struts.features</groupId>
<artifactId>org.jboss.tools.struts.feature</artifactId>
<version>3.1.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
Modified: trunk/struts/features/pom.xml
===================================================================
--- trunk/struts/features/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
+++ trunk/struts/features/pom.xml 2010-07-06 18:06:58 UTC (rev 23255)
@@ -1,18 +1,13 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>struts.features</artifactId>
+ <groupId>org.jboss.tools.struts</groupId>
+ <artifactId>features</artifactId>
+ <name>struts.features</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>org.jboss.tools.struts.feature</module>
</modules>
</project>
-
\ No newline at end of file
+
Modified: trunk/struts/plugins/org.jboss.tools.struts/pom.xml
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
+++ trunk/struts/plugins/org.jboss.tools.struts/pom.xml 2010-07-06 18:06:58 UTC (rev 23255)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.struts.plugins</groupId>
<artifactId>org.jboss.tools.struts</artifactId>
<version>3.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/struts/plugins/org.jboss.tools.struts.text.ext/pom.xml
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.text.ext/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
+++ trunk/struts/plugins/org.jboss.tools.struts.text.ext/pom.xml 2010-07-06 18:06:58 UTC (rev 23255)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.struts.plugins</groupId>
<artifactId>org.jboss.tools.struts.text.ext</artifactId>
<version>3.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/struts/plugins/org.jboss.tools.struts.ui/pom.xml
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.ui/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
+++ trunk/struts/plugins/org.jboss.tools.struts.ui/pom.xml 2010-07-06 18:06:58 UTC (rev 23255)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.struts.plugins</groupId>
<artifactId>org.jboss.tools.struts.ui</artifactId>
<version>3.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/struts/plugins/org.jboss.tools.struts.validator.ui/pom.xml
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.validator.ui/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
+++ trunk/struts/plugins/org.jboss.tools.struts.validator.ui/pom.xml 2010-07-06 18:06:58 UTC (rev 23255)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.struts.plugins</groupId>
<artifactId>org.jboss.tools.struts.validator.ui</artifactId>
<version>3.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/struts/plugins/org.jboss.tools.struts.verification/pom.xml
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.verification/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
+++ trunk/struts/plugins/org.jboss.tools.struts.verification/pom.xml 2010-07-06 18:06:58 UTC (rev 23255)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.struts.plugins</groupId>
<artifactId>org.jboss.tools.struts.verification</artifactId>
<version>3.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/struts/plugins/org.jboss.tools.struts.vpe.struts/pom.xml
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.vpe.struts/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
+++ trunk/struts/plugins/org.jboss.tools.struts.vpe.struts/pom.xml 2010-07-06 18:06:58 UTC (rev 23255)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.struts.plugins</groupId>
<artifactId>org.jboss.tools.struts.vpe.struts</artifactId>
<version>3.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/struts/plugins/pom.xml
===================================================================
--- trunk/struts/plugins/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
+++ trunk/struts/plugins/pom.xml 2010-07-06 18:06:58 UTC (rev 23255)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>struts.plugins</artifactId>
+ <groupId>org.jboss.tools.struts</groupId>
+ <artifactId>plugins</artifactId>
+ <name>struts.plugins</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
@@ -20,4 +15,4 @@
<module>org.jboss.tools.struts.vpe.struts</module>
</modules>
</project>
-
\ No newline at end of file
+
Modified: trunk/struts/pom.xml
===================================================================
--- trunk/struts/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
+++ trunk/struts/pom.xml 2010-07-06 18:06:58 UTC (rev 23255)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
<groupId>org.jboss.tools</groupId>
- <artifactId>struts.all</artifactId>
+ <artifactId>struts</artifactId>
+ <name>struts.all</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
Modified: trunk/struts/site/pom.xml
===================================================================
--- trunk/struts/site/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
+++ trunk/struts/site/pom.xml 2010-07-06 18:06:58 UTC (rev 23255)
@@ -6,8 +6,9 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>struts.site</artifactId>
+ <groupId>org.jboss.tools.struts</groupId>
+ <artifactId>site</artifactId>
+ <name>struts.site</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-update-site</packaging>
</project>
Modified: trunk/struts/tests/org.jboss.tools.struts.text.ext.test/pom.xml
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.text.ext.test/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
+++ trunk/struts/tests/org.jboss.tools.struts.text.ext.test/pom.xml 2010-07-06 18:06:58 UTC (rev 23255)
@@ -7,8 +7,12 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.struts.tests</groupId>
<artifactId>org.jboss.tools.struts.text.ext.test</artifactId>
<version>3.1.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
+ <properties>
+ <emma.filter>org.jboss.tools*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.struts,org.jboss.tools.struts.text.ext</emma.instrument.bundles>
+ </properties>
</project>
Modified: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/pom.xml
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/pom.xml 2010-07-06 18:06:58 UTC (rev 23255)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.struts.tests</groupId>
<artifactId>org.jboss.tools.struts.ui.bot.test</artifactId>
<version>3.1.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
Modified: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/META-INF/MANIFEST.MF 2010-07-06 17:08:22 UTC (rev 23254)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/META-INF/MANIFEST.MF 2010-07-06 18:06:58 UTC (rev 23255)
@@ -13,7 +13,9 @@
org.junit,
org.jboss.tools.struts.vpe.struts;bundle-version="3.1.0",
org.jboss.tools.vpe.jsp;bundle-version="3.1.0",
- org.jboss.tools.vpe.html;bundle-version="3.1.0"
+ org.jboss.tools.vpe.html;bundle-version="3.1.0",
+ org.jboss.tools.struts;bundle-version="3.1.0",
+ org.jboss.tools.struts.text.ext;bundle-version="3.1.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.struts.vpe.struts.test
Bundle-Vendor: %Bundle-Vendor.0
Modified: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/pom.xml
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/pom.xml 2010-07-06 18:06:58 UTC (rev 23255)
@@ -7,10 +7,14 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.struts.tests</groupId>
<artifactId>org.jboss.tools.struts.vpe.struts.test</artifactId>
<version>3.1.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
+ <properties>
+ <emma.filter>org.jboss.tools*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.struts,org.jboss.tools.struts.text.ext,org.jboss.tools.struts.vpe.struts</emma.instrument.bundles>
+ </properties>
<build>
<plugins>
<plugin>
Modified: trunk/struts/tests/pom.xml
===================================================================
--- trunk/struts/tests/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
+++ trunk/struts/tests/pom.xml 2010-07-06 18:06:58 UTC (rev 23255)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>struts.tests</artifactId>
+ <groupId>org.jboss.tools.struts</groupId>
+ <artifactId>tests</artifactId>
+ <name>struts.tests</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
@@ -17,4 +12,4 @@
<module>org.jboss.tools.struts.vpe.struts.test</module>
</modules>
</project>
-
\ No newline at end of file
+
15 years, 9 months
JBoss Tools SVN: r23254 - in trunk: hibernatetools/tests and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-06 13:08:22 -0400 (Tue, 06 Jul 2010)
New Revision: 23254
Modified:
trunk/hibernatetools/site/pom.xml
trunk/hibernatetools/tests/pom.xml
trunk/site/pom.xml
trunk/xulrunner/site/pom.xml
Log:
adjust maven repo structure to match svn repo
Modified: trunk/hibernatetools/site/pom.xml
===================================================================
--- trunk/hibernatetools/site/pom.xml 2010-07-06 16:53:52 UTC (rev 23253)
+++ trunk/hibernatetools/site/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
@@ -7,7 +7,8 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools</groupId>
- <artifactId>hibernatetools.site</artifactId>
+ <artifactId>site</artifactId>
+ <name>hibernatetools.site</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-update-site</packaging>
</project>
Modified: trunk/hibernatetools/tests/pom.xml
===================================================================
--- trunk/hibernatetools/tests/pom.xml 2010-07-06 16:53:52 UTC (rev 23253)
+++ trunk/hibernatetools/tests/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
@@ -2,7 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.tools.hibernatetools</groupId>
- <artifactId>hibernatetools.tests</artifactId>
+ <artifactId>tests</artifactId>
+ <name>hibernatetools.tests</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
Modified: trunk/site/pom.xml
===================================================================
--- trunk/site/pom.xml 2010-07-06 16:53:52 UTC (rev 23253)
+++ trunk/site/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
@@ -8,7 +8,8 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools</groupId>
- <artifactId>jbosstools.site</artifactId>
+ <artifactId>site</artifactId>
+ <name>org.jboss.tools.site</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-update-site</packaging>
</project>
Modified: trunk/xulrunner/site/pom.xml
===================================================================
--- trunk/xulrunner/site/pom.xml 2010-07-06 16:53:52 UTC (rev 23253)
+++ trunk/xulrunner/site/pom.xml 2010-07-06 17:08:22 UTC (rev 23254)
@@ -8,7 +8,8 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.xulrunner</groupId>
- <artifactId>xulrunner.site</artifactId>
+ <artifactId>site</artifactId>
+ <name>xulrunner.site</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-update-site</packaging>
</project>
15 years, 9 months
JBoss Tools SVN: r23253 - workspace/dgolovin/experimental-build.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-06 12:53:52 -0400 (Tue, 06 Jul 2010)
New Revision: 23253
Modified:
workspace/dgolovin/experimental-build/dgolovin-pom.xml
Log:
update experimenatl pom with last updated components to test
Modified: workspace/dgolovin/experimental-build/dgolovin-pom.xml
===================================================================
--- workspace/dgolovin/experimental-build/dgolovin-pom.xml 2010-07-06 16:37:09 UTC (rev 23252)
+++ workspace/dgolovin/experimental-build/dgolovin-pom.xml 2010-07-06 16:53:52 UTC (rev 23253)
@@ -40,7 +40,7 @@
<!-- todo -->
<module>modeshape</module>
<module>flow</module>
- <module>jbpm</module-->
+ <module>jbpm</module>
<!--module>drools</module-->
</modules>
15 years, 9 months
JBoss Tools SVN: r23252 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-07-06 12:37:09 -0400 (Tue, 06 Jul 2010)
New Revision: 23252
Modified:
trunk/build/publish.sh
Log:
accidentally overwriting 112M zip w/ all other produced zips (resulting in 40M xulrunner zip)
Modified: trunk/build/publish.sh
===================================================================
--- trunk/build/publish.sh 2010-07-06 15:14:39 UTC (rev 23251)
+++ trunk/build/publish.sh 2010-07-06 16:37:09 UTC (rev 23252)
@@ -11,22 +11,26 @@
# cleanup from last time
rm -fr ${WORKSPACE}/site; mkdir -p ${WORKSPACE}/site/${JOB_NAME}
-for z in ${WORKSPACE}/sources/site/target/site.zip ${WORKSPACE}/sources/site/target/site_assembly.zip; do
- if [[ -f $z ]]; then
- #echo "$z ..."
- # note the job name, build number, and build ID of the latest snapshot zip
- echo "JOB_NAME = ${JOB_NAME}" > ${WORKSPACE}/site/${JOB_NAME}/JOB_NAME.txt
- echo "BUILD_NUMBER = ${BUILD_NUMBER}" > ${WORKSPACE}/site/${JOB_NAME}/BUILD_NUMBER.txt
- echo "BUILD_ID = ${BUILD_ID}" > ${WORKSPACE}/site/${JOB_NAME}/BUILD_ID.txt
-
- # unzip into workspace for publishing as unpacked site
- unzip -u -o -q -d ${WORKSPACE}/site/${JOB_NAME}/ $z
-
- # copy into workspace for access by bucky aggregator (same name every time)
- rsync -aq $z ${WORKSPACE}/site/${SNAPNAME}
- fi
-done
+siteZip=${WORKSPACE}/sources/site/target/site_assembly.zip
+if [[ ! -f ${WORKSPACE}/sources/site/target/site_assembly.zip ]]; then
+ siteZip=${WORKSPACE}/sources/site/target/site.zip
+fi
+z=$siteZip
+if [[ -f $z ]]; then
+ #echo "$z ..."
+ # note the job name, build number, and build ID of the latest snapshot zip
+ echo "JOB_NAME = ${JOB_NAME}" > ${WORKSPACE}/site/${JOB_NAME}/JOB_NAME.txt
+ echo "BUILD_NUMBER = ${BUILD_NUMBER}" > ${WORKSPACE}/site/${JOB_NAME}/BUILD_NUMBER.txt
+ echo "BUILD_ID = ${BUILD_ID}" > ${WORKSPACE}/site/${JOB_NAME}/BUILD_ID.txt
+
+ # unzip into workspace for publishing as unpacked site
+ unzip -u -o -q -d ${WORKSPACE}/site/${JOB_NAME}/ $z
+
+ # copy into workspace for access by bucky aggregator (same name every time)
+ rsync -aq $z ${WORKSPACE}/site/${SNAPNAME}
+fi
+
# if component zips exist, copy them too; first site.zip, then site_assembly.zip
for z in $(find ${WORKSPACE}/sources/*/site/target -type f -name "site*.zip" | sort -r); do
#if [[ -f $z ]]; then
@@ -41,11 +45,13 @@
done
# if zips exist produced & renamed by ant script, copy them too
-for z in $(find ${WORKSPACE} -maxdepth 5 -mindepth 3 -name "*Update*.zip"); do
- #echo "$z ..."
- unzip -u -o -q -d ${WORKSPACE}/site/${JOB_NAME}/ $z
- rsync -aq $z ${WORKSPACE}/site/${SNAPNAME}
-done
+if [[ ! -f ${WORKSPACE}/site/${SNAPNAME} ]]; then
+ for z in $(find ${WORKSPACE} -maxdepth 5 -mindepth 3 -name "*Update*.zip"); do
+ #echo "$z ..."
+ unzip -u -o -q -d ${WORKSPACE}/site/${JOB_NAME}/ $z
+ rsync -aq $z ${WORKSPACE}/site/${SNAPNAME}
+ done
+fi
# get full build log and filter out Maven test failures
bl=${WORKSPACE}/site/${JOB_NAME}/BUILDLOG.txt
15 years, 9 months
JBoss Tools SVN: r23251 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-07-06 11:14:39 -0400 (Tue, 06 Jul 2010)
New Revision: 23251
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputFormatTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneMenuTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneRadioTemplate.java
Log:
fix templates for jsf components according to JBIDE-6542
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputFormatTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputFormatTemplate.java 2010-07-06 13:28:19 UTC (rev 23250)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOutputFormatTemplate.java 2010-07-06 15:14:39 UTC (rev 23251)
@@ -186,7 +186,7 @@
// decode
int num = Integer.decode(paramNumber);
- if (num < paramList.size()) {
+ if (num < paramList.size() && paramList.get(num).hasAttribute(JSF.ATTR_VALUE)) {
// get param's value
value = paramList.get(num).getAttribute(JSF.ATTR_VALUE);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneMenuTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneMenuTemplate.java 2010-07-06 13:28:19 UTC (rev 23250)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneMenuTemplate.java 2010-07-06 15:14:39 UTC (rev 23251)
@@ -88,13 +88,11 @@
// import attributes from source
Set<String> jsfAttributes = ATTR_LIST_COPY.keySet();
- for (String attributeName : jsfAttributes) {
-
- // get attribute
- String attr = element.getAttribute(attributeName);
-
+ for (String attributeName : jsfAttributes) {
// add attribute to "select"
- if (attr != null) {
+ if (element.hasAttribute(attributeName)) {
+ // get attribute
+ String attr = element.getAttribute(attributeName);
if (attributeName.equalsIgnoreCase(HTML.ATTR_DISABLED)) {
if (attr.equalsIgnoreCase(Constants.TRUE)) {
select.setAttribute(ATTR_LIST_COPY.get(attributeName),
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneRadioTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneRadioTemplate.java 2010-07-06 13:28:19 UTC (rev 23250)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSelectOneRadioTemplate.java 2010-07-06 15:14:39 UTC (rev 23251)
@@ -73,9 +73,11 @@
sourceElement, ATTR_STYLE_CLASS));
visualTable.setAttribute(HTML.ATTR_STYLE, ComponentUtil.getAttribute(
sourceElement, HTML.ATTR_STYLE));
- String border = sourceElement.getAttribute(ATTR_BORDER);
- if (border != null)
+
+ if (sourceElement.hasAttribute(ATTR_BORDER)) {
+ String border = sourceElement.getAttribute(ATTR_BORDER);
visualTable.setAttribute(ATTR_BORDER, border);
+ }
NodeList children = sourceNode.getChildNodes();
int count = children != null ? children.getLength() : 0;
15 years, 9 months
JBoss Tools SVN: r23250 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-07-06 09:28:19 -0400 (Tue, 06 Jul 2010)
New Revision: 23250
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1713Test.java
Log:
https://jira.jboss.org/browse/JBIDE-6539 , test for JBIDE-1713 was updated to suit for both XR 1.9.1 and 1.9.2.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1713Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1713Test.java 2010-07-06 11:46:04 UTC (rev 23249)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1713Test.java 2010-07-06 13:28:19 UTC (rev 23250)
@@ -34,9 +34,9 @@
*/
public class JBIDE1713Test extends VpeTest {
- public static final String IMPORT_PROJECT_NAME = "richFacesTest";
+ public static final String IMPORT_PROJECT_NAME = "richFacesTest"; //$NON-NLS-1$
- private static final String TEST_PAGE_NAME = "JBIDE/1713/JBIDE-1713.xhtml";
+ private static final String TEST_PAGE_NAME = "JBIDE/1713/JBIDE-1713.xhtml"; //$NON-NLS-1$
public JBIDE1713Test(String name) {
super(name);
@@ -58,7 +58,7 @@
IEditorInput input = new FileEditorInput(file);
- assertNotNull("Editor input is null", input);
+ assertNotNull("Editor input is null", input); //$NON-NLS-1$
// open and get editor
JSPMultiPageEditor part = openEditor(input);
// get dom document
@@ -84,14 +84,14 @@
// Check applying styleClass
String styleClass = table.getAttribute(HTML.ATTR_CLASS);
- assertNotNull("styleClass attribute not apply", styleClass);
- assertEquals("dr-pnlbar rich-panelbar dr-pnlbar-b myClass", styleClass);
+ assertNotNull("styleClass attribute not apply", styleClass); //$NON-NLS-1$
+ assertEquals("dr-pnlbar rich-panelbar dr-pnlbar-b myClass", styleClass); //$NON-NLS-1$
// Check applying style
String stylePanel = table.getAttribute(HTML.ATTR_STYLE);
- assertNotNull("style attribute not apply", stylePanel);
+ assertNotNull("style attribute not apply", stylePanel); //$NON-NLS-1$
assertEquals(
- "padding: 0px; height: 207px; width: 453px; font-weight: bold;",
+ "padding: 0px; height: 207px; width: 453px; font-weight: bold;", //$NON-NLS-1$
stylePanel);
elements.clear();
@@ -100,21 +100,41 @@
assertEquals(10, elements.size());
+ /*
+ * Get the fifth DIV with text "nice"
+ */
nsIDOMElement activeToggle = queryInterface(elements.get(5), nsIDOMElement.class);
assertNotNull(activeToggle);
String activeToggleClass = activeToggle.getAttribute(HTML.ATTR_CLASS);
assertNotNull(activeToggleClass);
assertEquals(
- "dr-pnlbar-h rich-panelbar-header myHeaderStyle1 myHeaderStyle myHeaderStyleActive1 myHeaderStyleActive",
+ "dr-pnlbar-h rich-panelbar-header myHeaderStyle1 myHeaderStyle myHeaderStyleActive1 myHeaderStyleActive", //$NON-NLS-1$
activeToggleClass);
String activeToggleStyle = activeToggle.getAttribute(HTML.ATTR_STYLE);
assertNotNull(activeToggleStyle);
- assertEquals(
- "background: red none repeat scroll 0% 0%; color: blue; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;",
- activeToggleStyle);
+ /*
+ * Fix for -- https://jira.jboss.org/browse/JBIDE-6539
+ * Due to differences in XulRunner 1.9.2 and 1.9.1
+ * style attribute is compared by its splitted values.
+ * After migration to XR 1.9.2 is finished style value should be equals
+ * "background: red none repeat scroll 0% 0%; color: blue;"
+ */
+// assertEquals(
+// "background: red none repeat scroll 0% 0%; color: blue; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;",
+// activeToggleStyle);
+ assertTrue("Style is incorrect: [color: blue] should present.", //$NON-NLS-1$
+ activeToggleStyle.contains("color: blue")); //$NON-NLS-1$
+ assertTrue("Style is incorrect: [background:] should present.", //$NON-NLS-1$
+ activeToggleStyle.contains("background:")); //$NON-NLS-1$
+ assertTrue("Style is incorrect: [red] should present.", //$NON-NLS-1$
+ activeToggleStyle.contains("red")); //$NON-NLS-1$
+ assertTrue(
+ "Style is incorrect: [none repeat scroll 0% 0%] should present.", //$NON-NLS-1$
+ activeToggleStyle.contains("none repeat scroll 0% 0%")); //$NON-NLS-1$
+
// check active content
List<nsIDOMNode> contentElements = new ArrayList<nsIDOMNode>();
TestUtil.findAllElementsByName(node, contentElements, HTML.TAG_TD);
@@ -128,13 +148,13 @@
String activeContentStyle = contentElement
.getAttribute(HTML.ATTR_STYLE);
assertNotNull(activeContentStyle);
- assertEquals("color: green;", activeContentStyle);
+ assertEquals("color: green;", activeContentStyle); //$NON-NLS-1$
String activeContentClass = contentElement
.getAttribute(HTML.ATTR_CLASS);
assertNotNull(activeContentClass);
assertEquals(
- "dr-pnlbar-c rich-panelbar-content myContentStyle1 myContentStyle",
+ "dr-pnlbar-c rich-panelbar-content myContentStyle1 myContentStyle", //$NON-NLS-1$
activeContentClass);
// check facet
@@ -145,12 +165,12 @@
String disabledContentStyle = disabledToggle
.getAttribute(HTML.ATTR_STYLE);
assertNotNull(disabledContentStyle);
- assertEquals("color: green;", disabledContentStyle);
+ assertEquals("color: green;", disabledContentStyle); //$NON-NLS-1$
String disabledContentClass = disabledToggle
.getAttribute(HTML.ATTR_CLASS);
assertNotNull(disabledContentClass);
- assertEquals("dr-pnlbar-h rich-panelbar-header myHeaderStyle1",
+ assertEquals("dr-pnlbar-h rich-panelbar-header myHeaderStyle1", //$NON-NLS-1$
disabledContentClass);
contentElements.clear();
@@ -164,11 +184,11 @@
disabledContentStyle = disabledToggle.getAttribute(HTML.ATTR_STYLE);
assertNotNull(disabledContentStyle);
- assertEquals("color: green;", disabledContentStyle);
+ assertEquals("color: green;", disabledContentStyle); //$NON-NLS-1$
disabledContentClass = disabledToggle.getAttribute(HTML.ATTR_CLASS);
assertNotNull(disabledContentClass);
- assertEquals("dr-pnlbar-h rich-panelbar-header myHeaderStyle1",
+ assertEquals("dr-pnlbar-h rich-panelbar-header myHeaderStyle1", //$NON-NLS-1$
disabledContentClass);
if (getException() != null) {
15 years, 9 months
JBoss Tools SVN: r23249 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-07-06 07:46:04 -0400 (Tue, 06 Jul 2010)
New Revision: 23249
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
Log:
https://jira.jboss.org/browse/JBIDE-6542 , check if the attribute presents in PanelMenu was updated.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2010-07-06 11:32:16 UTC (rev 23248)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2010-07-06 11:46:04 UTC (rev 23249)
@@ -485,19 +485,19 @@
String pathIconCollapsed = attrs.getPmg_iconCollapsed();
String pathIconDisabled = attrs.getPmg_iconDisabled();
- if (pathIconExpanded == null) {
+ if (ComponentUtil.isBlank(pathIconExpanded)) {
if (childOfPanelMenu) {
pathIconExpanded = attrs.getPm_iconExpandedTopGroup();
}
pathIconExpanded = attrs.getPm_iconExpandedGroup();
}
- if (pathIconCollapsed == null) {
+ if (ComponentUtil.isBlank(pathIconCollapsed)) {
if (childOfPanelMenu) {
pathIconCollapsed = attrs.getPm_iconCollapsedTopGroup();
}
pathIconCollapsed = attrs.getPm_iconCollapsedGroup();
}
- if (pathIconDisabled == null) {
+ if (ComponentUtil.isBlank(pathIconDisabled)) {
if (childOfPanelMenu) {
pathIconDisabled = attrs.getPm_iconTopDisabledGroup();
}
@@ -523,7 +523,7 @@
if (ComponentUtil.isNotBlank(pathIconExpanded)) {
if (DEFAULT_ICON_MAP.containsKey(pathIconExpanded)) {
pathIconExpanded = DEFAULT_ICON_MAP
- .get(pathIconExpanded);
+ .get(pathIconExpanded);
ComponentUtil.setImg(imgIcon, pathIconExpanded);
} else {
String imgFullPath = VpeStyleUtil.addFullPathToImgSrc(
15 years, 9 months
JBoss Tools SVN: r23248 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-07-06 07:32:16 -0400 (Tue, 06 Jul 2010)
New Revision: 23248
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml.xml
Log:
https://jira.jboss.org/browse/JBIDE-6539 , rich:pickList test was fixed. The problem was in the additional quotes in the image URI.URI pattern was corrected in the xml file.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml.xml 2010-07-06 11:12:03 UTC (rev 23247)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml.xml 2010-07-06 11:32:16 UTC (rev 23248)
@@ -1,101 +1,92 @@
<tests>
<test id="pickList">
<TABLE CLASS="rich-list-picklist" STYLE="">
-<TBODY>
- <TR>
- <TD>
- <DIV CLASS="rich-picklist-source-items" STYLE="width: 140px; height: 140px;">
- <TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0"
- CLASS="rich-picklist-body">
- <TR>
- <TD STYLE="border: 0px none ; padding: 0px;">
- <DIV CLASS="rich-picklist-list">
- <DIV CLASS="rich-picklist-list-content" STYLE="width: 140px; height: 140px;">
- <TABLE CELLPADDING="0" CLASS="rich-picklist-internal-tab">
- <TBODY>
- <OPTION >
- Option 1
-</OPTION>
- <OPTION>
- Option 2
-</OPTION>
- <OPTION>
- Option 3
-</OPTION>
- </TBODY>
- </TABLE>
+ <TBODY>
+ <TR>
+ <TD>
+ <DIV CLASS="rich-picklist-source-items" STYLE="width: 140px; height: 140px;">
+ <TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0"
+ CLASS="rich-picklist-body">
+ <TR>
+ <TD STYLE="border: 0px none ; padding: 0px;">
+ <DIV CLASS="rich-picklist-list">
+ <DIV CLASS="rich-picklist-list-content" STYLE="width: 140px; height: 140px;">
+ <TABLE CELLPADDING="0" CLASS="rich-picklist-internal-tab">
+ <TBODY>
+ <OPTION>
+ Option 1
+ </OPTION>
+ <OPTION>
+ Option 2
+ </OPTION>
+ <OPTION>
+ Option 3
+ </OPTION>
+ </TBODY>
+ </TABLE>
+ </DIV>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </TD>
+ <TD STYLE="vertical-align: middle;">
+ <DIV CLASS="rich-picklist-controls">
+ <DIV CLASS="rich-picklist-control-button-class">
+ <DIV STYLE="/.*/resources/pickList/button.gif/" CLASS="rich-list-picklist-button">
+ <DIV CLASS="rich-list-picklist-button-content">
+ <IMG WIDTH="15" HEIGHT="15" SRC="/.*/pickList/arrow_copy_all.gif/" />
+
+ Copy all
+ </DIV>
</DIV>
</DIV>
- </TD>
- </TR>
- </TABLE>
- </DIV>
- </TD>
- <TD STYLE="vertical-align: middle;">
- <DIV CLASS="rich-picklist-controls">
- <DIV CLASS="rich-picklist-control-button-class">
- <DIV
- STYLE="/.*/resources/pickList/button.gif\);/"
- CLASS="rich-list-picklist-button">
- <DIV CLASS="rich-list-picklist-button-content">
- <IMG WIDTH="15" HEIGHT="15"
- SRC="/.*/pickList/arrow_copy_all.gif/" />
+ <DIV CLASS="rich-picklist-control-button-class">
+ <DIV STYLE="/.*/resources/pickList/button.gif/" CLASS="rich-list-picklist-button">
+ <DIV CLASS="rich-list-picklist-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*/resources/pickList/arrow_copy.gif/" />
- Copy all
- </DIV>
- </DIV>
- </DIV>
- <DIV CLASS="rich-picklist-control-button-class">
- <DIV
- STYLE="/.*/resources/pickList/button.gif\);/"
- CLASS="rich-list-picklist-button">
- <DIV CLASS="rich-list-picklist-button-content">
- <IMG WIDTH="15" HEIGHT="15"
- SRC="/.*/resources/pickList/arrow_copy.gif/" />
+ Copy
+ </DIV>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-picklist-control-button-class">
+ <DIV STYLE="/.*/resources/pickList/button.gif/" CLASS="rich-list-picklist-button">
+ <DIV CLASS="rich-list-picklist-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*/resources/pickList/arrow_remove.gif/" />
- Copy
- </DIV>
- </DIV>
- </DIV>
- <DIV CLASS="rich-picklist-control-button-class">
- <DIV
- STYLE="/.*/resources/pickList/button.gif\);/"
- CLASS="rich-list-picklist-button">
- <DIV CLASS="rich-list-picklist-button-content">
- <IMG WIDTH="15" HEIGHT="15"
- SRC="/.*/resources/pickList/arrow_remove.gif/" />
+ Remove
+ </DIV>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-picklist-control-button-class">
+ <DIV STYLE="/.*/resources/pickList/button.gif/" CLASS="rich-list-picklist-button">
+ <DIV CLASS="rich-list-picklist-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*/resources/pickList/arrow_remove_all.gif/" />
- Remove
+ Remove All
+ </DIV>
+ </DIV>
+ </DIV>
</DIV>
- </DIV>
- </DIV>
- <DIV CLASS="rich-picklist-control-button-class">
- <DIV
- STYLE="/.*/resources/pickList/button.gif\);/"
- CLASS="rich-list-picklist-button">
- <DIV CLASS="rich-list-picklist-button-content">
- <IMG WIDTH="15" HEIGHT="15"
- SRC="/.*/resources/pickList/arrow_remove_all.gif/" />
-
- Remove All
+ </TD>
+ <TD>
+ <DIV CLASS="rich-picklist-target-items" STYLE="width: 140px; height: 140px;">
+ <TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0"
+ CLASS="rich-picklist-body">
+ <TR>
+ <TD STYLE="border: 0px none ; padding: 0px;">
+ </TD>
+ </TR>
+ </TABLE>
</DIV>
- </DIV>
- </DIV>
- </DIV>
- </TD>
- <TD>
- <DIV CLASS="rich-picklist-target-items" STYLE="width: 140px; height: 140px;">
- <TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0"
- CLASS="rich-picklist-body">
- <TR>
- <TD STYLE="border: 0px none ; padding: 0px;">
- </TD>
- </TR>
- </TABLE>
- </DIV>
- </TD>
- </TR>
-</TBODY>
-</TABLE>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
</test>
</tests>
\ No newline at end of file
15 years, 9 months
JBoss Tools SVN: r23247 - trunk.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-07-06 07:12:03 -0400 (Tue, 06 Jul 2010)
New Revision: 23247
Modified:
trunk/parent-pom.xml
Log:
https://jira.jboss.org/browse/JBIDE-6572 add version = 1.4 into parent pom to suppress warnings ?
Modified: trunk/parent-pom.xml
===================================================================
--- trunk/parent-pom.xml 2010-07-06 11:03:16 UTC (rev 23246)
+++ trunk/parent-pom.xml 2010-07-06 11:12:03 UTC (rev 23247)
@@ -21,6 +21,11 @@
<build>
<plugins>
<plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.4</version>
+ </plugin>
+
+ <plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>maven-osgi-packaging-plugin</artifactId>
<version>${tychoVersion}</version>
15 years, 9 months
JBoss Tools SVN: r23246 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces: template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-07-06 07:03:16 -0400 (Tue, 06 Jul 2010)
New Revision: 23246
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractTreeTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnGroupTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableStyleClassesApplier.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInsertTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesProgressBarTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSeparatorTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesToggleControlTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTogglePanelTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesToolBarGroupTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodeTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesVirtualEarthTemplate.java
Log:
fix templates for rich components according to JBIDE-6542
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -476,9 +476,9 @@
* @return the attribute
*/
public static String getAttribute(Element sourceElement, String attributeName) {
- String attribute = sourceElement.getAttribute(attributeName);
- if (attribute == null) {
- attribute = Constants.EMPTY;
+ String attribute = Constants.EMPTY;
+ if (sourceElement.hasAttribute(attributeName)) {
+ attribute = sourceElement.getAttribute(attributeName);
}
return attribute;
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractTreeTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractTreeTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractTreeTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -405,12 +405,11 @@
+ Constants.COLON + RECURSIVE_TREE_NODES_ADAPTOR;
if (sourceNode.getNodeName().equals(treeRecursiveNodesAdaptorName)) {
Element sourceElement = (Element) sourceNode;
- String nodes = sourceElement
- .getAttribute(RichFacesRecursiveTreeNodesAdaptorTemplate.NODES_NAME);
+ String nodes = sourceElement.hasAttribute(RichFacesRecursiveTreeNodesAdaptorTemplate.NODES_NAME) ?
+ sourceElement.getAttribute(RichFacesRecursiveTreeNodesAdaptorTemplate.NODES_NAME) : Constants.EMPTY;
nsIDOMElement textContainer = VisualDomUtil
.createBorderlessContainer(visualDocument);
- nsIDOMText text = visualDocument
- .createTextNode((nodes == null) ? Constants.EMPTY : nodes);
+ nsIDOMText text = visualDocument.createTextNode(nodes);
textContainer.appendChild(text);
nodeTitle.appendChild(textContainer);
} else {
@@ -565,7 +564,7 @@
if (imgName == null || imgName.length() == 0) {
Node parentElement = sourceNode.getParentNode();
if (parentElement instanceof Element) {
- imgName = ((Element) parentElement).getAttribute(nodeAttrName);
+ imgName = ((Element) parentElement).getAttribute(nodeAttrName);
}
} else {
img.setAttribute(ICON_PARAM_NAME, Constants.EMPTY);
@@ -681,11 +680,9 @@
protected void addAttributeToTableNode(Element sourceNode,
nsIDOMElement tableRow) {
- String attrValue = sourceNode
- .getAttribute(NODE_TITLE_STYLE_CLASS_ATTR_NAME);
- if ((attrValue != null) && (attrValue.length() > 0)) {
- tableRow.setAttribute(HTML.ATTR_CLASS, attrValue);
- }
+ if (sourceNode.hasAttribute(NODE_TITLE_STYLE_CLASS_ATTR_NAME)) {
+ tableRow.setAttribute(HTML.ATTR_CLASS, sourceNode.getAttribute(NODE_TITLE_STYLE_CLASS_ATTR_NAME));
+ }
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnGroupTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnGroupTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnGroupTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -96,7 +96,7 @@
@Override
protected String getRowClass(int row) {
String rowClass = super.getRowClass(row);
- if (styleClass != null) {
+ if (styleClass != null && styleClass.length() > 0) {
rowClass += ' ' + styleClass;
}
return rowClass;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableStyleClassesApplier.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableStyleClassesApplier.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableStyleClassesApplier.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -132,12 +132,7 @@
int classesSize = classes.size();
if (classesSize > 0) {
final String clazz = classes.get(elementIndex % classesSize);
- String actualClass = element.getAttribute(HTML.ATTR_CLASS);
- if (actualClass == null) {
- actualClass = clazz;
- } else {
- actualClass+= HTML.VALUE_CLASS_DELIMITER + clazz;
- }
+ String actualClass = element.hasAttribute(HTML.ATTR_CLASS) ? element.getAttribute(HTML.ATTR_CLASS) + HTML.VALUE_CLASS_DELIMITER + clazz : clazz;
element.setAttribute(HTML.ATTR_CLASS, actualClass);
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -162,18 +162,16 @@
* Encode caption
*/
if (null != captionBody) {
- String captionClass = (String) table.getAttribute(RichFaces.ATTR_CAPTION_CLASS);
- String captionStyle = (String) table.getAttribute(RichFaces.ATTR_CAPTION_STYLE);
-
+
nsIDOMElement caption = visualDocument.createElement(HTML.TAG_CAPTION);
table.appendChild(caption);
- if (captionClass != null && captionClass.length()>0) {
- captionClass = "dr-table-caption rich-table-caption " + captionClass; //$NON-NLS-1$
- } else {
- captionClass = "dr-table-caption rich-table-caption"; //$NON-NLS-1$
- }
+
+ String defaultCaptionClass = "dr-table-caption rich-table-caption"; //$NON-NLS-1$
+ String captionClass = table.hasAttribute(RichFaces.ATTR_CAPTION_CLASS) ? defaultCaptionClass + " " + table.getAttribute(RichFaces.ATTR_CAPTION_CLASS) : defaultCaptionClass; //$NON-NLS-1$
caption.setAttribute(HTML.ATTR_CLASS, captionClass);
- if (captionStyle != null && captionStyle.length()>0) {
+
+ if (table.hasAttribute(RichFaces.ATTR_CAPTION_STYLE)) {
+ String captionStyle = table.getAttribute(RichFaces.ATTR_CAPTION_STYLE);
caption.setAttribute(HTML.ATTR_STYLE, captionStyle);
}
@@ -349,7 +347,6 @@
currentLength = 0;
}
String colspanStr = column.getAttribute("colspan"); //$NON-NLS-1$
- Integer colspan = null;
try {
currentLength += Integer.parseInt(colspanStr);
} catch (NumberFormatException e) {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -72,24 +72,24 @@
}
public nsIDOMElement create() {
+
ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "editor"); //$NON-NLS-1$
-
- String style = sourceElement.getAttribute(RichFaces.ATTR_STYLE);
- if (style == null) {
- style = ""; //$NON-NLS-1$
- }
- String styleClass = sourceElement.getAttribute(RichFaces.ATTR_STYLE_CLASS);
- if (styleClass == null) {
- styleClass = ""; //$NON-NLS-1$
- }
-
// create nodes
nsIDOMElement mainSpan = visualDocument.createElement(HTML.TAG_SPAN); {
- mainSpan.setAttribute(HTML.ATTR_CLASS, "richfacesSimpleSkin " + styleClass); //$NON-NLS-1$
+
+ String styleClass = "richfacesSimpleSkin"; //$NON-NLS-1$
+ if (sourceElement.hasAttribute(RichFaces.ATTR_STYLE_CLASS)) {
+ styleClass += " " + sourceElement.getAttribute(RichFaces.ATTR_STYLE_CLASS); //$NON-NLS-1$
+ }
+ mainSpan.setAttribute(HTML.ATTR_CLASS, styleClass);
// Yahor Radtsevich: Fix of JBIDE-3653: inFlasher doesn't shows for rich:editor component
// (style "display: table;" has been added)
- mainSpan.setAttribute(HTML.ATTR_STYLE, "display: table;" + style); //$NON-NLS-1$
+ String style = "display: table;"; //$NON-NLS-1$
+ if (sourceElement.hasAttribute(RichFaces.ATTR_STYLE)) {
+ style += sourceElement.getAttribute(RichFaces.ATTR_STYLE);
+ }
+ mainSpan.setAttribute(HTML.ATTR_STYLE, style);
}
nsIDOMElement mainTable = createMainTable();
nsIDOMElement textContainer = createTextContainer();
@@ -112,14 +112,14 @@
*/
private nsIDOMElement createMainTable() {
// evaluate width and height
- String style = "width: 183px; height: 100px;"; //$NON-NLS-1$
- String width = sourceElement.getAttribute(RichFaces.ATTR_WIDTH);
- if (width != null) {
+ String style = "width: 183px; height: 100px;"; //$NON-NLS-1$
+ if (sourceElement.hasAttribute(RichFaces.ATTR_WIDTH)) {
+ String width = sourceElement.getAttribute(RichFaces.ATTR_WIDTH);
width = VpeStyleUtil.addPxIfNecessary(width);
style = VpeStyleUtil.setParameterInStyle(style, HTML.STYLE_PARAMETER_WIDTH, width);
- }
- String height = sourceElement.getAttribute(RichFaces.ATTR_HEIGHT);
- if (height != null) {
+ }
+ if (sourceElement.hasAttribute(RichFaces.ATTR_HEIGHT)) {
+ String height = sourceElement.getAttribute(RichFaces.ATTR_HEIGHT);
height = VpeStyleUtil.addPxIfNecessary(height);
style = VpeStyleUtil.setParameterInStyle(style, HTML.STYLE_PARAMETER_HEIGHT, height);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -134,7 +134,7 @@
}
// Add Head
- String headerClass = (String) sourceElement.getAttribute(HEADER_CLASS);
+ String headerClass = sourceElement.hasAttribute(HEADER_CLASS) ? sourceElement.getAttribute(HEADER_CLASS) : null;
nsIDOMElement thead = visualDocument.createElement(HTML.TAG_THEAD);
tableCommon.appendChild(thead);
nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
@@ -154,7 +154,7 @@
// Add footer
nsIDOMElement tfoot = visualDocument.createElement(HTML.TAG_TFOOT);
tableCommon.appendChild(tfoot);
- String footerClass = (String) sourceElement.getAttribute(FOOTER_CLASS);
+ String footerClass = sourceElement.hasAttribute(FOOTER_CLASS) ? sourceElement.getAttribute(FOOTER_CLASS) : null;
nsIDOMElement tfootTR = visualDocument.createElement(HTML.TAG_TR);
tfoot.appendChild(tfootTR);
String styleFooterClass = ComponentUtil.encodeStyleClass(
@@ -292,7 +292,7 @@
String styleClass = EMPTY;
for (Element column : footers) {
- String columnHeaderClass = column.getAttribute(classAttribute);
+ String columnHeaderClass = column.hasAttribute(classAttribute) ? column.getAttribute(classAttribute) : null;
nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
parentTr.appendChild(td);
styleClass = ComponentUtil.encodeStyleClass(null,
@@ -355,7 +355,7 @@
}
for (Element column : headers) {
- String columnHeaderClass = column.getAttribute(classAttribute);
+ String columnHeaderClass = column.hasAttribute(classAttribute) ? column.getAttribute(classAttribute) : null;
nsIDOMElement td = visualDocument.createElement(HTML.TAG_TH);
nsIDOMElement span = visualDocument.createElement(HTML.TAG_SPAN);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInsertTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInsertTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInsertTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -94,14 +94,13 @@
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
VpeCreationData vpeCreationData = new VpeCreationData(div);
- String srcValue = ((Element) sourceNode).getAttribute(SRC_ATTR_NAME);
- String highlightValue = ((Element) sourceNode)
- .getAttribute(HIGHTLIGHT_ATTR_NAME);
+ Element sourceElement = (Element)sourceNode;
+ String srcValue = sourceElement.getAttribute(SRC_ATTR_NAME);
String finalStr = ""; //$NON-NLS-1$
String buf = ""; //$NON-NLS-1$
// if there is no source show error message
- if ((null == srcValue) || ("".equalsIgnoreCase(srcValue))) { //$NON-NLS-1$
+ if (!sourceElement.hasAttribute(SRC_ATTR_NAME) || "".equalsIgnoreCase(srcValue)) { //$NON-NLS-1$
div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, ERROR_MESSAGE_STYLE);
nsIDOMText text = visualDocument.createTextNode(RESOURCE_NOT_FOUND_MESSAGE);
div.appendChild(text);
@@ -141,7 +140,8 @@
}
}
- if ((highlightValue == null) || (!searchInSupportedTypes(highlightValue))){
+ String highlightValue = sourceElement.getAttribute(HIGHTLIGHT_ATTR_NAME);
+ if (!sourceElement.hasAttribute(HIGHTLIGHT_ATTR_NAME) || !searchInSupportedTypes(highlightValue)) {
// finalStr = finalStr.replace('\n', ' ');
nsIDOMText text = visualDocument.createTextNode(finalStr);
div.appendChild(text);
@@ -282,11 +282,11 @@
el.appendChild(elem);
for (int i = 0; i < node.getAttributes().getLength(); i++)
- elem.setAttribute(node.getAttributes().item(i).getNodeName(),
- node.getAttributes().item(i).getNodeValue());
+ elem.setAttribute(node.getAttributes().item(i).getNodeName(),
+ node.getAttributes().item(i).getNodeValue());
for (int i = 0; i < node.getChildNodes().getLength(); i++)
- buildVisualNode(node.getChildNodes().item(i), elem);
+ buildVisualNode(node.getChildNodes().item(i), elem);
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelBarTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -36,7 +36,7 @@
VpeTemplate {
private static final String PERCENT_100 = "100%"; //$NON-NLS-1$
private static final String PANEL_BAR_ITEM = ":panelBarItem"; //$NON-NLS-1$
- private static final String DR_PNLBAR_RICH_PANELBAR_DR_PNLBAR_B = "dr-pnlbar rich-panelbar dr-pnlbar-b "; //$NON-NLS-1$
+ private static final String DR_PNLBAR_RICH_PANELBAR_DR_PNLBAR_B = "dr-pnlbar rich-panelbar dr-pnlbar-b"; //$NON-NLS-1$
private static final String PANEL_BAR_PANEL_BAR_CSS = "panelBar/panelBar.css"; //$NON-NLS-1$
private static Map<Node, String> toggleMap = new HashMap<Node, String>();
@@ -50,9 +50,11 @@
ComponentUtil.setCSSLink(pageContext, PANEL_BAR_PANEL_BAR_CSS, "richFacesPanelBar"); //$NON-NLS-1$
- String styleClass = sourceElement.getAttribute(RichFaces.ATTR_STYLE_CLASS);
- table.setAttribute(HTML.ATTR_CLASS,
- DR_PNLBAR_RICH_PANELBAR_DR_PNLBAR_B + ((styleClass == null) ? Constants.EMPTY : styleClass));
+ String styleClass = DR_PNLBAR_RICH_PANELBAR_DR_PNLBAR_B;
+ if (sourceElement.hasAttribute(RichFaces.ATTR_STYLE_CLASS)) {
+ styleClass += " " + sourceElement.getAttribute(RichFaces.ATTR_STYLE_CLASS); //$NON-NLS-1$
+ }
+ table.setAttribute(HTML.ATTR_CLASS, styleClass);
// Set style attribute
StringBuffer styleValue = new StringBuffer("padding: 0px; "); //$NON-NLS-1$
@@ -104,10 +106,10 @@
* @return
*/
private String height(Element sourceElement) {
- String height = sourceElement.getAttribute(HTML.ATTR_HEIGHT);
+ String height = PERCENT_100;
- if ((height == null) || (height.length() == 0)) {
- height = PERCENT_100;
+ if (sourceElement.hasAttribute(HTML.ATTR_HEIGHT)) {
+ height = sourceElement.getAttribute(HTML.ATTR_HEIGHT);
}
// added by estherbin fix not worked junit JBIDE1713Test
@@ -130,10 +132,10 @@
* @return
*/
public String width(Element sourceElement) {
- String width = sourceElement.getAttribute(HTML.ATTR_WIDTH);
+ String width = PERCENT_100;
- if ((width == null) || (width.length() == 0)) {
- width = PERCENT_100;
+ if (sourceElement.hasAttribute(HTML.ATTR_WIDTH)) {
+ width = sourceElement.getAttribute(HTML.ATTR_WIDTH);
}
// added by estherbin fix not worked junit JBIDE1713Test
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -569,8 +569,8 @@
/*
* Do nothing when panel menu or panel group are disabled.
*/
- if ((TRUE.equalsIgnoreCase(pm_disabled))
- || (TRUE.equalsIgnoreCase(pmg_disabled))) {
+ if (TRUE.equalsIgnoreCase(pm_disabled)
+ || TRUE.equalsIgnoreCase(pmg_disabled)) {
return;
}
@@ -581,7 +581,7 @@
/*
* Expand only one group.
*/
- if ((null != pm_expandSingle) && (TRUE.equalsIgnoreCase(pm_expandSingle))) {
+ if (TRUE.equalsIgnoreCase(pm_expandSingle)) {
if (expandedIds.contains(toggleId)) {
/*
* Close group and its children
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -108,9 +108,7 @@
ComponentUtil.setCSSLink(pageContext, CSS_STYLE_PATH, COMPONENT_NAME);
Element sourceElement = (Element) sourceNode;
- String widthAttr = sourceElement.getAttribute(HTML.ATTR_WIDTH);
- String styleAttr = sourceElement.getAttribute(RichFaces.ATTR_STYLE);
- String styleClassAttr = sourceElement.getAttribute(RichFaces.ATTR_STYLE_CLASS);
+
String style = Constants.EMPTY;
String styleClass = CSS_PMENU;
@@ -118,16 +116,19 @@
VpeCreationData vpeCreationData = new VpeCreationData(div);
div.setAttribute(HTML.ATTR_BORDER, Constants.ZERO_STRING);
- if (widthAttr != null) {
- style += "width:" + widthAttr + "; "; //$NON-NLS-1$ //$NON-NLS-2$
+ if (sourceElement.hasAttribute(HTML.ATTR_WIDTH)) {
+ String widthAttr = sourceElement.getAttribute(HTML.ATTR_WIDTH);
+ style += "width:" + widthAttr + "; "; //$NON-NLS-1$ //$NON-NLS-2$
}
- if (styleAttr != null) {
- style += styleAttr;
+ if (sourceElement.hasAttribute(RichFaces.ATTR_STYLE)) {
+ String styleAttr = sourceElement.getAttribute(RichFaces.ATTR_STYLE);
+ style += styleAttr;
}
div.setAttribute(HTML.ATTR_STYLE, style);
- if (styleClassAttr != null) {
- styleClass += Constants.WHITE_SPACE + styleClassAttr;
+ if (sourceElement.hasAttribute(RichFaces.ATTR_STYLE_CLASS)) {
+ String styleClassAttr = sourceElement.getAttribute(RichFaces.ATTR_STYLE_CLASS);
+ styleClass += Constants.WHITE_SPACE + styleClassAttr;
}
div.setAttribute(HTML.ATTR_CLASS, styleClass);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -31,21 +31,25 @@
public class RichFacesPanelTemplate extends VpeAbstractTemplate {
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
-
Element sourceElement = (Element)sourceNode;
nsIDOMElement div = visualDocument.createElement("div"); //$NON-NLS-1$
+
+ VpeCreationData creationData = new VpeCreationData(div);
+ ComponentUtil.setCSSLink(pageContext, "panel/panel.css", "richFacesPanel"); //$NON-NLS-1$ //$NON-NLS-2$
- VpeCreationData creationData = new VpeCreationData(div);
+ String styleClass = "dr-pnl rich-panel"; //$NON-NLS-1$
+ String styleClassAttrName = "styleClass"; //$NON-NLS-1$
+ if (sourceElement.hasAttribute(styleClassAttrName)) {
+ styleClass += " " + sourceElement.getAttribute(styleClassAttrName); //$NON-NLS-1$
+ }
+ div.setAttribute("class", styleClass); //$NON-NLS-1$
-
- ComponentUtil.setCSSLink(pageContext, "panel/panel.css", "richFacesPanel"); //$NON-NLS-1$ //$NON-NLS-2$
- String styleClass = sourceElement.getAttribute("styleClass"); //$NON-NLS-1$
- div.setAttribute("class", "dr-pnl rich-panel " + (styleClass==null?"":styleClass)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- String style = sourceElement.getAttribute("style"); //$NON-NLS-1$
- if(style!=null && style.length()>0) {
+ String styleAttrName = "style"; //$NON-NLS-1$
+ if(sourceElement.hasAttribute(styleAttrName)) {
+ String style = sourceElement.getAttribute(styleAttrName);
div.setAttribute("style", style); //$NON-NLS-1$
}
@@ -64,9 +68,11 @@
*/
headerDiv.setAttribute(VpeVisualDomBuilder.VPE_FACET, RichFaces.NAME_FACET_HEADER);
div.appendChild(headerDiv);
- String headerClass = sourceElement.getAttribute(RichFaces.ATTR_HEADER_CLASS);
- headerDiv.setAttribute(HTML.ATTR_CLASS,
- "dr-pnl-h rich-panel-header " + (headerClass == null ? "" : headerClass)); //$NON-NLS-1$ //$NON-NLS-2$
+ String headerClass = "dr-pnl-h rich-panel-header"; //$NON-NLS-1$
+ if (sourceElement.hasAttribute(RichFaces.ATTR_HEADER_CLASS)) {
+ headerClass += " " + sourceElement.getAttribute(RichFaces.ATTR_HEADER_CLASS); //$NON-NLS-1$
+ }
+ headerDiv.setAttribute(HTML.ATTR_CLASS, headerClass);
headerDiv.setAttribute(HTML.ATTR_STYLE,
ComponentUtil.getHeaderBackgoundImgStyle());
@@ -80,9 +86,11 @@
*/
nsIDOMElement bodyDiv = visualDocument.createElement(HTML.TAG_DIV);
div.appendChild(bodyDiv);
- String bodyClass = sourceElement.getAttribute(RichFaces.ATTR_BODY_CLASS);
- bodyDiv.setAttribute(HTML.ATTR_CLASS,
- "dr-pnl-b rich-panel-body " + (bodyClass == null ? "" : bodyClass)); //$NON-NLS-1$ //$NON-NLS-2$
+ String bodyClass = "dr-pnl-b rich-panel-body"; //$NON-NLS-1$
+ if (sourceElement.hasAttribute(RichFaces.ATTR_BODY_CLASS)) {
+ bodyClass += " " + sourceElement.getAttribute(RichFaces.ATTR_BODY_CLASS); //$NON-NLS-1$
+ }
+ bodyDiv.setAttribute(HTML.ATTR_CLASS, bodyClass);
/*
* If there are some odd HTML elements from facet
* add them to the panel body first.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesProgressBarTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesProgressBarTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesProgressBarTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -93,12 +93,12 @@
* or supplementary HTML tags from facets
* then progress bar has more divs than usual.
*/
- Element initialFacet = SourceDomUtil.getFacetByName(sourceElement, "initial");
+ Element initialFacet = SourceDomUtil.getFacetByName(sourceElement, "initial"); //$NON-NLS-1$
Map<String, List<Node>> initialFacetChildren = VisualDomUtil.findFacetElements(initialFacet, pageContext);
boolean initialFacetHtmlChildrenPresent = initialFacetChildren
.get(VisualDomUtil.FACET_HTML_TAGS).size() > 0;
- Element completeFacet = SourceDomUtil.getFacetByName(sourceElement, "complete");
+ Element completeFacet = SourceDomUtil.getFacetByName(sourceElement, "complete"); //$NON-NLS-1$
Map<String, List<Node>> completeFacetChildren = VisualDomUtil.findFacetElements(completeFacet, pageContext);
boolean completeFacetHtmlChildrenPresent = completeFacetChildren
.get(VisualDomUtil.FACET_HTML_TAGS).size() > 0;
@@ -203,8 +203,8 @@
* Adding common styles
*/
remainDiv.setAttribute(HTML.ATTR_STYLE, style);
- uploadDiv.setAttribute(HTML.ATTR_STYLE, "width: "
- + DEFAULT_UPLOADED_STATUS + "; " + style);
+ uploadDiv.setAttribute(HTML.ATTR_STYLE, "width: " //$NON-NLS-1$
+ + DEFAULT_UPLOADED_STATUS + "; " + style); //$NON-NLS-1$
completeDiv.setAttribute(HTML.ATTR_STYLE, style);
vpeTextDiv.setAttribute(HTML.ATTR_STYLE, style);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -79,18 +79,16 @@
Element sourceElement = (Element) sourceNode;
- String width = sourceElement.getAttribute(HTML.ATTR_WIDTH);
- if (width == null) {
- width = DEFAULT_WIDTH;
- } else {
- width = VpeStyleUtil.addPxIfNecessary(width);
+ String width = DEFAULT_WIDTH;
+ if (sourceElement.hasAttribute(HTML.ATTR_WIDTH)) {
+ String widthAttrVal = sourceElement.getAttribute(HTML.ATTR_WIDTH);
+ width = VpeStyleUtil.addPxIfNecessary(widthAttrVal);
}
- String height = sourceElement.getAttribute(HTML.ATTR_HEIGHT);
- if (height == null) {
- height = DEFAULT_HEIGHT;
- } else {
- height = VpeStyleUtil.addPxIfNecessary(height);
+ String height = DEFAULT_HEIGHT;
+ if (sourceElement.hasAttribute(HTML.ATTR_HEIGHT)) {
+ String heightAttrVal = sourceElement.getAttribute(HTML.ATTR_HEIGHT);
+ height = VpeStyleUtil.addPxIfNecessary(heightAttrVal);
}
@@ -117,11 +115,11 @@
div.appendChild(mainTableWrapper);
ComponentUtil.setCSSLink(pageContext, CSS_STYLE_PATH, COMPONENT_NAME);
- String tableClass = sourceElement
- .getAttribute(RichFaces.ATTR_STYLE_CLASS);
- mainTable.setAttribute(HTML.ATTR_CLASS, CSS_DR_TABLE
- + Constants.WHITE_SPACE + CSS_RICH_SDT
- + (tableClass == null ? Constants.EMPTY : tableClass));
+ String tableClass = CSS_DR_TABLE + Constants.WHITE_SPACE + CSS_RICH_SDT;
+ if (sourceElement.hasAttribute(RichFaces.ATTR_STYLE_CLASS)) {
+ tableClass += Constants.WHITE_SPACE + sourceElement.getAttribute(RichFaces.ATTR_STYLE_CLASS);
+ }
+ mainTable.setAttribute(HTML.ATTR_CLASS, tableClass);
// Encode colgroup definition.
ArrayList<Element> columns = getColumns(sourceElement);
@@ -142,8 +140,8 @@
nsIDOMElement thead = visualDocument
.createElement(HTML.TAG_THEAD);
mainTable.appendChild(thead);
- String headerClass = (String) sourceElement
- .getAttribute(RichFaces.ATTR_HEADER_CLASS);
+ String headerClass = sourceElement.hasAttribute(RichFaces.ATTR_HEADER_CLASS) ?
+ sourceElement.getAttribute(RichFaces.ATTR_HEADER_CLASS) : null;
if (header != null) {
/*
* JBIDE-3204 #2:No one style or styleClass should be applyed
@@ -178,8 +176,8 @@
nsIDOMElement tfoot = visualDocument
.createElement(HTML.TAG_TFOOT);
mainTable.appendChild(tfoot);
- String footerClass = (String) sourceElement
- .getAttribute(RichFaces.ATTR_FOOTER_CLASS);
+ String footerClass = sourceElement.hasAttribute(RichFaces.ATTR_FOOTER_CLASS) ?
+ sourceElement.getAttribute(RichFaces.ATTR_FOOTER_CLASS) : null;
if (!columnsFooters.isEmpty()) {
nsIDOMElement tr = visualDocument
.createElement(HTML.TAG_TR);
@@ -234,25 +232,22 @@
// Encode caption
Element captionFromFacet = ComponentUtil.getFacet(sourceElement,
HTML.TAG_CAPTION);
- if (captionFromFacet != null) {
- String captionClass = (String) table.getAttribute(RichFaces.ATTR_CAPTION_CLASS);
- String captionStyle = (String) table.getAttribute(RichFaces.ATTR_CAPTION_STYLE);
+ if (captionFromFacet != null) {
nsIDOMElement caption = visualDocument
.createElement(HTML.TAG_CAPTION);
table.appendChild(caption);
- if (captionClass != null && captionClass.length() > 0) {
- captionClass = "dr-table-caption rich-table-caption " //$NON-NLS-1$
- + captionClass;
- } else {
- captionClass = "dr-table-caption rich-table-caption"; //$NON-NLS-1$
+
+ String captionClass = "dr-table-caption rich-table-caption"; //$NON-NLS-1$
+ if (table.hasAttribute(RichFaces.ATTR_CAPTION_CLASS)) {
+ captionClass += Constants.WHITE_SPACE + table.getAttribute(RichFaces.ATTR_CAPTION_CLASS);
+ }
+ caption.setAttribute(HTML.ATTR_CLASS, captionClass);
+
+ if (table.hasAttribute(RichFaces.ATTR_CAPTION_STYLE)) {
+ String captionStyle = table.getAttribute(RichFaces.ATTR_CAPTION_STYLE);
+ caption.setAttribute(HTML.ATTR_STYLE, captionStyle);
}
- caption.setAttribute(HTML.ATTR_CLASS,
- captionClass);
- if (captionStyle != null && captionStyle.length() > 0) {
- caption.setAttribute(HTML.ATTR_STYLE,
- captionStyle);
- }
VpeChildrenInfo cap = new VpeChildrenInfo(caption);
cap.addSourceChild(captionFromFacet);
@@ -278,7 +273,7 @@
String headerClass, String facetName, String element) {
for (Element column : headersOrFooters) {
String classAttribute = facetName + "Class"; //$NON-NLS-1$
- String columnHeaderClass = column.getAttribute(classAttribute);
+ String columnHeaderClass = column.hasAttribute(classAttribute) ? column.getAttribute(classAttribute) : null;
nsIDOMElement td = visualDocument.createElement(element);
parentTr.appendChild(td);
String styleClass = ComponentUtil.encodeStyleClass(null, skinCellClass,
@@ -291,9 +286,9 @@
td.setAttribute(HTML.ATTR_CLASS, styleClass);
td.setAttribute("scop", "col"); //$NON-NLS-1$ //$NON-NLS-2$
- String colspan = column
- .getAttribute(HTML.ATTR_COLSPAN);
- if (colspan != null && colspan.length() > 0) {
+
+ if (column.hasAttribute(HTML.ATTR_COLSPAN)) {
+ String colspan = column.getAttribute(HTML.ATTR_COLSPAN);
td.setAttribute(HTML.ATTR_COLSPAN, colspan);
}
Element facetBody = ComponentUtil.getFacet(column, facetName);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSeparatorTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSeparatorTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSeparatorTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -17,6 +17,7 @@
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.Constants;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -70,6 +71,7 @@
* @return The information on the created node of the visual tree.
*/
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
+
ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "richFacesSeparator"); //$NON-NLS-1$
Element sourceElement = (Element) sourceNode;
/* Create new html element table */
@@ -83,15 +85,20 @@
/* Set align for separator */
separator.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR,
sourceElement.hasAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR) ? sourceElement.getAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR) : DEFAULT_ALIGN);
- separator.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "td-parentdiv"); //$NON-NLS-1$
- String lineClass = sourceElement.getAttribute("styleClass"); //$NON-NLS-1$
+ separator.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "td-parentdiv"); //$NON-NLS-1$
+
+ String styleClassAttrName = "styleClass"; //$NON-NLS-1$
+ String lineClass = sourceElement.getAttribute(styleClassAttrName);
/* Apply class for separator */
- String lineType = sourceElement.getAttribute(LINE_TYPE_ATTR);
- String style = sourceElement.getAttribute("style"); //$NON-NLS-1$
+ String styleAttrName = "style"; //$NON-NLS-1$
+ String style = sourceElement.hasAttribute(styleAttrName) ? sourceElement.getAttribute(styleAttrName) : null;
+ String lineType = sourceElement.hasAttribute(LINE_TYPE_ATTR) ? sourceElement.getAttribute(LINE_TYPE_ATTR) : null;
if (!sourceElement.hasAttribute(LINE_TYPE_ATTR) || lineType.equalsIgnoreCase(LINE_BEVELED)) {
- line.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "dr-table-header rich-table-header-continue" + lineClass); //$NON-NLS-1$
+ String className = "dr-table-header rich-table-header-continue"; //$NON-NLS-1$
+ if (sourceElement.hasAttribute(styleClassAttrName)) {
+ className += Constants.WHITE_SPACE + lineClass;
+ }
+ line.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, className);
style = setBeveledStyle(width, height, ComponentUtil
.getHeaderBackgoundImgStyle() + ";" + style); //$NON-NLS-1$
} else {
@@ -113,7 +120,7 @@
super.removeAttribute(pageContext, sourceElement, visualDocument, visualNode, data, name);
nsIDOMElement element = queryInterface(visualNode, nsIDOMElement.class);
nsIDOMElement line = getLineElement(element);
- String style = sourceElement.getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ String style = sourceElement.hasAttribute(HtmlComponentUtil.HTML_STYLE_ATTR) ? sourceElement.getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR) : null;
String width = sourceElement.hasAttribute(HtmlComponentUtil.HTML_ATR_WIDTH) ? sourceElement.getAttribute(HtmlComponentUtil.HTML_ATR_WIDTH) : null;
String height = sourceElement.hasAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT) ? sourceElement.getAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT) : null;
String newStyle;
@@ -123,7 +130,7 @@
if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_ATR_HEIGHT)
|| name.equalsIgnoreCase(LINE_TYPE_ATTR)
|| name.equalsIgnoreCase(HtmlComponentUtil.HTML_ATR_WIDTH)) {
- if (lineType != null && lineType.equalsIgnoreCase(LINE_BEVELED)) {
+ if (LINE_BEVELED.equalsIgnoreCase(lineType)) {
newStyle = setBeveledStyle(width, height, ComponentUtil
.getHeaderBackgoundImgStyle() + ";" + style); //$NON-NLS-1$
} else {
@@ -136,7 +143,7 @@
} else if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_ALIGN_ATTR)) {
element.removeAttribute(name);
} else if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_STYLE_ATTR)) {
- if (lineType != null && lineType.equalsIgnoreCase(LINE_BEVELED)) {
+ if (LINE_BEVELED.equalsIgnoreCase(lineType)) {
newStyle = setBeveledStyle(width, height, ComponentUtil
.getHeaderBackgoundImgStyle());
} else {
@@ -163,7 +170,7 @@
visualNode, data, name, value);
nsIDOMElement element = queryInterface(visualNode, nsIDOMElement.class);
nsIDOMElement line = getLineElement(element);
- String style = sourceElement.getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ String style = sourceElement.hasAttribute(HtmlComponentUtil.HTML_STYLE_ATTR) ? sourceElement.getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR) : null;
String width = sourceElement.hasAttribute(HtmlComponentUtil.HTML_ATR_WIDTH) ? sourceElement.getAttribute(HtmlComponentUtil.HTML_ATR_WIDTH) : null;
String height = sourceElement.hasAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT) ? sourceElement.getAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT) : null;
String lineType = sourceElement.hasAttribute(LINE_TYPE_ATTR) ? sourceElement.getAttribute(LINE_TYPE_ATTR) : LINE_BEVELED;
@@ -172,7 +179,7 @@
if (!isNumber(value) && (value.indexOf(PIXEL_PREFIX)) == -1) {
return;
}
- if (lineType.equalsIgnoreCase(LINE_BEVELED)) {
+ if (LINE_BEVELED.equalsIgnoreCase(lineType)) {
newStyle = setBeveledStyle(width, value, ComponentUtil
.getHeaderBackgoundImgStyle() + ";" + style); //$NON-NLS-1$
} else {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesToggleControlTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesToggleControlTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesToggleControlTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -28,6 +28,7 @@
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.template.VpeTemplate;
import org.jboss.tools.vpe.editor.template.VpeToggableTemplate;
+import org.jboss.tools.vpe.editor.util.Constants;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -47,11 +48,7 @@
nsIDOMElement span = visualDocument.createElement("span"); //$NON-NLS-1$
storedSwitchSpan = span;
- VpeCreationData creationData = new VpeCreationData(span);
-
- String forIds = sourceElement.getAttribute("for"); //$NON-NLS-1$
- String value = sourceElement.getAttribute("value"); //$NON-NLS-1$
- String switchToState = sourceElement.getAttribute("switchToState"); //$NON-NLS-1$
+ VpeCreationData creationData = new VpeCreationData(span);
ComponentUtil.correctAttribute(sourceElement, span,
"styleClass", //$NON-NLS-1$
@@ -61,14 +58,16 @@
"style", //$NON-NLS-1$
HtmlComponentUtil.HTML_STYLE_ATTR, "color:blue;text-decoration:underline;", "color:blue;text-decoration:underline;"); //$NON-NLS-1$ //$NON-NLS-2$
- span.setAttribute("vpe-user-toggle-id", (switchToState == null ? "" : switchToState.trim())); //$NON-NLS-1$ //$NON-NLS-2$
+ String switchToStateAttrName = "switchToState"; //$NON-NLS-1$
+ String switchToState = sourceElement.hasAttribute(switchToStateAttrName) ?
+ sourceElement.getAttribute(switchToStateAttrName).trim() : Constants.EMPTY;
+ span.setAttribute("vpe-user-toggle-id", switchToState); //$NON-NLS-1$
List<Node> children = ComponentUtil.getChildren(sourceElement);
VpeChildrenInfo bodyInfo = new VpeChildrenInfo(span);
- //string shoudn't be null, if then it's crash application
- if(value==null){
- value=""; //$NON-NLS-1$
- }
+
+ String valueAttrName = "value"; //$NON-NLS-1$
+ String value = sourceElement.hasAttribute(valueAttrName) ? sourceElement.getAttribute(valueAttrName) : Constants.EMPTY;
nsIDOMNode valueText = visualDocument.createTextNode(value);
span.appendChild(valueText);
@@ -92,8 +91,11 @@
super.validate(pageContext, sourceNode, visualDocument, data);
if (storedSwitchSpan == null) return;
- String value = storedSwitchSpan.getAttribute("vpe-user-toggle-id"); //$NON-NLS-1$
- applyAttributeValueOnChildren("vpe-user-toggle-id", value, ComponentUtil.getChildren(storedSwitchSpan)); //$NON-NLS-1$
+ String vpeToogleAttrName = "vpe-user-toggle-id"; //$NON-NLS-1$
+ if (storedSwitchSpan.hasAttribute(vpeToogleAttrName)) {
+ String value = storedSwitchSpan.getAttribute(vpeToogleAttrName);
+ applyAttributeValueOnChildren("vpe-user-toggle-id", value, ComponentUtil.getChildren(storedSwitchSpan)); //$NON-NLS-1$
+ }
applyAttributeValueOnChildren("vpe-user-toggle-lookup-parent", "true", ComponentUtil.getChildren(storedSwitchSpan)); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -114,9 +116,10 @@
Element sourceElement = (Element)(sourceNode instanceof Element ? sourceNode : sourceNode.getParentNode());
- String forIds = sourceElement.getAttribute("for"); //$NON-NLS-1$
- if (forIds == null) return;
-
+ String forAttrName = "for"; //$NON-NLS-1$
+ if (!sourceElement.hasAttribute(forAttrName)) return;
+
+ String forIds = sourceElement.getAttribute(forAttrName);
StringTokenizer st = new StringTokenizer(forIds.trim(), ",", false); //$NON-NLS-1$
while (st.hasMoreElements()) {
String id = st.nextToken().trim();
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTogglePanelTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTogglePanelTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTogglePanelTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -78,7 +78,7 @@
if (child instanceof Element && child.getNodeName().endsWith(":facet")) { //$NON-NLS-1$
Element facet = (Element)child;
- if (facet.hasAttribute("name")) {
+ if (facet.hasAttribute("name")) { //$NON-NLS-1$
String name = facet.getAttribute("name"); //$NON-NLS-1$
states.put(name, facet);
}
@@ -88,9 +88,9 @@
}
private String getInitialState(Element sourceElement) {
- String initialState = sourceElement.hasAttribute("initialState") ? sourceElement.getAttribute("initialState") : null; //$NON-NLS-1$
+ String initialState = sourceElement.hasAttribute("initialState") ? sourceElement.getAttribute("initialState") : null; //$NON-NLS-1$ //$NON-NLS-2$
- if(sourceElement.hasAttribute("stateOrder")) {
+ if(sourceElement.hasAttribute("stateOrder")) { //$NON-NLS-1$
String stateOrder = sourceElement.getAttribute("stateOrder"); //$NON-NLS-1$
StringTokenizer st = new StringTokenizer(stateOrder.trim(), ",", false); //$NON-NLS-1$
String firstState = null;
@@ -119,7 +119,7 @@
private String getActiveState(Element sourceElement) {
String activeStateStr;
- if(!sourceElement.hasAttribute("stateOrder")) return null;
+ if(!sourceElement.hasAttribute("stateOrder")) return null; //$NON-NLS-1$
activeStateStr = (String)toggleMap.get(sourceElement);
@@ -131,7 +131,7 @@
}
private String getNextState(Element sourceElement, String toggleId) {
- if(!sourceElement.hasAttribute("stateOrder")) return null;
+ if(!sourceElement.hasAttribute("stateOrder")) return null; //$NON-NLS-1$
String stateOrder = sourceElement.getAttribute("stateOrder"); //$NON-NLS-1$
String activeState = getActiveState(sourceElement);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesToolBarGroupTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesToolBarGroupTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesToolBarGroupTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -144,12 +144,12 @@
VpeCreationData creationData = null;
Element sourceElement = (Element)sourceNode;
- String itemSeparator = sourceElement.getAttribute(ATTR_ITEMSEPARATOR_NAME);
if (!sourceNode.getParentNode().getNodeName().endsWith(":" + RichFacesToolBarTemplate.TAG_NAME)) { //$NON-NLS-1$
visualNode = RichFacesToolBarTemplate.createExceptionNode(visualDocument, TOOLBAR_PARENT_WARNING);
creationData = new VpeCreationData(visualNode);
} else {
+ String itemSeparator = sourceElement.getAttribute(ATTR_ITEMSEPARATOR_NAME);
itemSeparator = RichFacesToolBarTemplate.checkAndUpdateItemSeparatorName(itemSeparator);
SourceToolBarGroupItems sourceToolBarGroupItems = new SourceToolBarGroupItems(sourceNode,
ATTR_LOCATION_RIGHT_VALUE.equals(sourceElement.getAttribute(ATTR_LOCATION_NAME)),
@@ -171,23 +171,20 @@
nsIDOMElement cell = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
if (toolBarGroupItem.isItem()) {
- Node parentNode = sourceElement.getParentNode();
-
- String styleClass = sourceElement.getAttribute(HtmlComponentUtil.HTML_STYLECLASS_ATTR);
- String style = sourceElement.getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- if (null == styleClass) {
- styleClass = EMPTY;
- }
- if (null == style) {
- style = EMPTY;
- }
+ String styleClass = sourceElement.hasAttribute(HtmlComponentUtil.HTML_STYLECLASS_ATTR) ?
+ sourceElement.getAttribute(HtmlComponentUtil.HTML_STYLECLASS_ATTR) : EMPTY;
+ String style = sourceElement.hasAttribute(HtmlComponentUtil.HTML_STYLE_ATTR) ?
+ sourceElement.getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR) : EMPTY;
+
+ Node parentNode = sourceElement.getParentNode();
if ((null != parentNode) && (parentNode instanceof Element)) {
- String contentClass = ((Element)parentNode).getAttribute(RichFacesToolBarTemplate.CONTENTCLASS_ATTR_NAME);
- String contentStyle = ((Element)parentNode).getAttribute(RichFacesToolBarTemplate.CONTENTSTYLE_ATTR_NAME);
- if (null != contentClass) {
+ Element parentElement = (Element)parentNode;
+ if (parentElement.hasAttribute(RichFacesToolBarTemplate.CONTENTCLASS_ATTR_NAME)) {
+ String contentClass = parentElement.getAttribute(RichFacesToolBarTemplate.CONTENTCLASS_ATTR_NAME);
styleClass += SPACE + contentClass;
}
- if (null != contentStyle) {
+ if (parentElement.hasAttribute(RichFacesToolBarTemplate.CONTENTSTYLE_ATTR_NAME)) {
+ String contentStyle = parentElement.getAttribute(RichFacesToolBarTemplate.CONTENTSTYLE_ATTR_NAME);
style += SPACE + contentStyle;
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodeTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodeTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodeTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -113,58 +113,59 @@
* in model
*/
+ Element parentElement = (Element) sourceElement.getParentNode();
boolean showLinesValue = getShowLinesAttr(sourceElement);
if (NODE_ICON_EXPANDED_ATTR_NAME.equalsIgnoreCase(name)) {
- nsIDOMElement expandedIconCell = queryInterface(visualNode
+
+ nsIDOMElement expandedIconCell = queryInterface(visualNode
.getChildNodes().item(0), nsIDOMElement.class);
nsIDOMElement img = queryInterface(expandedIconCell.getChildNodes().item(0),
- nsIDOMElement.class);
- String parentAttrName = ((Element) sourceElement.getParentNode())
- .getAttribute(NODE_ICON_EXPANDED_ATTR_NAME);
- if (parentAttrName == null || parentAttrName.length() == 0) {
- ComponentUtil.setImg(img,
- showLinesValue == true ? ICON_EXPANDED_WITH_LINES
- : ICON_EXPANDED_WITHOUT_LINES);
+ nsIDOMElement.class);
+
+ if (parentElement.hasAttribute(NODE_ICON_EXPANDED_ATTR_NAME)) {
+ String parentAttrName = parentElement.getAttribute(NODE_ICON_EXPANDED_ATTR_NAME);
+ ComponentUtil.setImgFromResources(pageContext, img,
+ parentAttrName, UNDEFINED_ICON);
} else {
- ComponentUtil.setImgFromResources(pageContext, img,
- parentAttrName, UNDEFINED_ICON);
+ ComponentUtil.setImg(img,
+ showLinesValue == true ? ICON_EXPANDED_WITH_LINES
+ : ICON_EXPANDED_WITHOUT_LINES);
}
- img
- .setAttribute(ICON_PARAM_NAME,
- DEFAULT_ICON_EXPANDED_PARAM_VALUE);
+ img.setAttribute(ICON_PARAM_NAME, DEFAULT_ICON_EXPANDED_PARAM_VALUE);
} else if (NODE_ICON_ATTR_NAME.equalsIgnoreCase(name)
&& !isLastElement(sourceElement)) {
- nsIDOMElement iconCell = queryInterface(visualNode.getChildNodes().item(1),
+
+ nsIDOMElement iconCell = queryInterface(visualNode.getChildNodes().item(1),
nsIDOMElement.class);
-
nsIDOMElement img = queryInterface(iconCell.getChildNodes().item(0),
nsIDOMElement.class);
- String parentAttrName = ((Element) sourceElement.getParentNode())
- .getAttribute(NODE_ICON_ATTR_NAME);
- if (parentAttrName == null || parentAttrName.length() == 0) {
- ComponentUtil.setImg(img,
- showLinesValue == true ? ICON_NODE_WITH_LINES
- : ICON_NODE_WITHOUT_LINES);
+
+ if (parentElement.hasAttribute(NODE_ICON_ATTR_NAME)) {
+ String parentAttrName = parentElement.getAttribute(NODE_ICON_ATTR_NAME);
+ ComponentUtil.setImgFromResources(pageContext, img,
+ parentAttrName, UNDEFINED_ICON);
} else {
- ComponentUtil.setImgFromResources(pageContext, img,
- parentAttrName, UNDEFINED_ICON);
+ ComponentUtil.setImg(img,
+ showLinesValue == true ? ICON_NODE_WITH_LINES
+ : ICON_NODE_WITHOUT_LINES);
}
img.setAttribute(ICON_PARAM_NAME, DEFAULT_ICON_PARAM_VALUE);
} else if (NODE_ICON_LEAF_ATTR_NAME.equalsIgnoreCase(name)
&& isLastElement(sourceElement)) {
+
nsIDOMElement iconCell = queryInterface(visualNode.getChildNodes().item(1),
nsIDOMElement.class);
nsIDOMElement img = queryInterface(iconCell.getChildNodes().item(0), nsIDOMElement.class);
- String parentAttrName = ((Element) sourceElement.getParentNode())
- .getAttribute(NODE_ICON_LEAF_ATTR_NAME);
- if (parentAttrName == null || parentAttrName.length() == 0) {
- ComponentUtil.setImg(img,
- showLinesValue == true ? ICON_LEAF_WITH_LINES
- : ICON_LEAF_WITHOUT_LINES);
+
+ if (parentElement.hasAttribute(NODE_ICON_LEAF_ATTR_NAME)) {
+ String parentAttrName = parentElement.getAttribute(NODE_ICON_LEAF_ATTR_NAME);
+ ComponentUtil.setImgFromResources(pageContext, img,
+ parentAttrName, UNDEFINED_ICON);
} else {
- ComponentUtil.setImgFromResources(pageContext, img,
- parentAttrName, UNDEFINED_ICON);
+ ComponentUtil.setImg(img,
+ showLinesValue == true ? ICON_LEAF_WITH_LINES
+ : ICON_LEAF_WITHOUT_LINES);
}
img.setAttribute(ICON_PARAM_NAME, NODE_ICON_LEAF_ATTR_NAME);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -68,17 +68,15 @@
nsIDOMElement visualElement = visualDocument
.createElement(HTML.TAG_DIV);
Element sourceElement = (Element) sourceNode;
- String style = sourceElement
- .getAttribute(HTML.ATTR_STYLE);
- if (style != null) {
- visualElement
- .setAttribute(HTML.ATTR_STYLE, style);
+
+ if (sourceElement.hasAttribute(HTML.ATTR_STYLE)) {
+ String style = sourceElement.getAttribute(HTML.ATTR_STYLE);
+ visualElement.setAttribute(HTML.ATTR_STYLE, style);
}
- String styleClass = sourceElement
- .getAttribute(HTML.ATTR_CLASS);
- if (styleClass != null) {
- visualElement.setAttribute(HTML.ATTR_CLASS,
- styleClass);
+
+ if (sourceElement.hasAttribute(HTML.ATTR_CLASS)) {
+ String styleClass = sourceElement.getAttribute(HTML.ATTR_CLASS);
+ visualElement.setAttribute(HTML.ATTR_CLASS, styleClass);
}
VpeCreationData vpeCreationData = new VpeCreationData(visualElement);
vpeCreationData.addChildrenInfo(new VpeChildrenInfo(null));
@@ -97,20 +95,20 @@
*/
private void setStylesAttributesToTree(nsIDOMElement treeTable,
Element sourceNode) {
- String styleAttr = sourceNode
- .getAttribute(HTML.ATTR_STYLE);
- if (styleAttr != null && styleAttr.length() != 0) {
- setAttributeToTree(treeTable, HTML.ATTR_STYLE,
- removeFromStyleWithAndHeight(styleAttr));
- treeTable
- .setAttribute(HTML.ATTR_STYLE, styleAttr);
- }
- String styleClassAttr = sourceNode
- .getAttribute(TREE_STYLE_CLASS_ATR_NAME);
- if ((styleClassAttr != null) && (styleClassAttr.length() != 0)) {
- setAttributeToTree(treeTable, HTML.ATTR_CLASS,
- styleClassAttr);
- }
+
+ if (sourceNode.hasAttribute(HTML.ATTR_STYLE)) {
+ String styleAttr = sourceNode.getAttribute(HTML.ATTR_STYLE);
+ setAttributeToTree(treeTable, HTML.ATTR_STYLE,
+ removeFromStyleWithAndHeight(styleAttr));
+ treeTable
+ .setAttribute(HTML.ATTR_STYLE, styleAttr);
+ }
+
+ if (sourceNode.hasAttribute(TREE_STYLE_CLASS_ATR_NAME)) {
+ String styleClassAttr = sourceNode.getAttribute(TREE_STYLE_CLASS_ATR_NAME);
+ setAttributeToTree(treeTable, HTML.ATTR_CLASS,
+ styleClassAttr);
+ }
}
/**
@@ -188,10 +186,9 @@
try {
nsIDOMNodeList list = node.getChildNodes();
nsIDOMElement element = queryInterface(node, nsIDOMElement.class);
- String id = element
- .getAttribute(RichFacesTreeNodesAdaptorTemplate.ID_ATTR_NAME);
- if (id == null)
- id = Constants.EMPTY;
+ String id = element.hasAttribute(RichFacesTreeNodesAdaptorTemplate.ID_ATTR_NAME) ?
+ element.getAttribute(RichFacesTreeNodesAdaptorTemplate.ID_ATTR_NAME) :
+ Constants.EMPTY;
if (node.getNodeName().equalsIgnoreCase(
HTML.TAG_DIV)
&& list.getLength() == 2
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesVirtualEarthTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesVirtualEarthTemplate.java 2010-07-06 08:47:27 UTC (rev 23245)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesVirtualEarthTemplate.java 2010-07-06 11:03:16 UTC (rev 23246)
@@ -44,13 +44,12 @@
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
+ Element sourceElement = (Element) sourceNode;
nsIDOMElement img = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_IMG);
-
- String mapStyleValue = ((Element) sourceNode)
- .getAttribute(MAP_STYLE_ATTRIBUTE_NAME);
-
- if (mapStyleValue != null && searchInMapStyleValues(mapStyleValue)) {
+
+ if (sourceElement.hasAttribute(MAP_STYLE_ATTRIBUTE_NAME)) {
+ String mapStyleValue = sourceElement.getAttribute(MAP_STYLE_ATTRIBUTE_NAME);
if (mapStyleValue.equalsIgnoreCase(MAP_STYLE_VALUES[0]))
ComponentUtil.setImg(img, EARTH_ROAD);
else if (mapStyleValue.equalsIgnoreCase(MAP_STYLE_VALUES[1]))
@@ -62,9 +61,9 @@
copyStyleAttribute(img, sourceNode);
- if (((Element) sourceNode).getAttribute(STYLE_CLASS_ATTR_NAME) != null)
+ if (sourceElement.hasAttribute(STYLE_CLASS_ATTR_NAME))
img.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- ((Element) sourceNode).getAttribute(STYLE_CLASS_ATTR_NAME));
+ sourceElement.getAttribute(STYLE_CLASS_ATTR_NAME));
return new VpeCreationData(img);
}
15 years, 9 months