Author: dmaliarevich
Date: 2009-04-02 11:07:32 -0400 (Thu, 02 Apr 2009)
New Revision: 14459
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlXOutTemplate.java
Modified:
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/vpe-templates-jstl.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-3548, x:out was corrected, junit test was
corrected, plugin.properties was added to src build in a4j junit tests' plugin.
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlXOutTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlXOutTemplate.java
(rev 0)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlXOutTemplate.java 2009-04-02
15:07:32 UTC (rev 14459)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * 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.jsf.vpe.jstl.template;
+
+import org.jboss.tools.jsf.vpe.jstl.template.util.Jstl;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMText;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * Class for jstl x:out template
+ *
+ * @author dmaliarevich
+ *
+ */
+public class JstlXOutTemplate extends VpeAbstractTemplate {
+
+ public JstlXOutTemplate() {
+ super();
+ }
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ Element sourceElement = (Element) sourceNode;
+ String select = sourceElement.getAttribute(Jstl.ATTR_SELECT);
+ nsIDOMElement span = VisualDomUtil
+ .createBorderlessContainer(visualDocument);
+ nsIDOMText text = visualDocument.createTextNode(select);
+ span.appendChild(text);
+ VpeCreationData creationData = new VpeCreationData(span);
+
+ return creationData;
+ }
+
+}
Property changes on:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlXOutTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified:
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 2009-04-02
15:07:24 UTC (rev 14458)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/util/Jstl.java 2009-04-02
15:07:32 UTC (rev 14459)
@@ -31,4 +31,6 @@
public static final String TAG_OUT = "out"; //$NON-NLS-1$
public static final String ATTR_URL = "url"; //$NON-NLS-1$
+
+ public static final String ATTR_SELECT = "select"; //$NON-NLS-1$
}
\ No newline at end of file
Modified: 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 2009-04-02
15:07:24 UTC (rev 14458)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/templates/vpe-templates-jstl.xml 2009-04-02
15:07:32 UTC (rev 14459)
@@ -199,7 +199,7 @@
<vpe:tag name="x:out" case-sensitive="yes">
<vpe:template children="no" modify="no"
- class="org.jboss.tools.jsf.vpe.jstl.template.JstlOutTemplate">
+ class="org.jboss.tools.jsf.vpe.jstl.template.JstlXOutTemplate">
<vpe:textFormatting use-default-formats="yes">
</vpe:textFormatting>
</vpe:template>