Author: mareshkau
Date: 2009-04-15 04:24:26 -0400 (Wed, 15 Apr 2009)
New Revision: 14750
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.classpath
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.project
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/.jsdtscope
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.jdt.core.prefs
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.jst.common.project.facet.core.prefs
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.wst.common.component
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/JavaSource/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/JavaSource/demo/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/JavaSource/demo/Person.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/JavaSource/resources.properties
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/META-INF/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/.faces-config.xml.jsfdia
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/classes/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/classes/demo/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/classes/demo/Person.class
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/classes/resources.properties
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/faces-config.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/lib/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/web.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/index.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/correctCustomTags.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/correctCustomTags.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/incorrectCustomTags.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/incorrectCustomTags.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/tags/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/tags/components/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/tags/components/echo.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/tags/components/paginator.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/tags/facelets.taglib.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/templates/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/templates/common.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/ant/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/ant/build.properties
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/ant/build.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3197Test.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCustomTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/custom/
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/custom/CustomTLDData.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/custom/CustomTLDParser.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/custom/CustomTLDReference.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/templates/vpe-templates-facelets.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeIncludeTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3197, initial support of custom tags has been
added to vpe
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/templates/vpe-templates-facelets.xml
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/templates/vpe-templates-facelets.xml 2009-04-15
04:38:38 UTC (rev 14749)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/templates/vpe-templates-facelets.xml 2009-04-15
08:24:26 UTC (rev 14750)
@@ -62,6 +62,9 @@
<vpe:tag name="ui:include" case-sensitive="yes">
<vpe:template children="yes" file="{@src}"
class="org.jboss.tools.vpe.editor.template.VpeIncludeTemplate"/>
</vpe:tag>
+ <vpe:tag name="vpeCustomTemplate" case-sensitive="yes">
+ <vpe:template children="yes"
class="org.jboss.tools.vpe.editor.template.VpeCustomTemplate"></vpe:template>
+ </vpe:tag>
<vpe:tag name="ui:debug" case-sensitive="yes" >
<vpe:template children="yes" modify="yes">
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.classpath
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.classpath
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.classpath 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,9 @@
+<?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.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/jboss-eap
Runtime"/>
+ <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.vpe.jsf.test/resources/customFaceletsTestProject/.project
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.project
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.project 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>customFaceletsTestProject</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <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.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.common.verification.verifybuilder</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.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/.jsdtscope
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/.jsdtscope
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/.jsdtscope 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.jdt.core.prefs 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,7 @@
+#Wed Apr 08 14:46:01 EEST 2009
+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.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.jst.common.project.facet.core.prefs
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.jst.common.project.facet.core.prefs
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.jst.common.project.facet.core.prefs 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,4 @@
+#Wed Apr 08 14:46:02 EEST 2009
+classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\:org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\:\:jdk1.5.0_12/owners=jst.java\:5.0
+classpath.helper/org.eclipse.jst.server.core.container\:\:org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget\:\:jboss-eap\
Runtime/owners=jst.web\:2.5
+eclipse.preferences.version=1
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.wst.common.component
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.wst.common.component
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.wst.common.component 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="customFaceletsTestProject">
+ <wb-resource deploy-path="/"
source-path="/WebContent"/>
+ <wb-resource deploy-path="/WEB-INF/classes"
source-path="/JavaSource"/>
+ <property name="context-root"
value="customFaceletsTestProject"/>
+ <property name="java-output-path"/>
+ </wb-module>
+</project-modules>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="jboss-eap Runtime"/>
+ <fixed facet="jst.java"/>
+ <fixed facet="jst.web"/>
+ <installed facet="jst.java" version="5.0"/>
+ <installed facet="jst.web" version="2.5"/>
+</faceted-project>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.container
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.container 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.name
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.name 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/JavaSource/demo/Person.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/JavaSource/demo/Person.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/JavaSource/demo/Person.java 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * 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 Tools
+ */
+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.vpe.jsf.test/resources/customFaceletsTestProject/JavaSource/resources.properties
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/JavaSource/resources.properties
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/JavaSource/resources.properties 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,2 @@
+prompt=Your Name\:
+greeting=Hello
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/META-INF/MANIFEST.MF
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/META-INF/MANIFEST.MF
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/META-INF/MANIFEST.MF 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/.faces-config.xml.jsfdia
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/.faces-config.xml.jsfdia
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/.faces-config.xml.jsfdia 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS model-entity="JSFProcess">
+ <PROCESS-ITEM NAME="rules:#pages#correctCustomTags.xhtml"
+ PATH="/pages/correctCustomTags.xhtml"
model-entity="JSFProcessGroup">
+ <PROCESS-ITEM ID="rules:#pages#correctCustomTags.xhtml:0"
NAME="item"
+ PATH="/pages/correctCustomTags.xhtml"
model-entity="JSFProcessItem">
+ <PROCESS-ITEM-OUTPUT ID="greeting::#pages#incorrectCustomTags.xhtml"
+ NAME="output" PATH="/pages/incorrectCustomTags.xhtml"
+ TARGET="rules:#pages#incorrectCustomTags.xhtml" TITLE="greeting"
model-entity="JSFProcessItemOutput"/>
+ </PROCESS-ITEM>
+ </PROCESS-ITEM>
+ <PROCESS-ITEM NAME="rules:#pages#incorrectCustomTags.xhtml"
+ PATH="/pages/incorrectCustomTags.xhtml"
model-entity="JSFProcessGroup"/>
+</PROCESS>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/classes/demo/Person.class
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/classes/demo/Person.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/classes/resources.properties
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/classes/resources.properties
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/classes/resources.properties 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,2 @@
+prompt=Your Name\:
+greeting=Hello
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/faces-config.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/faces-config.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/faces-config.xml 2009-04-15
08:24:26 UTC (rev 14750)
@@ -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/correctCustomTags.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>greeting</from-outcome>
+ <to-view-id>/pages/incorrectCustomTags.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.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/web.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/web.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/WEB-INF/web.xml 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,46 @@
+<?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>customFaceletsTestProject</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>facelets.LIBRARIES</param-name>
+ <param-value>/tags/facelets.taglib.xml</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.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/index.jsp
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/index.jsp
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/index.jsp 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,7 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head></head>
+ <body>
+ <jsp:forward page="pages/inputname.jsf" />
+ </body>
+</html>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/correctCustomTags.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/correctCustomTags.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/correctCustomTags.xhtml 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,19 @@
+<!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:c="http://java.sun.com/jstl/core"
+ xmlns:ma="http://mareshkau/tags">
+
+<head></head>
+<body>
+<div id="correctCustomTags">
+<!-- Test case when custom template defined -->
+<ma:paginator/>
+<!-- Another custom template defined -->
+<ma:echo echo="Echo"></ma:echo>
+<ma:paginator/>
+</div>
+</body>
+</html>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/correctCustomTags.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/correctCustomTags.xhtml.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/correctCustomTags.xhtml.xml 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,47 @@
+<tests>
+<test id="correctCustomTags">
+<DIV ID="correctCustomTags" STYLE="-moz-user-modify: read-write;"
>
+<!-- Test case when custom template defined -->
+<DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify:
read-only;">
+<TABLE BORDER="0" STYLE="margin-right: auto; margin-left: auto;
-moz-user-modify: read-only;">
+<TBODY>
+<TR>
+<TD><A STYLE="-moz-user-modify: read-only;" ><SPAN
CLASS="vpe-text" STYLE="-moz-user-modify:
read-only;"><<</SPAN></A>
+</TD>
+<TD><A STYLE="-moz-user-modify: read-only;" ><SPAN
CLASS="vpe-text" STYLE="-moz-user-modify:
read-only;"><</SPAN></A>
+</TD>
+<TD><A STYLE="-moz-user-modify: read-only;" ><SPAN
CLASS="vpe-text" STYLE="-moz-user-modify:
read-only;">></SPAN></A>
+</TD>
+<TD><A STYLE="-moz-user-modify: read-only;" ><SPAN
CLASS="vpe-text" STYLE="-moz-user-modify:
read-only;">>></SPAN></A>
+</TD>
+</TR>
+</TBODY>
+</TABLE>
+</DIV>
+<!-- Another custom template defined -->
+<DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify:
read-only;" >
+<SPAN STYLE="-moz-user-modify: read-only;">
+<SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">
+${echo}
+</SPAN>
+</SPAN>
+</DIV>
+<DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify:
read-only;">
+<TABLE BORDER="0" STYLE="margin-right: auto; margin-left: auto;
-moz-user-modify: read-only;">
+<TBODY>
+<TR>
+<TD><A STYLE="-moz-user-modify: read-only;" ><SPAN
CLASS="vpe-text" STYLE="-moz-user-modify:
read-only;"><<</SPAN></A>
+</TD>
+<TD><A STYLE="-moz-user-modify: read-only;" ><SPAN
CLASS="vpe-text" STYLE="-moz-user-modify:
read-only;"><</SPAN></A>
+</TD>
+<TD><A STYLE="-moz-user-modify: read-only;" ><SPAN
CLASS="vpe-text" STYLE="-moz-user-modify:
read-only;">></SPAN></A>
+</TD>
+<TD><A STYLE="-moz-user-modify: read-only;" ><SPAN
CLASS="vpe-text" STYLE="-moz-user-modify:
read-only;">>></SPAN></A>
+</TD>
+</TR>
+</TBODY>
+</TABLE>
+</DIV>
+</DIV>
+</test>
+</tests>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/incorrectCustomTags.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/incorrectCustomTags.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/incorrectCustomTags.xhtml 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,19 @@
+<!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:ma="http://mareshkau/tags">
+<head>
+</head>
+<body id="incorrectCustomTags">
+<!-- Custom template doesn't defined -->
+<ma:test />
+<!-- Custom template defined, but hasn't source node -->
+<mo:paginator />
+
+<mo:test />
+
+<ma:test1 />
+
+</body>
+
+</html>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/incorrectCustomTags.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/incorrectCustomTags.xhtml.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/incorrectCustomTags.xhtml.xml 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,24 @@
+<tests>
+<test id="incorrectCustomTags">
+<DIV ID="incorrectCustomTags" >
+<!-- Custom template doesn't defined -->
+<DIV STYLE="margin: 3px 0pt; padding: 0pt 5px; background-color: rgb(236, 243,
255); cursor: pointer; font-style: italic; color: rgb(0, 81, 221);"
VPE:INCLUDE-ELEMENT="yes" >
+ma:test<BR VPE:PSEUDO-ELEMENT="yes" STYLE="font-style: italic; color:
green; -moz-user-modify: read-only;"/>
+
+</DIV>
+<!-- Custom template defined, but hasn't source node -->
+<DIV CLASS="__any__tag__caption" STYLE="border: 1px solid green;
-moz-user-modify: read-only;">
+mo:paginator<BR VPE:PSEUDO-ELEMENT="yes" STYLE="font-style: italic;
color: green; -moz-user-modify: read-only;"/>
+
+</DIV>
+<DIV CLASS="__any__tag__caption" STYLE="border: 1px solid green;
-moz-user-modify: read-only;">
+mo:test<BR VPE:PSEUDO-ELEMENT="yes" STYLE="font-style: italic; color:
green; -moz-user-modify: read-only;"/>
+
+</DIV>
+<DIV STYLE="margin: 3px 0pt; padding: 0pt 5px; background-color: rgb(236, 243,
255); cursor: pointer; font-style: italic; color: rgb(0, 81, 221);"
VPE:INCLUDE-ELEMENT="yes">
+ma:test1<BR VPE:PSEUDO-ELEMENT="yes" STYLE="font-style: italic; color:
green; -moz-user-modify: read-only;"/>
+
+</DIV>
+</DIV>
+</test>
+</tests>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/tags/components/echo.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/tags/components/echo.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/tags/components/echo.xhtml 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,10 @@
+<!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">
+THIS TEXT SHOULD BE REMOVED
+<ui:composition>
+ <span>${echo}</span>
+</ui:composition>
+THIS TEXT SHOULD BE REMOVED
+</html>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/tags/components/paginator.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/tags/components/paginator.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/tags/components/paginator.xhtml 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,20 @@
+<!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">
+This Text will be removed
+<ui:component>
+ <h:panelGrid style="margin-right:auto;margin-left:auto;"
columns="4">
+ <h:outputLink>
+ <h:outputText value="<<" /></h:outputLink>
+ <h:outputLink>
+ <h:outputText value="<" /></h:outputLink>
+ <h:outputLink>
+ <h:outputText value=">" /></h:outputLink>
+ <h:outputLink>
+ <h:outputText value=">>" /></h:outputLink>
+ </h:panelGrid>
+</ui:component>
+This Text will be removed
+</html>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/tags/facelets.taglib.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/tags/facelets.taglib.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/tags/facelets.taglib.xml 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,17 @@
+<!DOCTYPE facelet-taglib PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+<facelet-taglib>
+ <namespace>http://mareshkau/tags</namespace>
+ <tag>
+ <tag-name>echo</tag-name>
+ <source>components/echo.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>paginator</tag-name>
+ <source>components/paginator.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>test1</tag-name>
+ </tag>
+</facelet-taglib>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/templates/common.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/templates/common.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/templates/common.xhtml 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,17 @@
+<!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:ma="http://mareshkau/tags">
+ <head>
+ </head>
+<body>
+<div id="correctCustomTags">
+<!-- Test case when custom template defined -->
+<ma:paginator/>
+<!-- Another custom template defined -->
+<ma:echo echo="Echo"></ma:echo>
+<ma:paginator/>
+</div>
+</body>
+
+</html>
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/ant/build.properties
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/ant/build.properties
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/ant/build.properties 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,3 @@
+#
+#Wed Apr 08 14:46:00 EEST 2009
+classpath.external=
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/ant/build.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/ant/build.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/ant/build.xml 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,87 @@
+<project name="customFaceletsTestProject" basedir="../"
default="deploy">
+
+ <!-- Project settings -->
+ <property name="project.distname"
value="customFaceletsTestProject"/>
+
+ <!-- Local system paths -->
+ <property file="${basedir}/ant/build.properties"/>
+ <property name="webroot.dir"
value="${basedir}/WebContent"/>
+ <property name="webinf.dir"
value="${webroot.dir}/WEB-INF"/>
+ <property name="build.dir" value="build"/>
+
+
+ <!-- classpath for JSF 1.0 -->
+ <path id="compile.classpath">
+ <pathelement path ="${webinf.dir}/lib/commons-beanutils.jar"/>
+ <pathelement path ="${webinf.dir}/lib/commons-collections.jar"/>
+ <pathelement path ="${webinf.dir}/lib/commons-digester.jar"/>
+ <pathelement path ="${webinf.dir}/lib/commons-logging.jar"/>
+ <pathelement path ="${webinf.dir}/lib/jsf-api.jar"/>
+ <pathelement path ="${webinf.dir}/lib/jsf-impl.jar"/>
+ <pathelement path ="${webinf.dir}/lib/jstl.jar"/>
+ <pathelement path ="${webinf.dir}/lib/standard.jar"/>
+ <pathelement path ="${webinf.dir}/classes"/>
+ <pathelement path ="${classpath.external}"/>
+ <pathelement path ="${classpath}"/>
+ </path>
+
+ <!-- define your folder for deployment -->
+ <property name="deploy.dir" value="deploy"/>
+
+ <!-- Check timestamp on files -->
+ <target name="prepare">
+ <tstamp/>
+ </target>
+
+ <!-- Copy any resource or configuration files -->
+ <target name="resources">
+ <copy todir="${webinf.dir}/classes"
includeEmptyDirs="no">
+ <fileset dir="JavaSource">
+ <patternset>
+ <include name="**/*.conf"/>
+ <include name="**/*.properties"/>
+ <include name="**/*.xml"/>
+ </patternset>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- Normal build of application -->
+ <target name="compile" depends="prepare,resources">
+ <javac srcdir="JavaSource"
destdir="${webinf.dir}/classes">
+ <classpath refid="compile.classpath"/>
+ </javac>
+ </target>
+
+ <!-- Remove classes directory for clean build -->
+ <target name="clean"
+ description="Prepare for clean build">
+ <delete dir="${webinf.dir}/classes"/>
+ <mkdir dir="${webinf.dir}/classes"/>
+ </target>
+
+ <!-- Build entire project -->
+ <target name="build" depends="prepare,compile"/>
+ <target name="rebuild" depends="clean,prepare,compile"/>
+
+ <!-- Create binary distribution -->
+ <target name="war" depends="build">
+ <mkdir dir="${build.dir}"/>
+ <war
+ basedir="${webroot.dir}"
+ warfile="${build.dir}/${project.distname}.war"
+ webxml="${webinf.dir}/web.xml">
+ <exclude name="WEB-INF/${build.dir}/**"/>
+ <exclude name="WEB-INF/src/**"/>
+ <exclude name="WEB-INF/web.xml"/>
+ </war>
+
+ </target>
+
+ <target name="deploy" depends="war">
+ <delete file="${deploy.dir}/${project.distname}.war"/>
+ <delete dir="${deploy.dir}/${project.distname}"/>
+ <copy file="${build.dir}/${project.distname}.war"
todir="${deploy.dir}"/>
+ </target>
+
+</project>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-04-15
04:38:38 UTC (rev 14749)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-04-15
08:24:26 UTC (rev 14750)
@@ -44,6 +44,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3127Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3144Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3163Test;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3197Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3376Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3396Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3441Test;
@@ -77,6 +78,7 @@
public static final String IMPORT_PROJECT_NAME = "jsfTest"; //$NON-NLS-1$
public static final String IMPORT_JSF_20_PROJECT_NAME = "jsf2test";
//$NON-NLS-1$
+ public static final String IMPORT_CUSTOM_FACELETS_PROJECT =
"customFaceletsTestProject";//$NON-NLS-1$
public static Test suite() {
@@ -133,6 +135,7 @@
suite.addTestSuite(JBIDE3482Test.class);
suite.addTestSuite(JBIDE3632Test.class);
suite.addTestSuite(JBIDE3650Test.class);
+ suite.addTestSuite(JBIDE3197Test.class);
// $JUnit-END$
// added by Max Areshkau
@@ -148,6 +151,11 @@
importBeanJsf20.setImportProjectPath(JsfTestPlugin.getPluginResourcePath());
projectToImport.add(importBeanJsf20);
+ ImportBean customFaceletsTestProject = new ImportBean();
+ customFaceletsTestProject.setImportProjectName(JsfAllTests.IMPORT_CUSTOM_FACELETS_PROJECT);
+ customFaceletsTestProject.setImportProjectPath(JsfTestPlugin.getPluginResourcePath());
+ projectToImport.add(customFaceletsTestProject);
+
return new VpeTestSetup(suite, projectToImport);
}
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3197Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3197Test.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3197Test.java 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
+import org.jboss.tools.vpe.ui.test.ComponentContentTest;
+
+/**
+ * @author mareshkau
+ *
+ */
+public class JBIDE3197Test extends ComponentContentTest {
+
+ public JBIDE3197Test(String name) {
+ super(name);
+ }
+
+ public void testIncorrectTags() throws Throwable {
+ performContentTest("incorrectCustomTags.xhtml"); //$NON-NLS-1$
+ }
+
+ public void testContentCustomTagsWithSourceSupport() throws Throwable {
+ performContentTest("correctCustomTags.xhtml"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected String getTestProjectName() {
+ return JsfAllTests.IMPORT_CUSTOM_FACELETS_PROJECT;
+ }
+}
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCustomTemplate.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCustomTemplate.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCustomTemplate.java 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.template;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.ide.IDE;
+import org.jboss.tools.vpe.VpePlugin;
+import org.jboss.tools.vpe.editor.VpeIncludeInfo;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.custom.CustomTLDReference;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * @author mareshkau
+ *
+ */
+public class VpeCustomTemplate extends VpeIncludeTemplate {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.vpe.editor.template.VpeIncludeTemplate#create(org.jboss
+ * .tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node,
+ * org.mozilla.interfaces.nsIDOMDocument)
+ */
+ @Override
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+
+ IPath pathToFile = CustomTLDReference
+ .getCustomElementPath(sourceNode, pageContext);
+
+ if (pathToFile != null) {
+
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(
+ pathToFile);
+ if (file != null && file.exists()) {
+ if (!pageContext.getVisualBuilder().isFileInIncludeStack(
+ file)) {
+ Document document = pageContext.getVisualBuilder()
+ .getIncludeDocuments().get(file);
+ if (document == null) {
+ document = VpeCreatorUtil.getDocumentForRead(file);
+ if (document != null)
+ pageContext.getVisualBuilder()
+ .getIncludeDocuments().put(file,
+ document);
+ }
+ if (document != null) {
+ VpeCreationData creationData = createInclude(
+ document, visualDocument);
+ creationData.setData(file);
+ pageContext.getVisualBuilder().pushIncludeStack(
+ new VpeIncludeInfo((Element) sourceNode,
+ file, document));
+ return creationData;
+ }
+ }
+ }
+ }
+ VpeCreationData creationData = createStub(sourceNode.getNodeName(), visualDocument);
+ creationData.setData(null);
+ return creationData;
+ }
+ @Override
+ public void openIncludeEditor(VpePageContext pageContext, Element sourceElement, Object
data) {
+
+ IFile file = getFileForOpenOn(pageContext, sourceElement);
+
+ if(file!=null && file.exists()) {
+ IWorkbenchPage workbenchPage =
VpePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ try {
+ IDE.openEditor(workbenchPage, file,true);
+ } catch (PartInitException e) {
+ VpePlugin.reportProblem(e);
+ }
+ }
+ }
+ /**
+ * Looks for file to open on each editor, for open on click
+ * @param pageContext
+ * @param sourceElement
+ * @return file, if file has been founded or null otherwise
+ */
+ private static IFile getFileForOpenOn(VpePageContext pageContext, Element sourceElement)
{
+ IPath pathToFile = CustomTLDReference
+ .getCustomElementPath(sourceElement, pageContext);
+
+ IFile file =null;
+
+ if(pathToFile!=null) {
+ file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(
+ pathToFile);
+ }
+ //if we cann't find source file, then just open tld definition file
+ if(file==null || !file.exists()) {
+ pathToFile = CustomTLDReference.getCustomTLDPath(pageContext, sourceElement);
+ file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(
+ pathToFile);
+ }
+ return file;
+ }
+}
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeIncludeTemplate.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeIncludeTemplate.java 2009-04-15
04:38:38 UTC (rev 14749)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeIncludeTemplate.java 2009-04-15
08:24:26 UTC (rev 14750)
@@ -113,7 +113,7 @@
return true;
}
- private VpeCreationData createInclude(Document sourceDocument, nsIDOMDocument
visualDocument) {
+ protected VpeCreationData createInclude(Document sourceDocument, nsIDOMDocument
visualDocument) {
nsIDOMElement visualNewElement = visualDocument.createElement(HTML.TAG_DIV);
VpeVisualDomBuilder.markIncludeElement(visualNewElement);
VpeCreationData creationData = new VpeCreationData(visualNewElement);
@@ -136,7 +136,7 @@
return creationData;
}
- private VpeCreationData createStub(String fileName, nsIDOMDocument visualDocument) {
+ protected VpeCreationData createStub(String fileName, nsIDOMDocument visualDocument) {
nsIDOMElement visualNewElement = visualDocument.createElement(HTML.TAG_DIV);
visualNewElement.setAttribute("style",
"background-color:#ECF3FF;cursor:pointer;padding:0 5px;margin:3px
0;font-style:italic;color:#0051DD;");
VpeVisualDomBuilder.markIncludeElement(visualNewElement);
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2009-04-15
04:38:38 UTC (rev 14749)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2009-04-15
08:24:26 UTC (rev 14750)
@@ -21,6 +21,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
+
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
@@ -29,6 +30,7 @@
import org.jboss.tools.jst.web.tld.TaglibData;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.custom.CustomTLDReference;
import org.jboss.tools.vpe.editor.template.textformating.TextFormatingData;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.XmlUtil;
@@ -257,6 +259,9 @@
private static final String ATTRIBUTE_TEMPLATE_NAME="attribute";
//$NON-NLS-1$
+ //mareshkau, contains a name of custom template
+ private static final String CUSTOM_TEMPLATE_NAME="vpeCustomTemplate";
//$NON-NLS-1$
+
/**
* added by Max Areshkau, JBIDE-1494
* Contains default text formating data
@@ -280,7 +285,6 @@
* so to render h:column we should load the specific class for h:column from richfaces
template
*/
private static final String NAMESPACE_IDENTIFIER_ATTRIBUTE =
"namespaceIdentifier"; //$NON-NLS-1$
-
private VpeTemplateManager() {
// singleton
@@ -368,10 +372,14 @@
}
String sourceNodeUri = sourceNodeTaglib.getUri();
+ if(sourceNodeUri!=null &&
CustomTLDReference.isExistInCustomTlds(pageContext,sourceNodeUri)){
+ return VpeTemplateManager.CUSTOM_TEMPLATE_NAME;
+ }
+
String templateTaglibPrefix = getTemplateTaglibPrefix(sourceNodeUri);
if(templateTaglibPrefix != null) {
- return templateTaglibPrefix + ":" + sourceNode.getLocalName();
//$NON-NLS-1$
+ return templateTaglibPrefix + ":" + sourceNode.getLocalName();
//$NON-NLS-1
}
return null;
default :
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/custom/CustomTLDData.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/custom/CustomTLDData.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/custom/CustomTLDData.java 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.template.custom;
+
+import org.eclipse.core.runtime.IPath;
+
+/**
+ * Class which contains information about
+ * @author mareshkau
+ *
+ */
+public class CustomTLDData {
+
+ private IPath tldFilePath;
+ private String namespace;
+
+ /**
+ *
+ * @param tldFilePath
+ */
+ public CustomTLDData(IPath tldFilePath, String namespace) {
+ this.tldFilePath=tldFilePath;
+ this.namespace=namespace;
+ }
+
+ /**
+ * @return the tldFilePath
+ */
+ public IPath getTldFilePath() {
+ return this.tldFilePath;
+ }
+
+ /**
+ * @return the namespace
+ */
+ public String getNamespace() {
+ return this.namespace;
+ }
+
+}
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/custom/CustomTLDParser.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/custom/CustomTLDParser.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/custom/CustomTLDParser.java 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.template.custom;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.jboss.tools.vpe.VpePlugin;
+import org.jboss.tools.vpe.editor.template.VpeCreatorUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+/**
+ *
+ * Class which created for parsing custom class definitions
+ * @author mareshkau
+ *
+ */
+public class CustomTLDParser {
+
+ private static final String NAMESPACE="namespace"; //$NON-NLS-1$
+ private static final String TAG="tag"; //$NON-NLS-1$
+ private static final String TAG_NAME="tag-name"; //$NON-NLS-1$
+ private static final String SOURCE="source"; //$NON-NLS-1$
+
+ /**
+ * Looks for namespace, defined for custom template definition file
+ *
+ * @param absolute path for template definition file
+ * @return namespace element if such was founded or null otherwise
+ */
+ public static final String getNameSpace(IPath pathToFile){
+
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(pathToFile);
+ if(file!=null && file.exists()) {
+ Document document=null;
+ try {
+ document = VpeCreatorUtil.getDocumentForRead(file);
+ Element rootElement = document.getDocumentElement();
+ NodeList nodeList = rootElement.getElementsByTagName(NAMESPACE);
+ return nodeList.item(0).getFirstChild().getNodeValue();
+ } catch (Exception e) {
+ VpePlugin.reportProblem(e);
+ } finally {
+ if(document!=null) {
+ VpeCreatorUtil.releaseDocumentFromRead(document);
+ }
+ }
+ }
+ return null;
+ }
+ /**
+ * Looks for source value like in example bellow
+ <tag>
+ <tag-name>paginator</tag-name>
+ <source>components/paginator.xhtml</source>
+ </tag>
+ * @param pathToFile
+ * @param name of tag
+ * @return source value if exists or null otherwise
+ */
+ public static final String getSourceValuetInTag(IPath pathToFile, String name){
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(pathToFile);
+ Document document=null;
+ if(file!=null &&file.exists()) {
+ try{
+ document= VpeCreatorUtil.getDocumentForRead(file);
+ Element rootElement = document.getDocumentElement();
+ NodeList nodeList = rootElement.getElementsByTagName(TAG);
+ for(int i=0;i<nodeList.getLength();i++) {
+ Node child = nodeList.item(i);
+ if(!(child instanceof Element)) {
+ continue;
+ }
+ NodeList tagsList =((Element)child).getElementsByTagName(TAG_NAME);
+ for(int j=0;j<tagsList.getLength();j++) {
+ if(name.equals(tagsList.item(j).getFirstChild().getNodeValue())){
+ NodeList sourceList =((Element)child).getElementsByTagName(SOURCE);
+ //no source element has been founded
+ if(sourceList.getLength()==0) {
+ return null;
+ }
+ return sourceList.item(0).getFirstChild().getNodeValue();
+ }
+ }
+ }
+
+ } finally {
+ if(document!=null) {
+ VpeCreatorUtil.releaseDocumentFromRead(document);
+ }
+ }
+ }
+ return null;
+ }
+}
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/custom/CustomTLDReference.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/custom/CustomTLDReference.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/custom/CustomTLDReference.java 2009-04-15
08:24:26 UTC (rev 14750)
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.template.custom;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.project.IModelNature;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
+import org.jboss.tools.jst.web.tld.TaglibData;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
+import org.jboss.tools.vpe.editor.util.XmlUtil;
+import org.w3c.dom.Node;
+
+/**
+ * Class which contains information about custom taglibs Singleton
+ *
+ * @author mareshkau
+ *
+ */
+public class CustomTLDReference {
+
+ private static final String FACELETS_LIBS_PARAMETER = "facelets.LIBRARIES";
//$NON-NLS-1$
+
+ private static final String PARAM_VALUE = "param-value"; //$NON-NLS-1$
+
+ /**
+ * Returns absolute path to custom template file, if such exist or null otherwise
+ *
+ * @param sourceNode
+ * @return full path to custom template if exist or null if not exist
+ */
+ public static IPath getCustomElementPath(Node sourceNode,
+ VpePageContext pageContext) {
+ List<TaglibData> taglibs = XmlUtil.getTaglibsForNode(sourceNode,
+ pageContext);
+ TaglibData sourceNodeTaglib = XmlUtil.getTaglibForPrefix(sourceNode
+ .getPrefix(), taglibs);
+ String uri = sourceNodeTaglib.getUri();
+ CustomTLDData customTLDData = getCustomTLDDataMap(pageContext).get(uri);
+ if (customTLDData == null) {
+ return null;
+ }
+ IPath pathToSourceFile = (IPath) customTLDData.getTldFilePath();
+ pathToSourceFile = pathToSourceFile.removeLastSegments(1);
+ String sourceParamValue = CustomTLDParser.getSourceValuetInTag(
+ customTLDData.getTldFilePath(), sourceNode.getLocalName());
+ if (sourceParamValue == null) {
+ return null;
+ }
+ pathToSourceFile = pathToSourceFile.append(sourceParamValue);
+ return pathToSourceFile;
+ }
+ /**
+ *
+ * @param pageContext
+ * @param uri node namespace uri
+ * @return true if such template defined in facelets lib or falce if not defined
+ */
+ public static boolean isExistInCustomTlds(VpePageContext pageContext,
+ String uri) {
+ return getCustomTLDDataMap(pageContext).containsKey(uri);
+ }
+
+ /**
+ * Looks for taglibs library
+ * @param pageContext
+ * @param sourceNode node for which we look for taglib library
+ * @return path to taglibs, if such exists or null otherwise
+ */
+ public static IPath getCustomTLDPath(VpePageContext pageContext, Node sourceNode) {
+ List<TaglibData> taglibs = XmlUtil.getTaglibsForNode(sourceNode,
+ pageContext);
+ TaglibData sourceNodeTaglib = XmlUtil.getTaglibForPrefix(sourceNode
+ .getPrefix(), taglibs);
+ String uri = sourceNodeTaglib.getUri();
+ CustomTLDData customTLDData = getCustomTLDDataMap(pageContext).get(uri);
+ if(customTLDData!=null) {
+ return customTLDData.getTldFilePath();
+ }
+ return null;
+ }
+ /**
+ * Looks for custom taglib library map
+ * @return the customTLDDataMap
+ */
+ private static Map<String, CustomTLDData> getCustomTLDDataMap(
+ VpePageContext pageContext) {
+
+ Map<String, CustomTLDData> customTLDMap = new HashMap<String,
CustomTLDData>();
+
+ IEditorInput iEditorInput = pageContext.getEditPart().getEditorInput();
+
+ if (iEditorInput instanceof IFileEditorInput) {
+
+ IFileEditorInput iFileEditorInput = (IFileEditorInput) iEditorInput;
+
+ IFile iFile = iFileEditorInput.getFile();
+
+ IProject project = iFile.getProject();
+ IModelNature nature = EclipseResourceUtil.getModelNature(project);
+ if (nature != null) {
+ XModel model = nature.getModel();
+ XModelObject webXML = WebAppHelper.getWebApp(model);
+ XModelObject param = WebAppHelper.findWebAppContextParam(
+ webXML, CustomTLDReference.FACELETS_LIBS_PARAMETER);
+ if (param != null) {
+ String value = param.getAttributeValue(PARAM_VALUE);
+ if (value != null) {
+ String[] libs = value.split(";");//$NON-NLS-1$
+ for (String faceletLib : libs) {
+ IPath rootPath = VpeStyleUtil
+ .getRootPath(iEditorInput);
+ IPath pathToCustonTld = new Path(faceletLib);
+ pathToCustonTld = rootPath.append(pathToCustonTld);
+ CustomTLDData customTLDData = new CustomTLDData(
+ pathToCustonTld, CustomTLDParser
+ .getNameSpace(pathToCustonTld));
+ if (customTLDData.getNamespace() != null) {
+ customTLDMap.put(customTLDData.getNamespace(),
+ customTLDData);
+ }
+ }
+ }
+ }
+ }
+ }
+ return customTLDMap;
+ }
+}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java 2009-04-15
04:38:38 UTC (rev 14749)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/ComponentContentTest.java 2009-04-15
08:24:26 UTC (rev 14750)
@@ -86,7 +86,7 @@
// get document
Document xmlTestDocument = TestDomUtil.getDocument(xmlTestFile);
- assertNotNull(xmlTestDocument);
+ assertNotNull("Can't get test file, possibly file not exists
"+xmlTestFile,xmlTestDocument); //$NON-NLS-1$
List<String> ids = TestDomUtil.getTestIds(xmlTestDocument);
@@ -116,7 +116,7 @@
// get element by id
nsIDOMElement vpeElement = findElementById(controller, elementId);
- assertNotNull(vpeElement);
+ assertNotNull("Cann't find element with id="+elementId,vpeElement);
//$NON-NLS-1$
// DOMTreeDumper dumper = new DOMTreeDumper(
// VpeDebug.VISUAL_DUMP_PRINT_HASH);