JBoss Tools SVN: r5673 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test: src/org/jboss/tools/jsf/vpe/richfaces/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-01-14 14:03:30 -0500 (Mon, 14 Jan 2008)
New Revision: 5673
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/plugin.xml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1562, was added extensions points to tests which allows collect all testcases together and was added class which collect all test cases together and run it's
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/plugin.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/plugin.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/plugin.xml 2008-01-14 19:03:30 UTC (rev 5673)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.jboss.tools.jsf.vpe.ui.tests">
+ <tests testSuite="org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests" name="Tests For Rich Faces Components"/>
+ </extension>
+
+</plugin>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-01-14 19:03:23 UTC (rev 5672)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-01-14 19:03:30 UTC (rev 5673)
@@ -15,10 +15,10 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-
import org.jboss.tools.vpe.ui.test.VpeTestSetup;
import org.jboss.tools.vpe.ui.test.beans.ImportBean;
+
/**
* Class for testing all RichFaces components
*
@@ -26,7 +26,7 @@
*
*/
-public class RichFacesAllTests {
+public class RichFacesAllTests {
public static Test suite() {
TestSuite suite = new TestSuite("Tests for Vpe RichFaces components"); // $NON-NLS-1$
16 years, 5 months
JBoss Tools SVN: r5672 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-01-14 14:03:23 -0500 (Mon, 14 Jan 2008)
New Revision: 5672
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/plugin.xml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/build.properties
Log:
http://jira.jboss.com/jira/browse/JBIDE-1562, was added extensions points to tests which allows collect all testcases together and was added class which collect all test cases together and run it's
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/META-INF/MANIFEST.MF 2008-01-14 19:03:17 UTC (rev 5671)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/META-INF/MANIFEST.MF 2008-01-14 19:03:23 UTC (rev 5672)
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Test Plug-in
-Bundle-SymbolicName: org.jboss.tools.jsf.vpe.facelets.test
+Bundle-SymbolicName: org.jboss.tools.jsf.vpe.facelets.test;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: org.jboss.tools.jsf.vpe.facelets.test.FaceletsTestPlugin
Require-Bundle: org.eclipse.ui,
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/build.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/build.properties 2008-01-14 19:03:17 UTC (rev 5671)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/build.properties 2008-01-14 19:03:23 UTC (rev 5672)
@@ -1,7 +1,8 @@
output.facelets-tests.jar = bin/
bin.includes = META-INF/,\
resources/,\
- facelets-tests.jar
+ facelets-tests.jar,\
+ plugin.xml
src.includes = META-INF/,\
build.properties,\
resources/,\
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/plugin.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/plugin.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/plugin.xml 2008-01-14 19:03:23 UTC (rev 5672)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.jboss.tools.jsf.vpe.ui.tests">
+ <tests
+ description="Facelets Tests"
+ name="Facelets Tests"
+ testSuite="org.jboss.tools.jsf.vpe.facelets.test.FaceletsAllTests">
+ </tests>
+ </extension>
+
+</plugin>
16 years, 5 months
JBoss Tools SVN: r5671 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test: META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-01-14 14:03:17 -0500 (Mon, 14 Jan 2008)
New Revision: 5671
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/plugin.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/schema/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/schema/vpe.tests.exsd
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeAllTests.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/META-INF/MANIFEST.MF
Log:
http://jira.jboss.com/jira/browse/JBIDE-1562, was added extensions points to tests which allows collect all testcases together and was added class which collect all test cases together and run it's
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/META-INF/MANIFEST.MF 2008-01-14 19:03:08 UTC (rev 5670)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/META-INF/MANIFEST.MF 2008-01-14 19:03:17 UTC (rev 5671)
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Visual Editor Test Plugin
-Bundle-SymbolicName: org.jboss.tools.jsf.vpe.ui.test
+Bundle-SymbolicName: org.jboss.tools.jsf.vpe.ui.test;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: org.jboss.tools.vpe.ui.test.VPETestPlugin
Require-Bundle: org.eclipse.ui,
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/plugin.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/plugin.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/plugin.xml 2008-01-14 19:03:17 UTC (rev 5671)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension-point id="org.jboss.tools.jsf.vpe.ui.tests" name="Visual Page Editor Junit Test" schema="schema/vpe.tests.exsd"/>
+</plugin>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/schema/vpe.tests.exsd
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/schema/vpe.tests.exsd (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/schema/vpe.tests.exsd 2008-01-14 19:03:17 UTC (rev 5671)
@@ -0,0 +1,119 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.jboss.tools.jsf.vpe.ui.test">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.jboss.tools.jsf.vpe.ui.test" id="vpe.tests" name="Visual Editor Tests"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="tests"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="tests">
+ <complexType>
+ <attribute name="testSuite" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+</schema>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeAllTests.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeAllTests.java 2008-01-14 19:03:17 UTC (rev 5671)
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.ui.test;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Max Areshkau
+ *
+ * Class created to run all ui tests for VPE together
+ */
+public class VpeAllTests {
+
+ public static final String VPE_TEST_EXTENTION_POINT_ID = "org.jboss.tools.jsf.vpe.ui.tests";
+
+ public static final String TEST_SUITE_PARAM = "testSuite";
+
+ public static final String METHOD_SUITE_NAME = "suite";
+
+ public static Test suite() {
+
+ TestSuite result = new TestSuite();
+ IExtensionRegistry extensionRepository = Platform
+ .getExtensionRegistry();
+
+ IExtensionPoint extensionPoint = extensionRepository
+ .getExtensionPoint(VPE_TEST_EXTENTION_POINT_ID);
+ IExtension[] extensions = extensionPoint.getExtensions();
+ for (IExtension extension : extensions) {
+ IConfigurationElement[] confElements = extension
+ .getConfigurationElements();
+ for (IConfigurationElement configurationElement : confElements) {
+ String clazz = configurationElement
+ .getAttribute(TEST_SUITE_PARAM);
+ try {
+ Bundle bundle = Platform.getBundle(configurationElement
+ .getNamespaceIdentifier());
+ Class<?> testObject = bundle.loadClass(clazz);
+ Method method = testObject.getMethod(METHOD_SUITE_NAME, null);
+ // null -because static method
+ Object res = method.invoke(null, null);
+ if (res instanceof Test) {
+ Test testSuite = (Test) res;
+ result.addTest(testSuite);
+ }
+ } catch (ClassNotFoundException e) {
+ VPETestPlugin.getDefault().logError(e);
+ } catch (SecurityException e) {
+ VPETestPlugin.getDefault().logError(e);
+ } catch (NoSuchMethodException e) {
+ VPETestPlugin.getDefault().logError(e);
+ } catch (IllegalArgumentException e) {
+ VPETestPlugin.getDefault().logError(e);
+ } catch (IllegalAccessException e) {
+ VPETestPlugin.getDefault().logError(e);
+ } catch (InvocationTargetException e) {
+ VPETestPlugin.getDefault().logError(e);
+ }
+ }
+ }
+ return result;
+
+ }
+
+}
16 years, 5 months
JBoss Tools SVN: r5670 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-01-14 14:03:08 -0500 (Mon, 14 Jan 2008)
New Revision: 5670
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/plugin.xml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/build.properties
Log:
http://jira.jboss.com/jira/browse/JBIDE-1562, was added extensions points to tests which allows collect all testcases together and was added class which collect all test cases together and run it's
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF 2008-01-14 19:03:03 UTC (rev 5669)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF 2008-01-14 19:03:08 UTC (rev 5670)
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Jsf Test Plug-in
-Bundle-SymbolicName: org.jboss.tools.jsf.vpe.jsf.test
+Bundle-SymbolicName: org.jboss.tools.jsf.vpe.jsf.test;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: org.jboss.tools.jsf.vpe.jsf.test.JsfTestPlugin
Require-Bundle: org.eclipse.ui,
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/build.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/build.properties 2008-01-14 19:03:03 UTC (rev 5669)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/build.properties 2008-01-14 19:03:08 UTC (rev 5670)
@@ -1,6 +1,7 @@
bin.includes = META-INF/,\
resources/,\
- jsf-test.jar
+ jsf-test.jar,\
+ plugin.xml
jars.compile.order = jsf-test.jar
source.jsf-test.jar = src/
output.jsf-test.jar = bin/
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/plugin.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/plugin.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/plugin.xml 2008-01-14 19:03:08 UTC (rev 5670)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.jboss.tools.jsf.vpe.ui.tests">
+ <tests
+ name="JSf Tests"
+ testSuite="org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests">
+ </tests>
+ </extension>
+
+</plugin>
16 years, 5 months
JBoss Tools SVN: r5669 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-01-14 14:03:03 -0500 (Mon, 14 Jan 2008)
New Revision: 5669
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test/plugin.xml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test/build.properties
Log:
http://jira.jboss.com/jira/browse/JBIDE-1562, was added extensions points to tests which allows collect all testcases together and was added class which collect all test cases together and run it's
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test/META-INF/MANIFEST.MF 2008-01-14 18:48:21 UTC (rev 5668)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test/META-INF/MANIFEST.MF 2008-01-14 19:03:03 UTC (rev 5669)
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Test Html Plug-in
-Bundle-SymbolicName: org.jboss.tools.jsf.vpe.html.test
+Bundle-SymbolicName: org.jboss.tools.jsf.vpe.html.test;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: org.jboss.tools.jsf.vpe.html.test.HtmlTestPlugin
Require-Bundle: org.eclipse.ui,
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test/build.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test/build.properties 2008-01-14 18:48:21 UTC (rev 5668)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test/build.properties 2008-01-14 19:03:03 UTC (rev 5669)
@@ -1,10 +1,11 @@
bin.includes = META-INF/,\
html-test.jar,\
- resources/
+ resources/,\
+ plugin.xml
src.includes = META-INF/,\
build.properties,\
src/,\
resources/
jars.compile.order = html-test.jar
source.html-test.jar = src/
-output.html-test.jar = bin/
\ No newline at end of file
+output.html-test.jar = bin/
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test/plugin.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test/plugin.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test/plugin.xml 2008-01-14 19:03:03 UTC (rev 5669)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.jboss.tools.jsf.vpe.ui.tests">
+ <tests
+ description="Tests for Html templates"
+ name="Tests for Html templates"
+ testSuite="org.jboss.tools.jsf.vpe.html.test.HtmlAllTests">
+ </tests>
+ </extension>
+
+</plugin>
16 years, 5 months
JBoss Tools SVN: r5668 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-01-14 13:48:21 -0500 (Mon, 14 Jan 2008)
New Revision: 5668
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesContextMenuTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1581
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesContextMenuTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesContextMenuTemplate.java 2008-01-14 18:08:47 UTC (rev 5667)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesContextMenuTemplate.java 2008-01-14 18:48:21 UTC (rev 5668)
@@ -50,25 +50,25 @@
parentDiv.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
"dr-menu-list-border");
- nsIDOMElement div = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ nsIDOMElement table = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
"dr-menu-list-bg rich-menu-list-bg dr-menu-list-border");
String path = RichFacesTemplatesActivator.getPluginResourcePath()
+ BACKGROUND_PATH;
- div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
"background-image: url(file://" + path + "); " + DIV_STYLE);
- parentDiv.appendChild(div);
+ parentDiv.appendChild(table);
List<Node> listItems = ComponentUtil.getChildren(sourceElement, false);
for (Node node : listItems) {
nsIDOMElement element = createMenuItem(visualDocument, node);
if (element != null)
- div.appendChild(element);
+ table.appendChild(element);
}
VpeCreationData creationData = new VpeCreationData(parentDiv);
16 years, 5 months
JBoss Tools SVN: r5667 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test: src/org/jboss/tools/jsf/vpe/richfaces/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-01-14 13:08:47 -0500 (Mon, 14 Jan 2008)
New Revision: 5667
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/contextMenu.xhtml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
Log:
JUnit test for http://jira.jboss.com/jira/browse/JBIDE-1581
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/contextMenu.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/contextMenu.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/contextMenu.xhtml 2008-01-14 18:08:47 UTC (rev 5667)
@@ -0,0 +1,18 @@
+<!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"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+<rich:contextMenu event="oncontextmenu" attached="true"
+ submitMode="none">
+ <rich:menuItem value="Zoom In" onclick="enlarge();" id="zin"></rich:menuItem>
+ <rich:menuItem value="Zoom Out" onclick="decrease();" id="zout"></rich:menuItem>
+</rich:contextMenu>
+</body>
+</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2008-01-14 17:44:21 UTC (rev 5666)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2008-01-14 18:08:47 UTC (rev 5667)
@@ -10,10 +10,21 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.richfaces.test;
+import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.ui.test.TestUtil;
import org.jboss.tools.vpe.ui.test.VpeTest;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.mozilla.interfaces.nsIDOMText;
/**
* Class for testing all RichFaces components
@@ -23,183 +34,250 @@
*/
public class RichFacesComponentTest extends VpeTest {
- // import project name
- public static final String IMPORT_PROJECT_NAME = "richFacesTest";
+ // import project name
+ public static final String IMPORT_PROJECT_NAME = "richFacesTest";
- public RichFacesComponentTest(String name) {
- super(name);
- setCheckWarning(false);
- }
+ public RichFacesComponentTest(String name) {
+ super(name);
+ setCheckWarning(false);
+ }
- public void testAllComponentsOnSinglePage() throws PartInitException,
- Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/richFacesTest.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testAllComponentsOnSinglePage() throws PartInitException,
+ Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/richFacesTest.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testCalendar() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/calendar.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testCalendar() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/calendar.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testDataDefinitionList() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataDefinitionList.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testDataDefinitionList() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/dataDefinitionList.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testDataFilterSlider() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataFilterSlider.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testDataFilterSlider() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/dataFilterSlider.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testDataGrid() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataGrid.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testDataGrid() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/dataGrid.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testDataList() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataList.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testDataList() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/dataList.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testDataOrderedList() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataOrderedList.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testDataOrderedList() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/dataOrderedList.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testDataScroller() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataScroller.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testDataScroller() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/dataScroller.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testDataTable() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataTable.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testDataTable() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/dataTable.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testDragAndDrop() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dragAndDrop.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testDragAndDrop() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/dragAndDrop.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testDropDawnMenu() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dropDawnMenu.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testDropDawnMenu() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/dropDawnMenu.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testEffect() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/effect.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testEffect() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/effect.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testGoogleMap() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/googleMap.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testGoogleMap() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/googleMap.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testInputNumberSlider() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/inputNumberSlider.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testInputNumberSlider() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/inputNumberSlider.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testInputNumberSpinner() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/inputNumberSpinner.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testInputNumberSpinner() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/inputNumberSpinner.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testInsert() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/insert.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testInsert() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/insert.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testMessage() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/message.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testMessage() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/message.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testMessages() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/messages.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testMessages() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/messages.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testModalPanel() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/modalPanel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testModalPanel() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/modalPanel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testPaint2D() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/paint2D.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testPaint2D() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/paint2D.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testPanel() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/panel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testPanel() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/panel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testPanelBar() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/panelBar.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testPanelBar() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/panelBar.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testPanelMenu() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/panelMenu.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testPanelMenu() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/panelMenu.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testScrollableDataTable() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/scrollableDataTable.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testScrollableDataTable() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/scrollableDataTable.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testSeparator() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/separator.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testSeparator() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/separator.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testSimpleTogglePanel() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/simpleTogglePanel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testSimpleTogglePanel() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/simpleTogglePanel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testSpacer() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/spacer.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testSpacer() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/spacer.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testSuggestionBox() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/suggestionbox.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testSuggestionBox() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/suggestionbox.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testTabPanel() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/tabPanel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testTabPanel() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/tabPanel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testTogglePanel() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/togglePanel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testTogglePanel() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/togglePanel.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testToolBar() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/toolBar.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testToolBar() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/toolBar.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testTree() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/tree.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testTree() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/tree.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
- public void testVirtualEarth() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/virtualEarth.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
-
- public void testComponentControl() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/componentControl.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
- }
+ public void testVirtualEarth() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/virtualEarth.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+ public void testComponentControl() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/componentControl.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testcontextMenu() throws Throwable {
+ nsIDOMElement element = performTestForRichFacesComponent("components/contextMenu.xhtml");
+
+ nsIDOMNode node = (nsIDOMNode) element
+ .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ // find "span" elements
+ TestUtil.findElementsByName(node, elements, HTML.TAG_SPAN);
+
+ assertEquals("Component's content is not shown", 4, elements.size());
+
+ nsIDOMElement elementSpan = (nsIDOMElement) elements.get(1)
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ nsIDOMText text = (nsIDOMText) elementSpan.getFirstChild()
+ .queryInterface(nsIDOMText.NS_IDOMTEXT_IID);
+
+ nsIDOMElement elementSpan1 = (nsIDOMElement) elements.get(3)
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ nsIDOMText text1 = (nsIDOMText) elementSpan1.getFirstChild()
+ .queryInterface(nsIDOMText.NS_IDOMTEXT_IID);
+
+ assertEquals("Component's content is not shown", text.getNodeValue(),
+ "Zoom In");
+ assertEquals("Component's content is not shown", text1.getNodeValue(),
+ "Zoom Out");
+
+ }
+
+ /**
+ *
+ * @param componentPage
+ * @return
+ * @throws Throwable
+ */
+ private nsIDOMElement performTestForRichFacesComponent(String componentPage)
+ throws Throwable {
+ TestUtil.waitForJobs();
+ // set exception
+ setException(null);
+
+ // get test page path
+ IFile file = (IFile) TestUtil.getComponentPath(componentPage,
+ IMPORT_PROJECT_NAME);
+
+ assertNotNull("Could not open specified file " + file.getFullPath(),
+ file);
+
+ IEditorInput input = new FileEditorInput(file);
+
+ assertNotNull("Editor input is null", input);
+ // open and get editor
+ JSPMultiPageEditor part = openEditor(input);
+
+ // get dom document
+ nsIDOMDocument document = getVpeVisualDocument(part);
+ nsIDOMElement element = document.getDocumentElement();
+
+ // check that element is not null
+ assertNotNull(element);
+
+ return element;
+ }
+
}
16 years, 5 months
JBoss Tools SVN: r5666 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: resources/contextMenu and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-01-14 12:44:21 -0500 (Mon, 14 Jan 2008)
New Revision: 5666
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/contextMenu/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/contextMenu/background.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/contextMenu/contextMenu.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/contextMenu/spacer.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesContextMenuTemplate.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1581
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/contextMenu/background.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/contextMenu/background.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/contextMenu/contextMenu.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/contextMenu/contextMenu.css (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/contextMenu/contextMenu.css 2008-01-14 17:44:21 UTC (rev 5666)
@@ -0,0 +1,39 @@
+@CHARSET "UTF-8";
+
+.dr-menu-list-border {
+ background-width: 2px;
+ background-color: #F1EEE9;
+ border-color: #000000;
+}
+
+.rich-menu-item {
+ text-align: left;
+}
+
+.dr-menu-item {
+ color: #000000;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 11px;
+}
+
+.dr-menu-icon {
+ margin-right: 10px;
+}
+
+.dr-menu-item-enabled {
+ border: 0pt solid transparent;
+ padding: 2px 36px 2px 2px;
+}
+
+.dr-menu-list-bg {
+ background: transparent none repeat-y scroll left center;
+ border-left-style: solid;
+ border-left-width: 1px;
+ border-right-style: solid;
+ border-right-width: 1px;
+ border-top-style: solid;
+ border-top-width: 1px;
+ border-left-color: #F1EEE9;
+ border-right-color: #F1EEE9;
+ border-top-color: #F1EEE9;
+}
\ No newline at end of file
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/contextMenu/spacer.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/contextMenu/spacer.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesContextMenuTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesContextMenuTemplate.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesContextMenuTemplate.java 2008-01-14 17:44:21 UTC (rev 5666)
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * 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 org.jboss.tools.jsf.vpe.richfaces.template;
+
+import java.util.List;
+
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.RichFacesTemplatesActivator;
+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.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMText;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * Template for Rich Faces contextMenu
+ *
+ * @author dsakovich(a)exadel.com
+ */
+public class RichFacesContextMenuTemplate extends VpeAbstractTemplate {
+
+ private final static String STYLE_PATH = "contextMenu/contextMenu.css";
+ private final static String IMAGE_PATH = "contextMenu/spacer.gif";
+ private final static String BACKGROUND_PATH = "contextMenu/background.gif";
+ private final static String MENU_ITEM_NODE_NAME = "menuItem";
+ private final static String VALUE = "value";
+ private final static String DIV_STYLE = "border : 1px solid #C4C0B9; ";
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+
+ ComponentUtil.setCSSLink(pageContext, STYLE_PATH,
+ "richFacesContextMenu");
+ Element sourceElement = (Element) sourceNode;
+
+ nsIDOMElement parentDiv = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+
+ parentDiv.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "dr-menu-list-border");
+ nsIDOMElement div = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+
+ div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "dr-menu-list-bg rich-menu-list-bg dr-menu-list-border");
+
+ String path = RichFacesTemplatesActivator.getPluginResourcePath()
+ + BACKGROUND_PATH;
+
+ div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ "background-image: url(file://" + path + "); " + DIV_STYLE);
+
+ parentDiv.appendChild(div);
+ List<Node> listItems = ComponentUtil.getChildren(sourceElement, false);
+
+ for (Node node : listItems) {
+ nsIDOMElement element = createMenuItem(visualDocument, node);
+ if (element != null)
+ div.appendChild(element);
+ }
+
+ VpeCreationData creationData = new VpeCreationData(parentDiv);
+
+ return creationData;
+
+ }
+
+ /**
+ * Create menu item
+ *
+ * @param document
+ * @param sourceNode
+ * @return
+ */
+ private nsIDOMElement createMenuItem(nsIDOMDocument document,
+ Node sourceNode) {
+
+ Element sourceElement = (Element) sourceNode;
+
+ String nodeName = sourceElement.getPrefix() + ":" + MENU_ITEM_NODE_NAME;
+ if (!sourceElement.getNodeName().equalsIgnoreCase(nodeName)) {
+ return null;
+ }
+ String value = sourceElement.getAttribute(VALUE);
+ nsIDOMElement div = document
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ div
+ .setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "dr-menu-item rich-menu-item dr-menu-item-enabled rich-menu-item-enabled");
+
+ nsIDOMElement span = document
+ .createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+ span.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "dr-menu-icon rich-menu-item-icon");
+
+ nsIDOMElement img = document
+ .createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ img.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, "16");
+ img.setAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT, "16");
+ ComponentUtil.setImg(img, IMAGE_PATH);
+
+ nsIDOMElement textSpan = document
+ .createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+ textSpan.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "rich-menu-item-label");
+
+ nsIDOMText text = document.createTextNode((value == null) ? "" : value);
+
+ textSpan.appendChild(text);
+ span.appendChild(img);
+ div.appendChild(span);
+ div.appendChild(textSpan);
+
+ return div;
+ }
+}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-01-14 16:14:44 UTC (rev 5665)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-01-14 17:44:21 UTC (rev 5666)
@@ -525,6 +525,12 @@
</vpe:template>
</vpe:tag>
+ <vpe:tag name="rich:contextMenu" case-sensitive="yes">
+ <vpe:template children="no" modify="no"
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesContextMenuTemplate">
+ </vpe:template>
+ </vpe:tag>
+
<vpe:tag name="rich:calendar" case-sensitive="yes">
<vpe:template children="no" modify="no"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesCalendarTemplate">
16 years, 5 months
JBoss Tools SVN: r5665 - in trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components: nested and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-01-14 11:14:44 -0500 (Mon, 14 Jan 2008)
New Revision: 5665
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/cancel.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/checkbox.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/file.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/form.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/hidden.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/multibox.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/option.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/options.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/radio.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/reset.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/select.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/submit.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/text.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/nest.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/root.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/select.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/text.jsp
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/writeNesting.jsp
Log:
http://jira.jboss.com/jira/browse/JBIDE-1565
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/cancel.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/cancel.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/cancel.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,11 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:form action="">
+ <html:cancel />
+ </html:form>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/checkbox.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/checkbox.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/checkbox.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,13 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:form action="">
+ <html:checkbox property="prop1">Option1</html:checkbox><BR>
+ <html:checkbox property="prop2">Option2</html:checkbox><BR>
+ <html:checkbox property="prop3">Option3</html:checkbox><BR>
+ </html:form>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/file.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/file.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/file.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,11 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:form action="">
+ <html:file property="file" />
+ </html:form>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/form.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/form.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/form.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,10 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:form action="">
+ </html:form>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/hidden.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/hidden.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/hidden.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,11 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:form action="">
+ <html:hidden property="hiddenValue" write="true"/>
+ </html:form>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/multibox.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/multibox.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/multibox.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,12 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:form action="">
+ <html:multibox property="strArray" value="Value1"/>
+ <html:multibox property="strArray">Value2</html:multibox>
+ </html:form>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/option.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/option.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/option.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,18 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:form action="">
+ <html:select property="colors" size="6" multiple="true">
+ <html:option value="ch12.orange">Orange</html:option>
+ <html:option value="ch12.purple">Purple</html:option>
+ <html:option value="ch12.red">Red</html:option>
+ <html:option value="ch12.blue">Blue</html:option>
+ <html:option value="ch12.green">Green</html:option>
+ <html:option value="ch12.yellow">Yellow</html:option>
+ </html:select>
+ </html:form>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/options.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/options.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/options.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,13 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:form action="">
+ <html:select property="colors" size="6" multiple="true">
+ <html:options collection="ColorCollection" property="value" labelProperty="label"/>
+ </html:select>
+ </html:form>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/radio.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/radio.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/radio.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,12 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:form action="">
+ <html:radio property="radioVal" value="Value1"/>Radio Button 1<BR>
+ <html:radio property="radioVal" value="Value2"/>Radio Button 2
+ </html:form>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/reset.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/reset.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/reset.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,11 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:form action="">
+ <html:reset />
+ </html:form>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/select.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/select.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/select.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,13 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:form action="">
+ <html:select property="custId">
+ <html:optionsCollection property="customers" label="name" value="custId"/>
+ </html:select>
+ </html:form>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/submit.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/submit.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/submit.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,11 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:form action="">
+ <html:submit></html:submit>
+ </html:form>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/text.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/text.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/text.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,12 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <html:form action="">
+ <html:text property="status" disabled="true"/><BR>
+ <html:text property="text">Text</html:text>
+ </html:form>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/nest.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/nest.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/nest.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,11 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <nested:nest property="person">
+ </nested:nest>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/root.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/root.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/root.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,11 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <nested:root name="Root">
+ </nested:root>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/select.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/select.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/select.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,15 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <nested:nest>
+ Gender: <nested:select property="gender">
+ <html:option value="MALE">Male</html:option>
+ <html:option value="FEMALE">Female</html:option>
+ </nested:select>
+ </nested:nest>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/text.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/text.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/text.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,14 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <nested:nest property="address">
+ Street 1: <nested:text property="street1"/><BR>
+ Street 2: <nested:text property="street2"/><BR>
+ City: <nested:text property="city"/>
+ </nested:nest>
+</body>
+</html:html>
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/writeNesting.jsp
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/writeNesting.jsp (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/writeNesting.jsp 2008-01-14 16:14:44 UTC (rev 5665)
@@ -0,0 +1,12 @@
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>
+<html:html>
+<head>
+ <title></title>
+</head>
+<body>
+ <nested:nest property="address">
+ Current nesting is: <nested:writeNesting/><BR>
+ </nested:nest>
+</body>
+</html:html>
16 years, 5 months
JBoss Tools SVN: r5664 - in trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test: src/org/jboss/tools/struts/vpe/struts/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-01-14 11:14:07 -0500 (Mon, 14 Jan 2008)
New Revision: 5664
Added:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/form/
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/resources/StrutsTest/WebContent/pages/components/nested/
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsFormComponentTest.java
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsNestedComponentTest.java
Modified:
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsAllTests.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1565
Modified: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsAllTests.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsAllTests.java 2008-01-14 14:28:00 UTC (rev 5663)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsAllTests.java 2008-01-14 16:14:07 UTC (rev 5664)
@@ -33,6 +33,8 @@
suite.addTestSuite(StrutsHTMLComponentTest.class);
suite.addTestSuite(StrutsBeanComponentTest.class);
suite.addTestSuite(StrutsLogicComponentTest.class);
+ suite.addTestSuite(StrutsFormComponentTest.class);
+ suite.addTestSuite(StrutsNestedComponentTest.class);
//cleanUpTests();
// $JUnit-END$
return new VpeTestSetup(suite,TestUtil.createImportBeanList(StrutsHTMLComponentTest.IMPORT_PROJECT_NAME, StrutsTestPlugin.getPluginResourcePath()));
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsFormComponentTest.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsFormComponentTest.java (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsFormComponentTest.java 2008-01-14 16:14:07 UTC (rev 5664)
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.struts.vpe.struts.test;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+
+/**
+ * Class for testing form struts components
+ *
+ * @author dazarov
+ *
+ */
+public class StrutsFormComponentTest extends VpeTest {
+
+ // import project name
+ static final String IMPORT_PROJECT_NAME = "StrutsTest";
+
+ public StrutsFormComponentTest(String name) {
+ super(name);
+ }
+
+ /*
+ * Struts Form test cases
+ */
+
+ public void testCancel() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/form/cancel.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testCheckbox() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/form/checkbox.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testFile() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/form/file.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testForm() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/form/form.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testHidden() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/form/hidden.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testMultibox() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/form/multibox.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testOption() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/form/option.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testOptions() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/form/options.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testRadio() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/form/radio.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testReset() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/form/reset.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testSelect() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/form/select.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testSubmit() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/form/submit.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testText() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/form/text.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+}
Added: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsNestedComponentTest.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsNestedComponentTest.java (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/src/org/jboss/tools/struts/vpe/struts/test/StrutsNestedComponentTest.java 2008-01-14 16:14:07 UTC (rev 5664)
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.struts.vpe.struts.test;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+
+/**
+ * Class for testing nested struts components
+ *
+ * @author dazarov
+ *
+ */
+public class StrutsNestedComponentTest extends VpeTest {
+
+ // import project name
+ static final String IMPORT_PROJECT_NAME = "StrutsTest";
+
+ public StrutsNestedComponentTest(String name) {
+ super(name);
+ }
+
+ /*
+ * Struts Nested test cases
+ */
+
+ public void testNest() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/nested/nest.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testRoot() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/nested/root.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testSelect() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/nested/select.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testText() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/nested/text.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
+ public void testWriteNesting() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getComponentPath("components/nested/writeNesting.jsp", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+}
16 years, 5 months