Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.jet/templates/writeTextElement.jet')
-rw-r--r--plugins/org.eclipse.jet/templates/writeTextElement.jet10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/org.eclipse.jet/templates/writeTextElement.jet b/plugins/org.eclipse.jet/templates/writeTextElement.jet
new file mode 100644
index 0000000..6ed7e53
--- /dev/null
+++ b/plugins/org.eclipse.jet/templates/writeTextElement.jet
@@ -0,0 +1,10 @@
+<%@jet class="WriteTextElementTemplate" %>
+<%@jet imports="org.eclipse.jet.compiler.TextElement"%>
+<%@jet imports="org.eclipse.jet.internal.JavaUtil"%>
+<%
+final String indent = (String)context.getVariable("indent"); //$NON-NLS-1$
+final TextElement text = (TextElement)context.getVariable("element"); //$NON-NLS-1$
+%>
+<% if(text.getText().length > 0) { %>
+<%= indent %>out.write( <%= JavaUtil.asJavaQuotedString(text.getText()) %> ); //$NON-NLS-1$
+<% } %>

Back to the top