JBoss Tools SVN: r29324 - in trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0: JSFBlankWithLibs and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-02-24 19:13:30 -0500 (Thu, 24 Feb 2011)
New Revision: 29324
Added:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/.preprocessing
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/.settings/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/.settings/org.jboss.tools.jst.web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/JavaSource/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/faces-config.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/lib/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/lib/jsf-api-2.0.4-b09.jar
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/lib/jsf-impl-2.0.4-b09.jar
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/.preprocessing
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/.settings/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/.settings/org.jboss.tools.jst.web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/JavaSource/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/WebContent/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/WebContent/WEB-INF/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/WebContent/WEB-INF/faces-config.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/WebContent/WEB-INF/lib/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/WebContent/WEB-INF/web.xml
Log:
https://issues.jboss.org/browse/JBIDE-8417
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/.preprocessing
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/.preprocessing (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/.preprocessing 2011-02-25 00:13:30 UTC (rev 29324)
@@ -0,0 +1 @@
+WebContent/WEB-INF/web.xml
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/.settings/org.jboss.tools.jst.web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/.settings/org.jboss.tools.jst.web.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/.settings/org.jboss.tools.jst.web.xml 2011-02-25 00:13:30 UTC (rev 29324)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<file-systems application-name="" model-entity="FileSystems" WORKSPACE_HOME="./WebContent/WEB-INF">
+ <file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
+ <file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
+ location="%workspace.home%/.." NAME="WEB-ROOT"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/../../JavaSource" NAME="src"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/lib" NAME="lib"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/classes" NAME="classes"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/../../ant" NAME="build"/>
+ <WEB model-entity="JstWeb" MODEL_PATH="/web.xml">
+ <MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
+ ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</file-systems>
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/.settings/org.jboss.tools.jst.web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/faces-config.xml 2011-02-25 00:13:30 UTC (rev 29324)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<faces-config
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
+ version="2.0">
+
+</faces-config>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/faces-config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/lib/jsf-api-2.0.4-b09.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/lib/jsf-api-2.0.4-b09.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/lib/jsf-impl-2.0.4-b09.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/lib/jsf-impl-2.0.4-b09.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/web.xml 2011-02-25 00:13:30 UTC (rev 29324)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+#if ($servlet_version == "2.4")
+<web-app version="2.4"
+xmlns="http://java.sun.com/xml/ns/j2ee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+#elseif ($servlet_version == "2.5")
+<web-app version="2.5"
+xmlns="http://java.sun.com/xml/ns/javaee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+#elseif ($servlet_version == "3.0")
+<web-app version="3.0"
+xmlns="http://java.sun.com/xml/ns/javaee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+#else
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+#end
+
+ <display-name>${project.name}</display-name>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>default.html</welcome-file>
+ <welcome-file>default.htm</welcome-file>
+ <welcome-file>default.jsp</welcome-file>
+ </welcome-file-list>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithLibs/WebContent/WEB-INF/web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/.preprocessing
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/.preprocessing (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/.preprocessing 2011-02-25 00:13:30 UTC (rev 29324)
@@ -0,0 +1 @@
+WebContent/WEB-INF/web.xml
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/.settings/org.jboss.tools.jst.web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/.settings/org.jboss.tools.jst.web.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/.settings/org.jboss.tools.jst.web.xml 2011-02-25 00:13:30 UTC (rev 29324)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<file-systems application-name="" model-entity="FileSystems" WORKSPACE_HOME="./WebContent/WEB-INF">
+ <file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
+ <file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
+ location="%workspace.home%/.." NAME="WEB-ROOT"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/../../JavaSource" NAME="src"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/lib" NAME="lib"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/classes" NAME="classes"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/../../ant" NAME="build"/>
+ <WEB model-entity="JstWeb" MODEL_PATH="/web.xml">
+ <MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
+ ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</file-systems>
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/.settings/org.jboss.tools.jst.web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/WebContent/WEB-INF/faces-config.xml 2011-02-25 00:13:30 UTC (rev 29324)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<faces-config
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
+ version="2.0">
+
+</faces-config>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/WebContent/WEB-INF/faces-config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/WebContent/WEB-INF/web.xml 2011-02-25 00:13:30 UTC (rev 29324)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+#if ($servlet_version == "2.4")
+<web-app version="2.4"
+xmlns="http://java.sun.com/xml/ns/j2ee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+#elseif ($servlet_version == "2.5")
+<web-app version="2.5"
+xmlns="http://java.sun.com/xml/ns/javaee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+#elseif ($servlet_version == "3.0")
+<web-app version="3.0"
+xmlns="http://java.sun.com/xml/ns/javaee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+#else
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+#end
+
+ <display-name>${project.name}</display-name>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>default.html</welcome-file>
+ <welcome-file>default.htm</welcome-file>
+ <welcome-file>default.jsp</welcome-file>
+ </welcome-file-list>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFBlankWithoutLibs/WebContent/WEB-INF/web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 10 months
JBoss Tools SVN: r29323 - trunk/build/parent.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-02-24 16:08:00 -0500 (Thu, 24 Feb 2011)
New Revision: 29323
Modified:
trunk/build/parent/pom.xml
Log:
add http://download.jboss.org/jbosstools/updates/helios/ (JBT reqs composite mirror) to default-enabled nightly/composite stuff to help w/ dep resolution when building offline
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2011-02-24 19:25:36 UTC (rev 29322)
+++ trunk/build/parent/pom.xml 2011-02-24 21:08:00 UTC (rev 29323)
@@ -395,14 +395,6 @@
</repositories>
</profile>
- <!-- TODO: do we need this? -->
- <profile>
- <id>jbds-no-target</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- </profile>
-
<!-- Time saver: to build everything from scratch (without target platform);
To enable it use -P helios-no-target in command line. Do not remove repos
that contains the same artefacts, it is done for purpose to make build more
@@ -449,9 +441,6 @@
<enabled>true</enabled>
</releases>
</repository>
- <!-- <repository> <id>jboss-helios</id> <url>http://download.jboss.org/jbosstools/updates/requirements/helios/
- </url> <layout>p2</layout> <snapshots> <enabled>true</enabled> </snapshots>
- <releases> <enabled>true</enabled> </releases> </repository> -->
<repository>
<id>webtools322</id>
<url>http://download.eclipse.org/webtools/downloads/drops/R3.2.2/R-3.2.2-20100...
@@ -825,6 +814,13 @@
<enabled>true</enabled>
</releases>
</repository>
+ <repository>
+ <id>jboss-requirements-composite-mirror</id>
+ <url>http://download.jboss.org/jbosstools/updates/helios/</url>
+ <layout>p2</layout>
+ <snapshots> <enabled>true</enabled> </snapshots>
+ <releases> <enabled>true</enabled> </releases>
+ </repository>
</repositories>
</profile>
13 years, 10 months
JBoss Tools SVN: r29322 - in trunk/jsf: tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2011-02-24 14:25:36 -0500 (Thu, 24 Feb 2011)
New Revision: 29322
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n/I18nValidationComponent.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n/I18nValidator.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/I18nValidatorTest.java
Log:
https://issues.jboss.org/browse/JBIDE-7003, checking for value attr has been added
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n/I18nValidationComponent.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n/I18nValidationComponent.java 2011-02-24 19:16:35 UTC (rev 29321)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n/I18nValidationComponent.java 2011-02-24 19:25:36 UTC (rev 29322)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.jsf.web.validation.i18n;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMText;
import org.jboss.tools.jsf.JSFModelPlugin;
import org.jboss.tools.jsf.messages.JSFUIMessages;
@@ -40,6 +41,18 @@
return component;
}
+ public static I18nValidationComponent createI18nValidationComponent(IDOMAttr attr){
+ I18nValidationComponent component = new I18nValidationComponent();
+ component.setStartOffSet(attr.getValueRegionStartOffset()+1);
+ component.setLength(attr.getValueRegionText().length()-2);
+ component.setLine(attr.getStructuredDocument().getLineOfOffset(
+ component.getStartOffSet()) + 1);
+ component.createValidationMessage();
+ component.createMessageParams();
+ component.setInValidString(attr.getNodeValue());
+ return component;
+ }
+
public String getType() {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n/I18nValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n/I18nValidator.java 2011-02-24 19:16:35 UTC (rev 29321)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n/I18nValidator.java 2011-02-24 19:25:36 UTC (rev 29322)
@@ -36,6 +36,7 @@
import org.eclipse.wst.xml.core.internal.validation.core.NestedValidatorContext;
import org.eclipse.wst.xml.core.internal.validation.core.ValidationReport;
import org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
import org.jboss.tools.jsf.JSFModelPlugin;
import org.jboss.tools.jsf.jsf2.model.JSF2ComponentModelManager;
import org.jboss.tools.jsf.jsf2.util.JSF2ResourceUtil;
@@ -44,6 +45,8 @@
import org.jboss.tools.jst.jsp.bundle.BundleMapUtil;
import org.jboss.tools.jst.web.kb.WebKbPlugin;
import org.jboss.tools.jst.web.kb.preferences.ELSeverityPreferences;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
@@ -156,13 +159,31 @@
.add(I18nValidationComponent
.createI18nValidationComponent((IDOMText) childNode));
}
- } else {
- validateDOM(childNode, jsfnonValComponents);
}
+ if(childNode instanceof Element){
+ Element elementToValidate = (Element) childNode;
+ Attr notValid = getNotValidAttr(elementToValidate);
+ if(notValid!=null){
+ jsfnonValComponents
+ .add(I18nValidationComponent
+ .createI18nValidationComponent((IDOMAttr)notValid));
+ }
+ }
+
+ validateDOM(childNode, jsfnonValComponents);
}
}
-
/**
+ * Checks if Element containt non Externalized strings in value attribute
+ */
+ private Attr getNotValidAttr(Element elementToValidate){
+ Attr notValidNode = null;
+ if(!validateTextNode(elementToValidate.getAttribute("value"))){ //$NON-NLS-1$
+ notValidNode = elementToValidate.getAttributeNode("value"); //$NON-NLS-1$
+ }
+ return notValidNode;
+ }
+ /**
* Return false if not not valid
*
* @param String
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/I18nValidatorTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/I18nValidatorTest.java 2011-02-24 19:16:35 UTC (rev 29321)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/I18nValidatorTest.java 2011-02-24 19:25:36 UTC (rev 29322)
@@ -32,6 +32,8 @@
public class I18nValidatorTest extends AbstractResourceMarkerTest {
private IPreferenceStore store;
+ private IFile testFile;
+ private static final int NUMBER_OF_EXT_PROBLEMS_IN_FILE = 3;
@Override
protected void setUp() throws Exception {
@@ -39,17 +41,17 @@
setProject(ResourcesPlugin.getWorkspace().getRoot()
.getProject("i18nTestProject")); //$NON-NLS-1$
store = WebKbPlugin.getDefault().getPreferenceStore();
+ testFile = getProject().getFile("WebContent/externalization-validator-test-case-1.xhtml"); //$NON-NLS-1$
}
public void testShowErrorMarkers() throws CoreException {
store.setValue(ELSeverityPreferences.NON_EXTERNALIZED_STRINGS, ELSeverityPreferences.WARNING);
- IFile testFile = getProject().getFile("WebContent/externalization-validator-test-case-1.xhtml"); //$NON-NLS-1$
testFile.deleteMarkers(I18nValidationComponent.PROBLEM_ID, true, IResource.DEPTH_ZERO);
IMarker[] elMarkers = testFile.findMarkers(I18nValidationComponent.PROBLEM_ID, true, IResource.DEPTH_ZERO);
assertEquals("Markers should be cleaned", 0,elMarkers.length); //$NON-NLS-1$
ValidationFramework.getDefault().validate(testFile, new NullProgressMonitor());
elMarkers = testFile.findMarkers(I18nValidationComponent.PROBLEM_ID, true, IResource.DEPTH_ZERO);
- assertEquals("Should be 2 Markers", 2,elMarkers.length); //$NON-NLS-1$
+ assertEquals("Should be "+NUMBER_OF_EXT_PROBLEMS_IN_FILE+" Markers", NUMBER_OF_EXT_PROBLEMS_IN_FILE,elMarkers.length); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testDefaultStateI19nValidator() {
@@ -59,7 +61,6 @@
}
public void testChangeMarkerSeverity() throws CoreException {
- IFile testFile = getProject().getFile("WebContent/externalization-validator-test-case-1.xhtml"); //$NON-NLS-1$
testFile.deleteMarkers(I18nValidationComponent.PROBLEM_ID, true, IResource.DEPTH_ZERO);
IMarker[] elMarkers = testFile.findMarkers(I18nValidationComponent.PROBLEM_ID, true, IResource.DEPTH_ZERO);
//changing severity level on ignoring(disable validator)
@@ -72,15 +73,26 @@
store.setValue(ELSeverityPreferences.NON_EXTERNALIZED_STRINGS, ELSeverityPreferences.WARNING);
ValidationFramework.getDefault().validate(testFile, new NullProgressMonitor());
elMarkers = testFile.findMarkers(I18nValidationComponent.PROBLEM_ID, true, IResource.DEPTH_ZERO);
- assertEquals("There shouldn't be 2 validation markers", 2,elMarkers.length); //$NON-NLS-1$
+ assertEquals("There shouldn't be "+NUMBER_OF_EXT_PROBLEMS_IN_FILE+" validation markers", NUMBER_OF_EXT_PROBLEMS_IN_FILE,elMarkers.length); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals("Marker Severity should be warning",(Integer)IMarker.SEVERITY_WARNING, (Integer)elMarkers[0].getAttribute(IMarker.SEVERITY));//$NON-NLS-1$
//changing severity level on warning
store.setValue(ELSeverityPreferences.NON_EXTERNALIZED_STRINGS, ELSeverityPreferences.ERROR);
ValidationFramework.getDefault().validate(testFile, new NullProgressMonitor());
elMarkers = testFile.findMarkers(I18nValidationComponent.PROBLEM_ID, true, IResource.DEPTH_ZERO);
- assertEquals("There shouldn't be 2 validation markers", 2,elMarkers.length); //$NON-NLS-1$
+ assertEquals("There shouldn't be "+NUMBER_OF_EXT_PROBLEMS_IN_FILE+" validation markers", NUMBER_OF_EXT_PROBLEMS_IN_FILE,elMarkers.length); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals("Marker Severity should be warning",(Integer)IMarker.SEVERITY_ERROR, (Integer)elMarkers[0].getAttribute(IMarker.SEVERITY));//$NON-NLS-1$
-
}
+
+// public void testRegionLineIsCorrect() throws CoreException{
+// store.setValue(ELSeverityPreferences.NON_EXTERNALIZED_STRINGS, ELSeverityPreferences.WARNING);
+// ValidationFramework.getDefault().validate(testFile, new NullProgressMonitor());
+// IMarker[] elMarkers = testFile.findMarkers(I18nValidationComponent.PROBLEM_ID, true, IResource.DEPTH_ZERO);
+// assertEquals("There shouldn't be "+NUMBER_OF_EXT_PROBLEMS_IN_FILE+" validation markers", NUMBER_OF_EXT_PROBLEMS_IN_FILE,elMarkers.length); //$NON-NLS-1$ //$NON-NLS-2$
+// assertEquals("Marker Severity should be warning",(Integer)IMarker.SEVERITY_WARNING, (Integer)elMarkers[0].getAttribute(IMarker.SEVERITY));//$NON-NLS-1$
+//
+// assertEquals("Line number should be",8,elMarkers[0].getAttribute(IMarker.LINE_NUMBER)); //$NON-NLS-1$
+// assertEquals("Line number should be",10,elMarkers[1].getAttribute(IMarker.LINE_NUMBER)); //$NON-NLS-1$
+// assertEquals("Line number should be",12,elMarkers[2].getAttribute(IMarker.LINE_NUMBER)); //$NON-NLS-1$
+// }
}
13 years, 10 months
JBoss Tools SVN: r29321 - in trunk/forge: features and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-02-24 14:16:35 -0500 (Thu, 24 Feb 2011)
New Revision: 29321
Added:
trunk/forge/features/org.jboss.tools.seam.forge.feature/pom.xml
trunk/forge/features/pom.xml
trunk/forge/plugins/org.jboss.tools.seam.forge/pom.xml
trunk/forge/plugins/pom.xml
trunk/forge/pom.xml
trunk/forge/site/
trunk/forge/site/pom.xml
trunk/forge/site/site.xml
Log:
- added pom.xml files for hooking forge up in jboss tools build
- created update site
Added: trunk/forge/features/org.jboss.tools.seam.forge.feature/pom.xml
===================================================================
--- trunk/forge/features/org.jboss.tools.seam.forge.feature/pom.xml (rev 0)
+++ trunk/forge/features/org.jboss.tools.seam.forge.feature/pom.xml 2011-02-24 19:16:35 UTC (rev 29321)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.forge.features</groupId>
+ <artifactId>org.jboss.tools.seam.forge.feature</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
\ No newline at end of file
Property changes on: trunk/forge/features/org.jboss.tools.seam.forge.feature/pom.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/forge/features/pom.xml
===================================================================
--- trunk/forge/features/pom.xml (rev 0)
+++ trunk/forge/features/pom.xml 2011-02-24 19:16:35 UTC (rev 29321)
@@ -0,0 +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>
+ <groupId>org.jboss.tools.forge</groupId>
+ <artifactId>features</artifactId>
+ <name>forge.features</name>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <modules>
+ <module>org.jboss.tools.seam.forge.feature</module>
+ </modules>
+</project>
+
Property changes on: trunk/forge/features/pom.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/forge/plugins/org.jboss.tools.seam.forge/pom.xml
===================================================================
--- trunk/forge/plugins/org.jboss.tools.seam.forge/pom.xml (rev 0)
+++ trunk/forge/plugins/org.jboss.tools.seam.forge/pom.xml 2011-02-24 19:16:35 UTC (rev 29321)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.forge.plugins</groupId>
+ <artifactId>org.jboss.tools.seam.forge</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
Property changes on: trunk/forge/plugins/org.jboss.tools.seam.forge/pom.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/forge/plugins/pom.xml
===================================================================
--- trunk/forge/plugins/pom.xml (rev 0)
+++ trunk/forge/plugins/pom.xml 2011-02-24 19:16:35 UTC (rev 29321)
@@ -0,0 +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>
+ <groupId>org.jboss.tools.forge</groupId>
+ <artifactId>plugins</artifactId>
+ <name>forge.plugins</name>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <modules>
+ <module>org.jboss.tools.seam.forge</module>
+ </modules>
+</project>
+
Property changes on: trunk/forge/plugins/pom.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/forge/pom.xml
===================================================================
--- trunk/forge/pom.xml (rev 0)
+++ trunk/forge/pom.xml 2011-02-24 19:16:35 UTC (rev 29321)
@@ -0,0 +1,15 @@
+<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>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>forge</artifactId>
+ <name>forge.all</name>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <modules>
+ <module>features</module>
+ <module>plugins</module>
+ <module>site</module>
+ </modules>
+</project>
+
Property changes on: trunk/forge/pom.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/forge/site/pom.xml
===================================================================
--- trunk/forge/site/pom.xml (rev 0)
+++ trunk/forge/site/pom.xml 2011-02-24 19:16:35 UTC (rev 29321)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.forge</groupId>
+ <artifactId>forge.site</artifactId>
+ <name>forge.site</name>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>eclipse-update-site</packaging>
+</project>
\ No newline at end of file
Property changes on: trunk/forge/site/pom.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/forge/site/site.xml
===================================================================
--- trunk/forge/site/site.xml (rev 0)
+++ trunk/forge/site/site.xml 2011-02-24 19:16:35 UTC (rev 29321)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools Forge Nightly Build Update Site -->
+ <category-def label="JBoss Tools Forge Nightly Build Update Site" name="JBoss Tools Forge Nightly Build Update Site">
+ <description>JBoss Tools Forge Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.seam.forge.feature_0.0.0.jar" id="org.jboss.tools.seam.forge.feature" version="0.0.0">
+ <category name="JBoss Tools Forge Nightly Build Update Site"/>
+ </feature>
+</site>
Property changes on: trunk/forge/site/site.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 10 months
JBoss Tools SVN: r29320 - in branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project: version and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-02-24 13:10:53 -0500 (Thu, 24 Feb 2011)
New Revision: 29320
Modified:
branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/NewWebProjectContext.java
branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/version/ProjectVersion.java
Log:
JBIDE-8433
https://issues.jboss.org/browse/JBIDE-8433
Modified: branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/NewWebProjectContext.java
===================================================================
--- branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/NewWebProjectContext.java 2011-02-24 18:10:13 UTC (rev 29319)
+++ branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/NewWebProjectContext.java 2011-02-24 18:10:53 UTC (rev 29320)
@@ -146,12 +146,13 @@
if(projectTemplateEdit == null) return null;
ProjectVersion v = projectTemplateEdit.getProjectVersion();
if(v == null) return null;
- String pref = v.getPreferredServletVersion();
- if(pref == null) return null;
- int c = compareServletVersions(pref, servletVersion);
+ String min = v.getMinimalServletVersion();
+ if(min == null) min = v.getPreferredServletVersion();
+ if(min == null) return null;
+ int c = compareServletVersions(min, servletVersion);
if(c > 0) {
return MessageFormat.format(WebUIMessages.NewWebProjectContext_ServletVersionMustBeAtLeast,
- pref);
+ min);
}
return null;
}
Modified: branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/version/ProjectVersion.java
===================================================================
--- branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/version/ProjectVersion.java 2011-02-24 18:10:13 UTC (rev 29319)
+++ branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/version/ProjectVersion.java 2011-02-24 18:10:53 UTC (rev 29320)
@@ -37,6 +37,7 @@
String[] order = new String[0];
String preferredServletVersion = null;
+ String minimalServletVersion = null;
ProjectVersion(ProjectVersions versions) {
this.versions = versions;
@@ -66,6 +67,10 @@
return preferredServletVersion;
}
+ public String getMinimalServletVersion() {
+ return minimalServletVersion;
+ }
+
public String getErrorMessage() {
LibraryReference core = null;
LibraryReference common = null;
@@ -104,6 +109,10 @@
if(sv != null && sv.trim().length() > 0) {
preferredServletVersion = sv.trim();
}
+ sv = e.getAttribute("min-servlet-version"); //$NON-NLS-1$
+ if(sv != null && sv.trim().length() > 0) {
+ minimalServletVersion = sv.trim();
+ }
ArrayList<LibraryReference> ls = new ArrayList<LibraryReference>();
NodeList nl = e.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
13 years, 10 months
JBoss Tools SVN: r29319 - branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.projecttemplates/templates.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-02-24 13:10:13 -0500 (Thu, 24 Feb 2011)
New Revision: 29319
Modified:
branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml
Log:
JBIDE-8433
https://issues.jboss.org/browse/JBIDE-8433
Modified: branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml
===================================================================
--- branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml 2011-02-24 17:32:00 UTC (rev 29318)
+++ branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml 2011-02-24 18:10:13 UTC (rev 29319)
@@ -17,7 +17,7 @@
<refLib type="servlet" location="../servlet" />
<projectTempl location="./jsf-1.2-facelets" />
</version>
- <version displayName="JSF 2.0" servlet-version="3.0">
+ <version displayName="JSF 2.0" servlet-version="3.0" min-servlet-version="2.5">
<lib type="core" location="../lib/ApacheCommon2.3" />
<refLib type="servlet" location="../servlet" />
<projectTempl location="./jsf-2.0" />
13 years, 10 months
JBoss Tools SVN: r29318 - trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2011-02-24 12:32:00 -0500 (Thu, 24 Feb 2011)
New Revision: 29318
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/I18nValidatorTest.java
Log:
https://issues.jboss.org/browse/JBIDE-7003, one more test case of changing severity has been added to junit
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/I18nValidatorTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/I18nValidatorTest.java 2011-02-24 17:15:05 UTC (rev 29317)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/I18nValidatorTest.java 2011-02-24 17:32:00 UTC (rev 29318)
@@ -57,4 +57,30 @@
"By Default I18nValidator should be ignored", ELSeverityPreferences.IGNORE,//$NON-NLS-1$
store.getDefaultString(ELSeverityPreferences.NON_EXTERNALIZED_STRINGS));
}
+
+ public void testChangeMarkerSeverity() throws CoreException {
+ IFile testFile = getProject().getFile("WebContent/externalization-validator-test-case-1.xhtml"); //$NON-NLS-1$
+ testFile.deleteMarkers(I18nValidationComponent.PROBLEM_ID, true, IResource.DEPTH_ZERO);
+ IMarker[] elMarkers = testFile.findMarkers(I18nValidationComponent.PROBLEM_ID, true, IResource.DEPTH_ZERO);
+ //changing severity level on ignoring(disable validator)
+ store.setValue(ELSeverityPreferences.NON_EXTERNALIZED_STRINGS, ELSeverityPreferences.IGNORE);
+ assertEquals("Markers should be cleaned", 0,elMarkers.length); //$NON-NLS-1$
+ ValidationFramework.getDefault().validate(testFile, new NullProgressMonitor());
+ elMarkers = testFile.findMarkers(I18nValidationComponent.PROBLEM_ID, true, IResource.DEPTH_ZERO);
+ assertEquals("There shouldn't be any validation markers", 0,elMarkers.length); //$NON-NLS-1$
+ //changing severity level on warning
+ store.setValue(ELSeverityPreferences.NON_EXTERNALIZED_STRINGS, ELSeverityPreferences.WARNING);
+ ValidationFramework.getDefault().validate(testFile, new NullProgressMonitor());
+ elMarkers = testFile.findMarkers(I18nValidationComponent.PROBLEM_ID, true, IResource.DEPTH_ZERO);
+ assertEquals("There shouldn't be 2 validation markers", 2,elMarkers.length); //$NON-NLS-1$
+ assertEquals("Marker Severity should be warning",(Integer)IMarker.SEVERITY_WARNING, (Integer)elMarkers[0].getAttribute(IMarker.SEVERITY));//$NON-NLS-1$
+
+ //changing severity level on warning
+ store.setValue(ELSeverityPreferences.NON_EXTERNALIZED_STRINGS, ELSeverityPreferences.ERROR);
+ ValidationFramework.getDefault().validate(testFile, new NullProgressMonitor());
+ elMarkers = testFile.findMarkers(I18nValidationComponent.PROBLEM_ID, true, IResource.DEPTH_ZERO);
+ assertEquals("There shouldn't be 2 validation markers", 2,elMarkers.length); //$NON-NLS-1$
+ assertEquals("Marker Severity should be warning",(Integer)IMarker.SEVERITY_ERROR, (Integer)elMarkers[0].getAttribute(IMarker.SEVERITY));//$NON-NLS-1$
+
+ }
}
13 years, 10 months
JBoss Tools SVN: r29317 - in trunk/jsf: plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2011-02-24 12:15:05 -0500 (Thu, 24 Feb 2011)
New Revision: 29317
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/LocalizedMessage.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n/I18nValidator.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/I18nValidatorTest.java
Log:
https://issues.jboss.org/browse/JBIDE-7003 preferences has been added to ext-validator
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/LocalizedMessage.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/LocalizedMessage.java 2011-02-24 16:54:44 UTC (rev 29316)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/LocalizedMessage.java 2011-02-24 17:15:05 UTC (rev 29317)
@@ -72,12 +72,12 @@
}
public static Message createJSFLocalizedMessage(
- IJSFValidationComponent ijsfValidationComponent) {
+ IJSFValidationComponent ijsfValidationComponent, int severity) {
LocalizedMessage i18nLocMessage = new LocalizedMessage();
i18nLocMessage.component = ijsfValidationComponent;
i18nLocMessage.setAttribute("problemType", I18nValidationComponent.PROBLEM_ID); //$NON-NLS-1$
i18nLocMessage.setAttribute(IMarker.LINE_NUMBER, i18nLocMessage.getLineNumber());
- i18nLocMessage.setAttribute(IMarker.SEVERITY, 1);
+ i18nLocMessage.setAttribute(IMarker.SEVERITY, severity);
i18nLocMessage.setAttribute(ValidatorMessage.ValidationId, "org.jboss.tools.jsf.i18n.source"); //$NON-NLS-1$
i18nLocMessage.setAttribute(IMarker.MESSAGE,i18nLocMessage.getText());
i18nLocMessage.setAttribute(JSF2ValidatorConstants.PROBLEM_LENGHT, i18nLocMessage.getLength());
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n/I18nValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n/I18nValidator.java 2011-02-24 16:54:44 UTC (rev 29316)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n/I18nValidator.java 2011-02-24 17:15:05 UTC (rev 29317)
@@ -13,11 +13,13 @@
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.wst.sse.ui.internal.reconcile.validator.ISourceValidator;
@@ -40,6 +42,8 @@
import org.jboss.tools.jsf.web.validation.IJSFValidationComponent;
import org.jboss.tools.jsf.web.validation.LocalizedMessage;
import org.jboss.tools.jst.jsp.bundle.BundleMapUtil;
+import org.jboss.tools.jst.web.kb.WebKbPlugin;
+import org.jboss.tools.jst.web.kb.preferences.ELSeverityPreferences;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
@@ -48,20 +52,22 @@
* Validator which looks for non externalized strings
*
* @author mareshkau
- *
+ *
*/
@SuppressWarnings("restriction")
-public class I18nValidator extends Validator implements ISourceValidator, IValidator{
+public class I18nValidator extends Validator implements ISourceValidator,
+ IValidator {
private IDOMDocument document;
-
+ private final static int VALIDATOR_DISABLED = -1;
+
public void connect(IDocument document) {
- this.document=JSF2ComponentModelManager
- .getReadableDOMDocument(document);
+ this.document = JSF2ComponentModelManager
+ .getReadableDOMDocument(document);
}
public void disconnect(IDocument document) {
- this.document=null;
+ this.document = null;
}
public void validate(IRegion dirtyRegion, IValidationContext helper,
@@ -71,77 +77,116 @@
public void cleanup(IReporter reporter) {
// TODO Auto-generated method stub
-
+
}
+
@Override
- public ValidationResult validate(IResource resource, int kind, ValidationState state, IProgressMonitor monitor){
- if(resource instanceof IFile)
- this.document= JSF2ComponentModelManager
- .getReadableDOMDocument((IFile) resource);
+ public ValidationResult validate(IResource resource, int kind,
+ ValidationState state, IProgressMonitor monitor) {
+ if (resource instanceof IFile)
+ this.document = JSF2ComponentModelManager
+ .getReadableDOMDocument((IFile) resource);
return super.validate(resource, kind, state, monitor);
}
-
+
@Override
public ValidationReport validate(String uri, InputStream inputstream,
NestedValidatorContext context, ValidationResult result) {
- XMLValidationInfo xmlValidationInfo = new XMLValidationInfo(uri);
- List<IJSFValidationComponent> jsfnonValComponents = new ArrayList<IJSFValidationComponent>();
- validateDOM(document, jsfnonValComponents);
- for (IJSFValidationComponent ijsfValidationComponent : jsfnonValComponents) {
- xmlValidationInfo.addWarning(ijsfValidationComponent.getValidationMessage(),
- ijsfValidationComponent.getLine(), 0, uri, null, ijsfValidationComponent.getMessageParams());
+ XMLValidationInfo xmlValidationInfo = new XMLValidationInfo(uri);
+ List<IJSFValidationComponent> jsfnonValComponents = new ArrayList<IJSFValidationComponent>();
+ validateDOM(document, jsfnonValComponents);
+ for (IJSFValidationComponent ijsfValidationComponent : jsfnonValComponents) {
+ if (IMarker.SEVERITY_WARNING == getWarningLevel()) {
+ xmlValidationInfo.addWarning(
+ ijsfValidationComponent.getValidationMessage(),
+ ijsfValidationComponent.getLine(), 0, uri, null,
+ ijsfValidationComponent.getMessageParams());
+ } else if (IMarker.SEVERITY_ERROR == getWarningLevel()) {
+ xmlValidationInfo.addError(
+ ijsfValidationComponent.getValidationMessage(),
+ ijsfValidationComponent.getLine(), 0, uri, null,
+ ijsfValidationComponent.getMessageParams());
+ }
+ }
+ return xmlValidationInfo;
}
- return xmlValidationInfo;
- }
+
@Override
public void validate(IValidationContext helper, IReporter reporter)
throws ValidationException {
- List<IJSFValidationComponent> jsfnonValComponents = new ArrayList<IJSFValidationComponent>();
+ if(document!=null) {
+ List<IJSFValidationComponent> jsfnonValComponents = new ArrayList<IJSFValidationComponent>();
validateDOM(document, jsfnonValComponents);
IResource resource = JSF2ResourceUtil.getValidatingResource(helper);
reportProblems(resource, reporter, jsfnonValComponents);
+ }
}
-
+
private void reportProblems(IResource resource, IReporter reporter,
- List<IJSFValidationComponent> jsfValComponents ) {
- if(resource==null) return;
+ List<IJSFValidationComponent> jsfValComponents) {
+ if (resource == null)
+ return;
try {
- resource.deleteMarkers(I18nValidationComponent.PROBLEM_ID, false, IResource.DEPTH_INFINITE);
+ resource.deleteMarkers(I18nValidationComponent.PROBLEM_ID, false,
+ IResource.DEPTH_INFINITE);
+ if(getWarningLevel()==I18nValidator.VALIDATOR_DISABLED) return;
for (IJSFValidationComponent ijsfValidationComponent : jsfValComponents) {
- Message locMessage = LocalizedMessage.createJSFLocalizedMessage(ijsfValidationComponent);
+ Message locMessage = LocalizedMessage
+ .createJSFLocalizedMessage(ijsfValidationComponent,
+ getWarningLevel());
reporter.addMessage(this, locMessage);
- IMarker marker = resource.createMarker(I18nValidationComponent.PROBLEM_ID);
- marker.setAttributes(locMessage.getAttributes());
+ IMarker marker = resource
+ .createMarker(I18nValidationComponent.PROBLEM_ID);
+ marker.setAttributes(locMessage.getAttributes());
}
} catch (CoreException e) {
JSFModelPlugin.getPluginLog().logError(e);
}
}
-
-
-
- private void validateDOM(Node node, List<IJSFValidationComponent> jsfnonValComponents){
+
+ private void validateDOM(Node node,
+ List<IJSFValidationComponent> jsfnonValComponents) {
+ if(getWarningLevel()==I18nValidator.VALIDATOR_DISABLED) return;
NodeList childNodes = node.getChildNodes();
- for(int i=0;i<childNodes.getLength();i++) {
+ for (int i = 0; i < childNodes.getLength(); i++) {
Node childNode = childNodes.item(i);
- if(childNode instanceof Text){
- if(!validateTextNode(((Text)childNode).getNodeValue())){
- jsfnonValComponents.add(I18nValidationComponent.createI18nValidationComponent((IDOMText)childNode));
+ if (childNode instanceof Text) {
+ if (!validateTextNode(((Text) childNode).getNodeValue())) {
+ jsfnonValComponents
+ .add(I18nValidationComponent
+ .createI18nValidationComponent((IDOMText) childNode));
}
- }else {
+ } else {
validateDOM(childNode, jsfnonValComponents);
- }
+ }
}
}
+
/**
* Return false if not not valid
- * @param String to validate
+ *
+ * @param String
+ * to validate
* @return true is string ext and valid, false otherwise
- *
+ *
*/
- private boolean validateTextNode(String stringToValidate){
- if(stringToValidate==null) return true;
- if(stringToValidate.trim().length()<1) return true;
+ private boolean validateTextNode(String stringToValidate) {
+ if (stringToValidate == null)
+ return true;
+ if (stringToValidate.trim().length() < 1)
+ return true;
return BundleMapUtil.isContainsEl(stringToValidate);
}
+
+ private static int getWarningLevel() {
+ IPreferenceStore store = WebKbPlugin.getDefault().getPreferenceStore();
+ if (ELSeverityPreferences.WARNING.equals(store
+ .getString(ELSeverityPreferences.NON_EXTERNALIZED_STRINGS))) {
+ return IMarker.SEVERITY_WARNING;
+ } else if (ELSeverityPreferences.ERROR.equals(store
+ .getString(ELSeverityPreferences.NON_EXTERNALIZED_STRINGS))) {
+ return IMarker.SEVERITY_ERROR;
+ }
+ return VALIDATOR_DISABLED;
+ }
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/I18nValidatorTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/I18nValidatorTest.java 2011-02-24 16:54:44 UTC (rev 29316)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/I18nValidatorTest.java 2011-02-24 17:15:05 UTC (rev 29317)
@@ -27,17 +27,22 @@
* Test class for Externalize String Validator
*
* @author mareshkau
- *
+ *
*/
-public class I18nValidatorTest extends AbstractResourceMarkerTest{
+public class I18nValidatorTest extends AbstractResourceMarkerTest {
+ private IPreferenceStore store;
+
@Override
protected void setUp() throws Exception {
super.setUp();
- setProject(ResourcesPlugin.getWorkspace().getRoot().getProject("i18nTestProject")); //$NON-NLS-1$
+ setProject(ResourcesPlugin.getWorkspace().getRoot()
+ .getProject("i18nTestProject")); //$NON-NLS-1$
+ store = WebKbPlugin.getDefault().getPreferenceStore();
}
-
+
public void testShowErrorMarkers() throws CoreException {
+ store.setValue(ELSeverityPreferences.NON_EXTERNALIZED_STRINGS, ELSeverityPreferences.WARNING);
IFile testFile = getProject().getFile("WebContent/externalization-validator-test-case-1.xhtml"); //$NON-NLS-1$
testFile.deleteMarkers(I18nValidationComponent.PROBLEM_ID, true, IResource.DEPTH_ZERO);
IMarker[] elMarkers = testFile.findMarkers(I18nValidationComponent.PROBLEM_ID, true, IResource.DEPTH_ZERO);
@@ -47,8 +52,9 @@
assertEquals("Should be 2 Markers", 2,elMarkers.length); //$NON-NLS-1$
}
- public void testDefaultStateI19nValidator(){
- IPreferenceStore store = WebKbPlugin.getDefault().getPreferenceStore();
- assertEquals("By Default I18nValidator should be ignored",ELSeverityPreferences.IGNORE,store.getDefaultString(ELSeverityPreferences.NON_EXTERNALIZED_STRINGS)); //$NON-NLS-1$
+ public void testDefaultStateI19nValidator() {
+ assertEquals(
+ "By Default I18nValidator should be ignored", ELSeverityPreferences.IGNORE,//$NON-NLS-1$
+ store.getDefaultString(ELSeverityPreferences.NON_EXTERNALIZED_STRINGS));
}
}
13 years, 10 months
JBoss Tools SVN: r29316 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-02-24 11:54:44 -0500 (Thu, 24 Feb 2011)
New Revision: 29316
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/ChangeLog
Log:
[JBIDE-8478] added fallback to instance name in case no alias is present
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/ChangeLog 2011-02-24 16:54:28 UTC (rev 29315)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/ChangeLog 2011-02-24 16:54:44 UTC (rev 29316)
@@ -1,3 +1,8 @@
+2011-02-24 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
+
+ * src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java (createConnectionName):
+ [JBIDE-8478] added fallback to instance name in case no alias is present
+
2011-02-18 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
* src/org/jboss/tools/deltacloud/integration/wizard/RSEandASWizardPage.java
13 years, 10 months
JBoss Tools SVN: r29315 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-02-24 11:54:28 -0500 (Thu, 24 Feb 2011)
New Revision: 29315
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java
Log:
[JBIDE-8478] added fallback to instance name in case no alias is present
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java 2011-02-24 15:57:12 UTC (rev 29314)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java 2011-02-24 16:54:28 UTC (rev 29315)
@@ -70,7 +70,11 @@
public static String createConnectionName(DeltaCloudInstance instance) {
Assert.isLegal(instance != null, "Cannot create connection name: instance is not defined");
- return instance.getAlias();
+ String connectionName = instance.getAlias();
+ if (connectionName == null || connectionName.length() == 0) {
+ connectionName = instance.getName();
+ }
+ return connectionName;
}
/**
13 years, 10 months