Author: vrubezhny
Date: 2010-09-17 13:02:00 -0400 (Fri, 17 Sep 2010)
New Revision: 24999
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.classpath
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.project
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.eclipse.jdt.core.prefs
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.eclipse.jst.common.project.facet.core.prefs
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.eclipse.wst.common.component
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.jboss.tools.jst.web.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/JavaSource/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/JavaSource/demo/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/JavaSource/demo/Person.java
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/JavaSource/resources.properties
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/WEB-INF/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/WEB-INF/faces-config.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/WEB-INF/lib/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/WEB-INF/lib/jsf-api.jar
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/WEB-INF/lib/jsf-impl.jar
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/WEB-INF/web.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/pages/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/pages/greeting.jsp
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/pages/greeting.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/pages/greeting1.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/templates/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/templates/common.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/ca/test/JsfJspJbide1704Test.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/ca/test/JsfJspJbide1717Test.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfCATests.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF
Log:
JBIDE-6529 : jsf test failures
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF 2010-09-17 16:32:31 UTC
(rev 24998)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF 2010-09-17 17:02:00 UTC
(rev 24999)
@@ -13,8 +13,10 @@
org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
+ org.eclipse.jface.text,
org.jboss.tools.tests,
org.jboss.tools.common.test,
+ org.jboss.tools.jst.jsp.test,
org.jboss.tools.common.model,
org.jboss.tools.jsf,
org.jboss.tools.jsf.ui,
@@ -23,8 +25,10 @@
org.eclipse.ui.ide,
org.eclipse.ltk.core.refactoring,
org.eclipse.wst.validation,
- org.jboss.tools.common.el.core;bundle-version="3.2.0"
+ org.jboss.tools.common.el.core;bundle-version="3.2.0",
+ org.jboss.tools.jst.jsp;bundle-version="3.2.0"
Bundle-Activator: org.jboss.tools.jsf.plugin.JsfTestPlugin
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.jboss.tools.jst.jsp.contentassist
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.classpath
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.classpath
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.classpath 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="JavaSource"/>
+ <classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output"
path="WebContent/WEB-INF/classes"/>
+</classpath>
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.project
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.project
(rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.project 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>JsfJbide1704Test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.jboss.tools.jsf.jsfnature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ </natures>
+</projectDescription>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.eclipse.jdt.core.prefs 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,7 @@
+#Wed Jan 30 17:08:49 MSK 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.eclipse.jst.common.project.facet.core.prefs
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.eclipse.jst.common.project.facet.core.prefs
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.eclipse.jst.common.project.facet.core.prefs 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,4 @@
+#Wed Jan 30 17:08:50 MSK 2008
+classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\:org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\:\:jdk1.5.0_07/owners=jst.java\:5.0
+classpath.helper/org.jboss.ide.eclipse.as.classpath.core.runtime.ProjectRuntimeInitializer\:\:JBoss\
4.2\ Runtime/owners=jst.web\:2.4
+eclipse.preferences.version=1
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.eclipse.wst.common.component
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.eclipse.wst.common.component
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.eclipse.wst.common.component 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="JsfJbide1704Test">
+<wb-resource deploy-path="/" source-path="/WebContent"/>
+<wb-resource deploy-path="/WEB-INF/classes"
source-path="/JavaSource"/>
+<property name="context-root" value="JsfJbide1704Test"/>
+<property name="java-output-path" value="build/classes"/>
+</wb-module>
+</project-modules>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.eclipse.wst.common.project.facet.core.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.eclipse.wst.common.project.facet.core.xml 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="JBoss 4.2 Runtime"/>
+ <fixed facet="jst.java"/>
+ <fixed facet="jst.web"/>
+ <installed facet="jst.java" version="5.0"/>
+ <installed facet="jst.web" version="2.4"/>
+</faceted-project>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.jboss.tools.jst.web.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.jboss.tools.jst.web.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/.settings/org.jboss.tools.jst.web.xml 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<file-systems VERSION="2.0.0" application-name="JsfJbide1704Test"
+ model-entity="FileSystems"
workspace-home="./WebContent/WEB-INF">
+ <file-system NAME="WEB-INF" location="%workspace.home%"
model-entity="FileSystemFolder"/>
+ <file-system NAME="WEB-ROOT" info="Content-Type=Web"
+ location="%workspace.home%/.."
model-entity="FileSystemFolder"/>
+ <file-system NAME="src"
location="%workspace.home%/../../JavaSource"
model-entity="FileSystemFolder"/>
+ <file-system NAME="lib" location="%workspace.home%/lib"
model-entity="FileSystemFolder"/>
+ <file-system NAME="classes" location="%workspace.home%/classes"
model-entity="FileSystemFolder"/>
+ <file-system NAME="lib-commons-beanutils.jar" info="hidden=yes"
+ location="%workspace.home%/lib/commons-beanutils.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-commons-collections.jar"
info="hidden=yes"
+ location="%workspace.home%/lib/commons-collections.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-commons-digester.jar" info="hidden=yes"
+ location="%workspace.home%/lib/commons-digester.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-commons-logging.jar" info="hidden=yes"
+ location="%workspace.home%/lib/commons-logging.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-jstl.jar" info="hidden=yes"
+ location="%workspace.home%/lib/jstl.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-standard.jar" info="hidden=yes"
+ location="%workspace.home%/lib/standard.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-jsf-facelets.jar"
+ location="%workspace.home%/lib/jsf-facelets.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="flet001" location="%eclipse.project%"
model-entity="FileSystemFolder"/>
+ <file-system NAME="lib-common-annotations.jar" info="hidden=yes"
+ location="%workspace.home%/lib/common-annotations.jar"
model-entity="FileSystemJar"/>
+ <file-system NAME="lib-jsf-tlds.jar" info="hidden=yes"
+ location="%workspace.home%/lib/jsf-tlds.jar"
model-entity="FileSystemJar"/>
+ <web SERVLET_VERSION="2.5" model-entity="JstWeb"
model-path="/web.xml">
+ <module URI="/WEB-INF/faces-config.xml"
model-entity="WebJSFModule"
+ model-path="/faces-config.xml" root="WEB-ROOT"
src="src"/>
+ </web>
+</file-systems>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/JavaSource/demo/Person.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/JavaSource/demo/Person.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/JavaSource/demo/Person.java 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package demo;
+
+/**
+ * Created by JBoss Developer Studio
+*
+ */
+public class Person {
+ private String name;
+
+ public Person() {
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/JavaSource/resources.properties
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/JavaSource/resources.properties
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/JavaSource/resources.properties 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,2 @@
+prompt=Your Name\:
+greeting=Hello
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/WEB-INF/faces-config.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/WEB-INF/faces-config.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/WEB-INF/faces-config.xml 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config version="1.2"
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xi="http://www.w3.org/2001/XInclude"
+
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_1_2.xsd">
+ <managed-bean>
+ <managed-bean-name>person</managed-bean-name>
+ <managed-bean-class>demo.Person</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>name</property-name>
+ <value/>
+ </managed-property>
+ </managed-bean>
+ <navigation-rule>
+ <from-view-id>/pages/greeting.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>greeting</from-outcome>
+ <to-view-id>/pages/greeting.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <application>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ </application>
+</faces-config>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/WEB-INF/lib/jsf-api.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/WEB-INF/lib/jsf-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/WEB-INF/lib/jsf-impl.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/WEB-INF/lib/jsf-impl.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/WEB-INF/web.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/WEB-INF/web.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/WEB-INF/web.xml 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<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">
+ <description>Facelets StarterKit</description>
+ <display-name>JsfJbide1704Test</display-name>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <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>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/pages/greeting.jsp
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/pages/greeting.jsp
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/pages/greeting.jsp 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,20 @@
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+
+<html>
+<head>
+ <title>Facelets Greeting Page</title>
+</head>
+<body>
+ <f:view>
+ <f:loadBundle basename="resources" var="msg" />
+
+ <strong>
+ <h:outputText value="#{msg.greeting}" />
+
+ <h:outputText value="#{person.name}" />
+ <h:outputText value="!" />
+ </strong>
+ </f:view>
+</body>
+</html>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/pages/greeting.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/pages/greeting.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/pages/greeting.xhtml 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core">
+
+ <f:loadBundle basename="resources" var="msg" />
+ <ui:composition template="/templates/common.xhtml">
+ <ui:define name="pageTitle">Greeting to User</ui:define>
+ <ui:define name="pageHeader">Facelets Greeting Page</ui:define>
+ <ui:define name="body">
+ <h:outputText value="#{msg.greeting}" />
+ #{msg.greeting} #{person.name}!
+ </ui:define>
+ </ui:composition>
+</html>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/pages/greeting1.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/pages/greeting1.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/pages/greeting1.xhtml 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core">
+
+ <f:loadBundle basename="resources" var="msg" />
+ <ui:composition template="/templates/common.xhtml">
+ <ui:define name="pageTitle">Greeting to User</ui:define>
+ <ui:define name="pageHeader">Facelets Greeting Page</ui:define>
+ <ui:define name="body">
+ <h:outputText value="#{msg.greeting}" />
+ #{msg.greeting} #{person.name}!
+ </ui:define>
+ </ui:composition>
+</html>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/templates/common.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/templates/common.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JsfJbide1704Test/WebContent/templates/common.xhtml 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core">
+
+ <f:loadBundle basename="resources" var="msg" />
+ <head>
+ <title><ui:insert name="pageTitle">Page
Title</ui:insert></title>
+ <style type="text/css">
+ body {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ }
+ h1 {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 16px;
+ }
+ </style>
+ </head>
+
+ <body>
+ <h1><ui:insert name="pageHeader">Page
Header</ui:insert></h1>
+ <p><ui:insert name="body">Page Body</ui:insert></p>
+ </body>
+</html>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/ca/test/JsfJspJbide1704Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/ca/test/JsfJspJbide1704Test.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/ca/test/JsfJspJbide1704Test.java 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,115 @@
+package org.jboss.tools.jsf.ca.test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.FindReplaceDocumentAdapter;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
+import org.jboss.tools.jst.jsp.contentassist.AutoContentAssistantProposal;
+import org.jboss.tools.jst.jsp.test.TestUtil;
+import org.jboss.tools.jst.jsp.test.ca.ContentAssistantTestCase;
+import org.jboss.tools.test.util.TestProjectProvider;
+
+public class JsfJspJbide1704Test extends ContentAssistantTestCase {
+ TestProjectProvider provider = null;
+
+ boolean makeCopy = false;
+ private static final String PROJECT_NAME = "JsfJbide1704Test";
+ private static final String PAGE_NAME = "/WebContent/pages/greeting";
+
+ public static Test suite() {
+ return new TestSuite(JsfJspJbide1704Test.class);
+ }
+
+ public void setUp() throws Exception {
+ provider = new TestProjectProvider("org.jboss.tools.jsf.test", null,
PROJECT_NAME, makeCopy);
+ project = provider.getProject();
+ }
+
+ protected void tearDown() throws Exception {
+ if(provider != null) {
+ provider.dispose();
+ }
+ }
+
+ public void testJspJbide1704 () {
+ assertTrue("Test project \"" + PROJECT_NAME + "\" is not
loaded", (project != null));
+ doTestJsfJspJbide1704(PAGE_NAME + ".jsp");
+ }
+
+ public void testXhtmlJbide1704 () {
+ assertTrue("Test project \"" + PROJECT_NAME + "\" is not
loaded", (project != null));
+ doTestJsfJspJbide1704(PAGE_NAME + ".xhtml");
+ }
+
+ private static final String TEST_RESOURCES_VALUE = "\"resources\"";
+
+ private void doTestJsfJspJbide1704(String pageName) {
+
+ openEditor(pageName);
+
+ try {
+
+ final IRegion reg = new FindReplaceDocumentAdapter(document).find(0,
+ " var=\"msg\"", true, true, false, false);
+ String text = document.get();
+ String errorMessage = null;
+
+ List<ICompletionProposal> res = TestUtil.collectProposals(contentAssistant,
viewer, reg.getOffset());
+
+ assertTrue("Content Assist returned no proposals: ", (res != null &&
res.size() > 0));
+
+ for (ICompletionProposal proposal : res) {
+ // There should not be a proposal of type AutoContentAssistantProposal in the result
+ // (the only exclusion is EL-proposals)
+
+ if (proposal instanceof AutoContentAssistantProposal) {
+ if(((AutoContentAssistantProposal)proposal).getReplacementString().startsWith("#{"))
{
+ // The only EL template proposal is allowed to be shown here
+ continue;
+ }
+ }
+
+
+ if (proposal instanceof CustomCompletionProposal) {
+ // There are two cases are allowed to be shown
+ // AutoContentAssistantProposal which returns the "resources" string as
replacement
+ // CustomCompletionProposal which returns the current value string as replacement
+
+ if (!(proposal instanceof AutoContentAssistantProposal)) {
+ int equalSignIndex = text.lastIndexOf('=', reg.getOffset());
+ if (equalSignIndex != -1) {
+ String prevAttrValue = text.substring(equalSignIndex+1,
reg.getOffset()).trim();
+ if
(((CustomCompletionProposal)proposal).getReplacementString().equals(prevAttrValue)){
+ // The old value for the attribute is allowed to be shown here
+ continue;
+ }
+ }
+ } else {
+ if
(((CustomCompletionProposal)proposal).getReplacementString().equals(TEST_RESOURCES_VALUE)){
+ // The old value for the attribute is allowed to be shown here
+ continue;
+ }
+
+ }
+ }
+
+ assertFalse("Content Assistant peturned proposals of type (" +
proposal.getClass().getName() + ").", (proposal instanceof
AutoContentAssistantProposal));
+ }
+
+ } catch (BadLocationException e) {
+ fail(e.getMessage());
+ }
+
+ closeEditor();
+ }
+
+}
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/ca/test/JsfJspJbide1717Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/ca/test/JsfJspJbide1717Test.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/ca/test/JsfJspJbide1717Test.java 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,117 @@
+package org.jboss.tools.jsf.ca.test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
+import org.jboss.tools.jst.jsp.test.TestUtil;
+import org.jboss.tools.jst.jsp.test.ca.ContentAssistantTestCase;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
+
+
+public class JsfJspJbide1717Test extends ContentAssistantTestCase {
+ TestProjectProvider provider = null;
+ boolean makeCopy = false;
+ private static final String PROJECT_NAME = "JsfJbide1704Test";
+ private static final String PAGE_NAME = "/WebContent/pages/greeting.jsp";
+ private static final String INSERT_BEFORE_STRING = "<h:outputText";
+ private static final String INSERTION_BEGIN_STRING = "<h:outputText
value=\"";
+ private static final String INSERTION_END_STRING = "\" />";
+ private static final String JSF_EXPR_STRING = "#{msg.greeting}";
+
+ public static Test suite() {
+ return new TestSuite(JsfJspJbide1717Test.class);
+ }
+
+ public void setUp() throws Exception {
+ provider = new TestProjectProvider("org.jboss.tools.jsf.test", null,
PROJECT_NAME, makeCopy);
+ project = provider.getProject();
+ }
+
+ protected void tearDown() throws Exception {
+ if(provider != null) {
+ provider.dispose();
+ }
+ }
+
+ public void testJstJspJbide1717() {
+ openEditor(PAGE_NAME);
+
+ // Find start of <h:outputText> tag
+ String documentContent = document.get();
+ int start = (documentContent == null ? -1 :
documentContent.indexOf(INSERT_BEFORE_STRING));
+
+ assertTrue("Cannot find the starting point in the test file \"" +
PAGE_NAME + "\"", (start != -1));
+
+ // First of all perform the test on a region placed in one space behind empty-valued
attribute -
+ // this is to return normal list of attribute names proposal list
+
+ String documentContentModified = documentContent.substring(0, start) +
+ INSERTION_BEGIN_STRING + INSERTION_END_STRING + documentContent.substring(start);
+
+ int offsetToTest = start + INSERTION_BEGIN_STRING.length() + 2;
+
+ jspTextEditor.setText(documentContentModified);
+
+ String errorMessage = null;
+
+ List<ICompletionProposal> res = TestUtil.collectProposals(contentAssistant,
viewer, offsetToTest);
+
+ List<String> customCompletionProposals = new ArrayList<String>();
+
+ if (res != null) {
+ for (ICompletionProposal proposal : res) {
+ // There should be at least one proposal of type CustomCompletionProposal in the
result
+ if (proposal instanceof CustomCompletionProposal) {
+ customCompletionProposals.add(((CustomCompletionProposal)proposal).getReplacementString());
+ }
+ }
+ }
+ assertFalse("Content Assistant returned no proposals of type
CustomCompletionProposal.",customCompletionProposals.isEmpty());
+
+ try {
+ JobUtils.waitForIdle();
+ } catch (Exception e) {
+ e.printStackTrace();
+ assertTrue("Waiting for the jobs to complete has failed.", false);
+ }
+
+ // Next perform the test on a region placed in one space behind an attribute those
value is a container
+ // (contains JSF expression) - this has to return the same normal list of attribute
names proposal list as
+ // we got at the first step (because the tag is the same, but only the attribute value
is changed)
+
+ documentContentModified = documentContent.substring(0, start) +
+ INSERTION_BEGIN_STRING + JSF_EXPR_STRING + INSERTION_END_STRING +
documentContent.substring(start);
+
+ offsetToTest = start + INSERTION_BEGIN_STRING.length() + JSF_EXPR_STRING.length() + 2;
+
+ String visualizeCursorPosition = documentContentModified.substring(0, offsetToTest) +
+ "|" + documentContentModified.substring(offsetToTest);
+
+ jspTextEditor.setText(documentContentModified);
+
+ res = TestUtil.collectProposals(contentAssistant, viewer, offsetToTest);
+
+ if (res != null) {
+ for (ICompletionProposal proposal : res) {
+ // There should be the same proposals as in the saved result
+ if (proposal instanceof CustomCompletionProposal) {
+ assertTrue("Content Assistant returned additional proposal (proposal returned
doesn't exist in the saved list).",
+ customCompletionProposals.contains(((CustomCompletionProposal)proposal).getReplacementString()));
+ customCompletionProposals.remove(((CustomCompletionProposal)proposal).getReplacementString());
+ }
+ }
+ }
+ assertTrue("Content Assistant didn't returned some
proposals.",customCompletionProposals.isEmpty());
+
+ closeEditor();
+ }
+
+
+}
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfCATests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfCATests.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfCATests.java 2010-09-17
17:02:00 UTC (rev 24999)
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.test;
+
+import org.jboss.tools.jsf.ca.test.JsfJspJbide1704Test;
+import org.jboss.tools.jsf.ca.test.JsfJspJbide1717Test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class JsfCATests {
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Test for org.jboss.tools.jsf.test");
+
+ suite.addTestSuite(JsfJspJbide1704Test.class);
+ suite.addTestSuite(JsfJspJbide1717Test.class);
+
+ return suite;
+ }
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfCATests.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain