Author: scabanovich
Date: 2011-03-04 18:45:57 -0500 (Fri, 04 Mar 2011)
New Revision: 29524
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/InternalClassFolder/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/InternalClassFolder/META-INF/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/InternalClassFolder/META-INF/resources/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/InternalClassFolder/META-INF/resources/example/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/InternalClassFolder/META-INF/resources/example/input.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsInClassFolderTest.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.classpath
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
Log:
JBIDE-8275
https://issues.jboss.org/browse/JBIDE-8275
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.classpath
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.classpath 2011-03-04
23:38:58 UTC (rev 29523)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/.classpath 2011-03-04
23:45:57 UTC (rev 29524)
@@ -13,5 +13,6 @@
<attribute name="owner.project.facets" value="jst.java"/>
</attributes>
</classpathentry>
+ <classpathentry kind="lib" path="InternalClassFolder"/>
<classpathentry kind="output"
path="WebContent/WEB-INF/classes"/>
</classpath>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/InternalClassFolder/META-INF/resources/example/input.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/InternalClassFolder/META-INF/resources/example/input.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/InternalClassFolder/META-INF/resources/example/input.xhtml 2011-03-04
23:45:57 UTC (rev 29524)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!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:h="http://java.sun.com/jsf/html"
+
xmlns:composite="http://java.sun.com/jsf/composite">
+
+ <composite:interface>
+ <composite:attribute name="label"/>
+ <composite:attribute name="value" required="true"
type="java.util.List"/>
+ <composite:attribute name="value7" required="true"
type="java.lang.String"/>
+ <composite:attribute name="action" required="true"
method-signature="java.lang.String f()"/>
+ <composite:attribute name="submitlabel"/>
+ </composite:interface>
+
+ <composite:implementation>#{user.name.}
+ <h:form>
+ <h:outputText value="#{cc.attrs.value.}" />
+ <h:inputText value="#{cc.attrs.action}" />
+ <h:commandButton action="#{cc.attrs.action.}"
value="#{cc.attrs.submitlabel}" />
+ </h:form>
+ </composite:implementation>
+</html>
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSF2ComponentsValidator/InternalClassFolder/META-INF/resources/example/input.xhtml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2011-03-04
23:38:58 UTC (rev 29523)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2011-03-04
23:45:57 UTC (rev 29524)
@@ -31,6 +31,7 @@
import org.jboss.tools.jsf.test.refactoring.MethodRefactoringTest;
import org.jboss.tools.jsf.test.validation.ELValidatorTest;
import org.jboss.tools.jsf.test.validation.I18nValidatorTest;
+import org.jboss.tools.jsf.test.validation.JSF2ComponentsInClassFolderTest;
import org.jboss.tools.jsf.test.validation.JSF2ComponentsValidatorTest;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ProjectImportTestSetup;
@@ -74,7 +75,8 @@
new String[] { "projects/JSFKickStartOldFormat" }, //$NON-NLS-1$
new String[] { "JSFKickStartOldFormat" })); //$NON-NLS-1$
suite.addTest(new ProjectImportTestSetup(new TestSuite(
- JSF2ComponentsValidatorTest.class), "org.jboss.tools.jsf.test",
//$NON-NLS-1$
+ JSF2ComponentsValidatorTest.class,
+ JSF2ComponentsInClassFolderTest.class), "org.jboss.tools.jsf.test",
//$NON-NLS-1$
new String[] { "projects/JSF2ComponentsValidator" }, //$NON-NLS-1$
new String[] { "JSF2ComponentsValidator" })); //$NON-NLS-1$
suite.addTest(new ProjectImportTestSetup(new TestSuite(
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsInClassFolderTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsInClassFolderTest.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsInClassFolderTest.java 2011-03-04
23:45:57 UTC (rev 29524)
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2007-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.validation;
+
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.jboss.tools.jsf.jsf2.util.JSF2ResourceUtil;
+import org.jboss.tools.jst.web.kb.IKbProject;
+import org.jboss.tools.jst.web.kb.KbProjectFactory;
+import org.jboss.tools.jst.web.kb.internal.KbProject;
+import org.jboss.tools.jst.web.kb.taglib.IAttribute;
+import org.jboss.tools.jst.web.kb.taglib.IComponent;
+import org.jboss.tools.jst.web.kb.taglib.ITagLibrary;
+import org.jboss.tools.test.util.ProjectImportTestSetup;
+
+import junit.framework.TestCase;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class JSF2ComponentsInClassFolderTest extends TestCase {
+
+ private static String projectName = "JSF2ComponentsValidator"; //$NON-NLS-1$
+ private static IProject project;
+
+ public JSF2ComponentsInClassFolderTest() {
+ super("JSF 2 Components In Class Folder Test"); //$NON-NLS-1$
+ }
+
+ protected void setUp() throws Exception {
+ project = ProjectImportTestSetup.loadProject(projectName);
+ project.build(IncrementalProjectBuilder.FULL_BUILD,
+ new NullProgressMonitor());
+ }
+
+ public void testJSF2ComponentsInClassFolder() throws Exception {
+ IKbProject kb = KbProjectFactory.getKbProject(project, true);
+ ITagLibrary[] ls =
kb.getTagLibraries("http://java.sun.com/jsf/composite/example");
+ assertEquals(1, ls.length);
+ IComponent[] cs = ls[0].getComponents();
+ assertTrue(cs.length > 0);
+ assertEquals("input", cs[0].getName());
+ IAttribute[] as = cs[0].getAttributes();
+ assertEquals(5, as.length);
+ IAttribute a = cs[0].getAttribute("value7");
+ assertNotNull(a);
+
+ }
+
+}
+
+
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsInClassFolderTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain