Author: izhukov
Date: 2009-02-10 13:51:13 -0500 (Tue, 10 Feb 2009)
New Revision: 13571
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/.classpath
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/.project
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/META-INF/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/about.html
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/build.properties
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/plugin.properties
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/plugin.xml
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/ComponentUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/JstlTemplatePlugin.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/AbstractOutputJstlTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlOutTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/util/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/util/Jstl.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/templates/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/templates/vpe-templates-jstl.xml
Log:
vpe jstl project added
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/.classpath
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/.classpath (rev
0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/.classpath 2009-02-10 18:51:13 UTC (rev
13571)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/.project
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/.project (rev
0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/.project 2009-02-10 18:51:13 UTC (rev
13571)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.jsf.vpe.jstl</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/META-INF/MANIFEST.MF 2009-02-10
18:51:13 UTC (rev 13571)
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.jboss.tools.jsf.vpe.jstl;singleton:=true
+Bundle-Version: 2.1.0
+Bundle-Activator: org.jboss.tools.jsf.vpe.jstl.JstlTemplatePlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.jboss.tools.common,
+ org.jboss.tools.vpe,
+ org.mozilla.xpcom,
+ org.jboss.tools.jst.jsp,
+ org.eclipse.wst.sse.core,
+ org.eclipse.jst.jsp.core,
+ org.eclipse.wst.html.core,
+ org.jboss.tools.vpe.html,
+ org.jboss.tools.jsf.vpe.jsf;bundle-version="2.1.0"
+Eclipse-LazyStart: true
+Export-Package: org.jboss.tools.jsf.vpe.jstl.template
+Bundle-Localization: plugin
+Import-Package: org.jboss.tools.jst.web.tld
+
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/about.html
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/about.html (rev
0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/about.html 2009-02-10 18:51:13 UTC (rev
13571)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>©2007 Red Hat, Inc. All rights reserved</P>
+
+<H3>License</H3>
+
+<P>Red Hat Inc., through its JBoss division, makes available all content in this
plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A
href="http://www.eclipse.org/org/documents/epl-v10.php">http...;.
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from Red Hat Inc., the
+Content is being redistributed by another party ("Redistributor") and different
+terms and conditions may apply to your use of any object code in the Content.
+Check the Redistributor's license that was provided with the Content. If no such
+license exists, contact the Redistributor. Unless otherwise indicated below, the
+terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at
+ <A
href="http://www.jboss.org/tools">http://www.jboss.org/tools...
+
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/build.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/build.properties
(rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/build.properties 2009-02-10 18:51:13
UTC (rev 13571)
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ templates/,\
+ about.html,\
+ plugin.properties
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/plugin.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/plugin.properties
(rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/plugin.properties 2009-02-10 18:51:13
UTC (rev 13571)
@@ -0,0 +1,2 @@
+providerName=JBoss, a division of Red Hat
+pluginName=JSF support for JBoss Visual Page Editor Plug-in
\ No newline at end of file
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/plugin.xml (rev
0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/plugin.xml 2009-02-10 18:51:13 UTC (rev
13571)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.3"?>
+<plugin>
+ <extension
+ point="org.jboss.tools.vpe.templates">
+ <templates
+ name="JSTL Reference Implementation"
+ path="templates/vpe-templates-jstl.xml"/>
+ </extension>
+</plugin>
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/ComponentUtil.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/ComponentUtil.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/ComponentUtil.java 2009-02-10
18:51:13 UTC (rev 13571)
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * 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.jstl;
+
+
+import org.jboss.tools.vpe.editor.util.Constants;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Element;
+
+
+/**
+ * The Class ComponentUtil.
+ */
+public class ComponentUtil {
+
+ /**
+ * Returns value of attribute.
+ *
+ * @param attributeName the attribute name
+ * @param sourceElement the source element
+ *
+ * @return the attribute
+ */
+ public static String getAttribute(Element sourceElement, String attributeName) {
+ String attribute = sourceElement.getAttribute(attributeName);
+ if (attribute == null) {
+ attribute = Constants.EMPTY;
+ }
+ return attribute;
+ }
+
+ /**
+ * Returns value of attribute.
+ *
+ * @param attributeName the attribute name
+ * @param sourceElement the source element
+ * @param defaultValue the default value
+ *
+ * @return the attribute
+ */
+ public static String getAttribute(Element sourceElement, String attributeName, String
defaultValue) {
+ String attribute = sourceElement.getAttribute(attributeName);
+ if (attribute == null) {
+ attribute = defaultValue;
+ }
+ return attribute;
+ }
+
+ /**
+ * Returns value of attribute.
+ *
+ * @param attributeName the attribute name
+ * @param sourceElement the source element
+ *
+ * @return the attribute
+ */
+ public static String getAttribute(nsIDOMElement sourceElement, String attributeName)
{
+ String attribute = sourceElement.getAttribute(attributeName);
+ if (attribute == null) {
+ attribute = Constants.EMPTY;
+ }
+ return attribute;
+ }
+}
\ No newline at end of file
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/JstlTemplatePlugin.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/JstlTemplatePlugin.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/JstlTemplatePlugin.java 2009-02-10
18:51:13 UTC (rev 13571)
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * 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.jstl;
+
+import org.jboss.tools.common.log.BaseUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ *
+ * @author Igor Zhukov (izhukov(a)exadel.com)
+ */
+public class JstlTemplatePlugin extends BaseUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.jsf.vpe.jstl";
//$NON-NLS-1$
+
+ // The shared instance
+ private static JstlTemplatePlugin plugin;
+
+ /**
+ * The default constructor.
+ */
+ public JstlTemplatePlugin() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static JstlTemplatePlugin getDefault() {
+ return plugin;
+ }
+}
\ No newline at end of file
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/AbstractOutputJstlTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/AbstractOutputJstlTemplate.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/AbstractOutputJstlTemplate.java 2009-02-10
18:51:13 UTC (rev 13571)
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * 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.jsf.vpe.jstl.template;
+
+import org.jboss.tools.jsf.vpe.jsf.template.util.model.VpeElementProxyData;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.mapping.NodeData;
+import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
+import org.jboss.tools.vpe.editor.mapping.VpeElementData;
+import org.jboss.tools.vpe.editor.mapping.VpeElementMapping;
+import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public abstract class AbstractOutputJstlTemplate extends VpeAbstractTemplate {
+
+ /**
+ *
+ * @param element
+ * @return
+ */
+ public Attr getOutputAttributeNode(Element element) {
+ if (element.hasAttribute(HTML.ATTR_VALUE)) {
+ return element.getAttributeNode(HTML.ATTR_VALUE);
+ }
+
+ return null;
+ }
+
+ /**
+ *
+ * @param pageContext
+ * @param visualDocument
+ * @param sourceElement
+ * @param targetVisualElement
+ * @param creationData
+ */
+ protected void processOutputAttribute(VpePageContext pageContext,
+ nsIDOMDocument visualDocument, Element sourceElement,
+ nsIDOMElement targetVisualElement, VpeCreationData creationData) {
+
+ VpeElementProxyData elementData = new VpeElementProxyData();
+
+ Attr outputAttr = getOutputAttributeNode(sourceElement);
+
+ if (outputAttr != null) {
+
+ // prepare value
+ String newValue = prepareAttrValue(pageContext, sourceElement, outputAttr);
+ // if escape then contents of value (or other attribute) is only
+ // text
+// if (!sourceElement.hasAttribute(JSF.ATTR_ESCAPE)
+// || "true".equalsIgnoreCase(sourceElement //$NON-NLS-1$
+// .getAttribute(JSF.ATTR_ESCAPE))) {
+//
+// String value = outputAttr.getValue();
+//
+// nsIDOMText text;
+// // if bundleValue differ from value then will be represent
+// // bundleValue, but text will be not edit
+// boolean isEditable = value.equals(newValue);
+//
+// text = visualDocument.createTextNode(newValue);
+// // add attribute for ability of editing
+//
+// elementData.addNodeData(new AttributeData(outputAttr, text,
+// isEditable));
+//
+// targetVisualElement.appendChild(text);
+//
+// }
+ }
+
+ creationData.setElementData(elementData);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.vpe.editor.template.VpeAbstractTemplate#setPseudoContent
+ * (org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node,
+ * org.mozilla.interfaces.nsIDOMNode, org.mozilla.interfaces.nsIDOMDocument)
+ */
+ @Override
+ public void setPseudoContent(VpePageContext pageContext,
+ Node sourceContainer, nsIDOMNode visualContainer,
+ nsIDOMDocument visualDocument) {
+ // Empty
+ }
+
+ @Override
+ public NodeData getNodeData(nsIDOMNode node, VpeElementData elementData,
+ VpeDomMapping domMapping) {
+ // TODO Auto-generated method stub
+ NodeData nodeData = super.getNodeData(node, elementData, domMapping);
+ if (nodeData == null) {
+
+ VpeNodeMapping nodeMapping = domMapping.getNodeMapping(node);
+
+ if (nodeMapping != null) {
+ if (nodeMapping instanceof VpeElementMapping) {
+ nodeData = super.getNodeData(node,
+ ((VpeElementMapping) nodeMapping).getElementData(),
+ domMapping);
+ }
+// else if (nodeMapping.getType() == VpeNodeMapping.TEXT_MAPPING) {
+// nodeData = new NodeData(nodeMapping.getSourceNode(), node,
+// true);
+// }
+ }
+ }
+ return nodeData;
+ }
+
+ @Override
+ public nsIDOMNode getVisualNodeByBySourcePosition(
+ VpeElementMapping elementMapping, int focusPosition,
+ int anchorPosition, VpeDomMapping domMapping) {
+ nsIDOMNode node = null;
+
+ if ((elementMapping.getElementData() instanceof VpeElementProxyData)
+ && (((VpeElementProxyData) elementMapping.getElementData())
+ .getNodelist() != null)) {
+ VpeElementProxyData elementProxyData = (VpeElementProxyData)
elementMapping.getElementData();
+
+// VpeNodeMapping nodeMapping = NodeProxyUtil.findNodeByPosition(
+// domMapping, elementProxyData.getNodelist(), focusPosition,
+// anchorPosition);
+
+// if (nodeMapping != null) {
+//
+// if (nodeMapping instanceof VpeElementMapping) {
+// node = super.getVisualNodeByBySourcePosition(
+// (VpeElementMapping) nodeMapping, focusPosition,
+// anchorPosition, domMapping);
+// } else {
+// node = nodeMapping.getVisualNode();
+// }
+// }
+ }
+
+ if (node == null) {
+ node = super.getVisualNodeByBySourcePosition(elementMapping,
+ focusPosition, anchorPosition, domMapping);
+ }
+ return node;
+ }
+
+ protected String prepareAttrValue(VpePageContext pageContext, Element parent, Attr attr)
{
+ return attr.getNodeValue();
+ }
+}
\ No newline at end of file
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlOutTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlOutTemplate.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlOutTemplate.java 2009-02-10
18:51:13 UTC (rev 13571)
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * 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.jstl.template;
+
+import org.jboss.tools.jsf.vpe.jsf.template.AbstractOutputJsfTemplate;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+
+/**
+ * Class for creating Out content
+ *
+ * @author Igor Zhukov
+ */
+public class JstlOutTemplate extends AbstractOutputJsfTemplate {
+
+ /**
+ * Create html instead c:out component.
+ *
+ * @param pageContext
+ * Contains the information on edited page.
+ * @param sourceNode
+ * The current node of the source tree.
+ * @param visualDocument
+ * The document of the visual tree.
+ * @return The information on the created node of the visual tree.
+ */
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
+ // convert to Element
+ Element sourceElement = (Element) sourceNode;
+ // create span element
+ nsIDOMElement span = VisualDomUtil.createBorderlessContainer(visualDocument);
+
+ VpeCreationData creationData = new VpeCreationData(span);
+
+ processOutputAttribute(pageContext, visualDocument, sourceElement, span,
creationData);
+
+ return creationData;
+ }
+}
\ No newline at end of file
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/util/Jstl.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/util/Jstl.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/util/Jstl.java 2009-02-10
18:51:13 UTC (rev 13571)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.jsf.vpe.jstl.template.util;
+
+
+/**
+ * Contains JSTL tags and general attributes.
+ *
+ * @author Igor Zhukov
+ */
+public class Jstl {
+
+ /**
+ * The Constructor.
+ */
+ private Jstl() {
+ }
+
+ /** The Constant ATTR_ADD_CONTROL_LABEL. */
+ public static final String ATTR_ADD_CONTROL_LABEL = "addControlLabel";
//$NON-NLS-1$
+
+ public static final String TAG_OUT = "out"; //$NON-NLS-1$
+}
\ No newline at end of file
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/templates/vpe-templates-jstl.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/templates/vpe-templates-jstl.xml
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/templates/vpe-templates-jstl.xml 2009-02-10
18:51:13 UTC (rev 13571)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<vpe:templates
xmlns:vpe="http://org.jboss.org/tools/vpe/template"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <vpe:template-taglib
uri="http://java.sun.com/jstl/core"
prefix="c" />
+
+ <vpe:tag name="c:out" case-sensitive="yes">
+ <vpe:template children="no" modify="no"
+ class="org.jboss.tools.jsf.vpe.jstl.template.JstlOutTemplate">
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
+ </vpe:template>
+ </vpe:tag>
+
+ <!-- Default template -->
+ <vpe:template children="yes" modify="no">
+ <vpe:any value="{name()}" title="{tagstring()}"/>
+ </vpe:template>
+</vpe:templates>
\ No newline at end of file