You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by aj...@apache.org on 2008/10/05 05:44:23 UTC
svn commit: r701746 [2/2] -
/incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/tests/com/ecyrd/jspwiki/ui/stripes/
Modified: incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/tests/com/ecyrd/jspwiki/ui/stripes/Text.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/tests/com/ecyrd/jspwiki/ui/stripes/Text.java?rev=701746&r1=701745&r2=701746&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/tests/com/ecyrd/jspwiki/ui/stripes/Text.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/tests/com/ecyrd/jspwiki/ui/stripes/Text.java Sat Oct 4 20:44:22 2008
@@ -1,15 +1,25 @@
package com.ecyrd.jspwiki.ui.stripes;
+/**
+ * Represents markup in a JSP that is not a {@link Tag} or {@link Attribute},
+ * such as text, an HTML comment, a JSP comment, a JSP declaration, scriptlet or
+ * a JSP expression.
+ */
public class Text extends AbstractNode
{
private String m_value = null;
-
+
public Text( JspDocument doc )
{
super( doc, NodeType.TEXT );
}
+ public Text( JspDocument doc, NodeType type )
+ {
+ super( doc, type );
+ }
+
/**
* Always returns \"(TEXT)\".
*/
@@ -18,7 +28,7 @@
{
return "(TEXT)";
}
-
+
public String getValue()
{
return m_value;
@@ -26,19 +36,20 @@
public void setName( String name )
{
- throw new UnsupportedOperationException( "Text nodes cannot have names.");
+ throw new UnsupportedOperationException( "Text nodes cannot have names." );
}
public void setValue( String value )
{
m_value = value;
}
-
+
/**
- * Returns the string that represents the Tag, including the name and attributes, but not any child nodes.
+ * Returns the string that represents the Tag, including the name and
+ * attributes, but not any child nodes.
*/
public String toString()
{
- return m_value;
+ return m_type.getTagStart() + m_value + m_type.getTagEnd();
}
}