Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates')
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input.jet10
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input.jet.expected.java118
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input2.jet10
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.loader.expected.java83
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat1
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat21
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat31
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat41
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet3
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet.nopredefs.expected.java23
-rw-r--r--tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet.predefs.expected.java39
11 files changed, 0 insertions, 290 deletions
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input.jet b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input.jet
deleted file mode 100644
index 2bc9dfc..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input.jet
+++ /dev/null
@@ -1,10 +0,0 @@
-<%@taglib id="org.eclipse.jet.tests.TestLibrary" prefix="test" %>
-"isAllUpper", "nl", "other", "tokenize", "upper"
-
-<test:tokenize string="a,b,c,d,e,f,g" sep="," var="token">
-<test:other>some text</test:other>
-<test:isAllUpper var="token">
-</test:isAllUpper>
-<test:upper>foo</test:upper><test:nl/>
-<test:other/>
-</test:tokenize> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input.jet.expected.java b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input.jet.expected.java
deleted file mode 100644
index b0a469b..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input.jet.expected.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.eclipse.jet.compiled;
-
-import org.eclipse.jet.JET2Context;
-import org.eclipse.jet.JET2Template;
-import org.eclipse.jet.JET2Writer;
-import org.eclipse.jet.taglib.RuntimeTagElement;
-import org.eclipse.jet.taglib.TagInfo;
-
-public class _jet_simplev2input implements JET2Template {
- private static final String _jetns_test = "org.eclipse.jet.tests.TestLibrary"; //$NON-NLS-1$
-
- public _jet_simplev2input() {
- super();
- }
-
- private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
-
- private static final TagInfo _td_test_tokenize_4_1 = new TagInfo("test:tokenize", //$NON-NLS-1$
- 4, 1,
- new String[] {
- "string", //$NON-NLS-1$
- "sep", //$NON-NLS-1$
- "var", //$NON-NLS-1$
- },
- new String[] {
- "a,b,c,d,e,f,g", //$NON-NLS-1$
- ",", //$NON-NLS-1$
- "token", //$NON-NLS-1$
- } );
- private static final TagInfo _td_test_other_5_1 = new TagInfo("test:other", //$NON-NLS-1$
- 5, 1,
- new String[] {
- },
- new String[] {
- } );
- private static final TagInfo _td_test_isAllUpper_6_1 = new TagInfo("test:isAllUpper", //$NON-NLS-1$
- 6, 1,
- new String[] {
- "var", //$NON-NLS-1$
- },
- new String[] {
- "token", //$NON-NLS-1$
- } );
- private static final TagInfo _td_test_upper_8_1 = new TagInfo("test:upper", //$NON-NLS-1$
- 8, 1,
- new String[] {
- },
- new String[] {
- } );
- private static final TagInfo _td_test_nl_8_29 = new TagInfo("test:nl", //$NON-NLS-1$
- 8, 29,
- new String[] {
- },
- new String[] {
- } );
- private static final TagInfo _td_test_other_9_1 = new TagInfo("test:other", //$NON-NLS-1$
- 9, 1,
- new String[] {
- },
- new String[] {
- } );
-
- public void generate(final JET2Context context, final JET2Writer __out) {
- JET2Writer out = __out;
- out.write("\"isAllUpper\", \"nl\", \"other\", \"tokenize\", \"upper\""); //$NON-NLS-1$
- out.write(NL);
- out.write(NL);
- RuntimeTagElement _jettag_test_tokenize_4_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "tokenize", "test:tokenize", _td_test_tokenize_4_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_tokenize_4_1.setRuntimeParent(null);
- _jettag_test_tokenize_4_1.setTagInfo(_td_test_tokenize_4_1);
- _jettag_test_tokenize_4_1.doStart(context, out);
- while (_jettag_test_tokenize_4_1.okToProcessBody()) {
- RuntimeTagElement _jettag_test_other_5_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "other", "test:other", _td_test_other_5_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_other_5_1.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_other_5_1.setTagInfo(_td_test_other_5_1);
- _jettag_test_other_5_1.doStart(context, out);
- while (_jettag_test_other_5_1.okToProcessBody()) {
- out.write("some text"); //$NON-NLS-1$
- _jettag_test_other_5_1.handleBodyContent(out);
- }
- _jettag_test_other_5_1.doEnd();
- out.write(NL);
- RuntimeTagElement _jettag_test_isAllUpper_6_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "isAllUpper", "test:isAllUpper", _td_test_isAllUpper_6_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_isAllUpper_6_1.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_isAllUpper_6_1.setTagInfo(_td_test_isAllUpper_6_1);
- _jettag_test_isAllUpper_6_1.doStart(context, out);
- while (_jettag_test_isAllUpper_6_1.okToProcessBody()) {
- _jettag_test_isAllUpper_6_1.handleBodyContent(out);
- }
- _jettag_test_isAllUpper_6_1.doEnd();
- RuntimeTagElement _jettag_test_upper_8_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "upper", "test:upper", _td_test_upper_8_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_upper_8_1.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_upper_8_1.setTagInfo(_td_test_upper_8_1);
- _jettag_test_upper_8_1.doStart(context, out);
- JET2Writer _jettag_test_upper_8_1_saved_out = out;
- while (_jettag_test_upper_8_1.okToProcessBody()) {
- out = out.newNestedContentWriter();
- out.write("foo"); //$NON-NLS-1$
- _jettag_test_upper_8_1.handleBodyContent(out);
- }
- out = _jettag_test_upper_8_1_saved_out;
- _jettag_test_upper_8_1.doEnd();
- RuntimeTagElement _jettag_test_nl_8_29 = context.getTagFactory().createRuntimeTag(_jetns_test, "nl", "test:nl", _td_test_nl_8_29); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_nl_8_29.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_nl_8_29.setTagInfo(_td_test_nl_8_29);
- _jettag_test_nl_8_29.doStart(context, out);
- _jettag_test_nl_8_29.doEnd();
- out.write(NL);
- RuntimeTagElement _jettag_test_other_9_1 = context.getTagFactory().createRuntimeTag(_jetns_test, "other", "test:other", _td_test_other_9_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_test_other_9_1.setRuntimeParent(_jettag_test_tokenize_4_1);
- _jettag_test_other_9_1.setTagInfo(_td_test_other_9_1);
- _jettag_test_other_9_1.doStart(context, out);
- _jettag_test_other_9_1.doEnd();
- _jettag_test_tokenize_4_1.handleBodyContent(out);
- }
- _jettag_test_tokenize_4_1.doEnd();
- }
-}
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input2.jet b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input2.jet
deleted file mode 100644
index 2bc9dfc..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.input2.jet
+++ /dev/null
@@ -1,10 +0,0 @@
-<%@taglib id="org.eclipse.jet.tests.TestLibrary" prefix="test" %>
-"isAllUpper", "nl", "other", "tokenize", "upper"
-
-<test:tokenize string="a,b,c,d,e,f,g" sep="," var="token">
-<test:other>some text</test:other>
-<test:isAllUpper var="token">
-</test:isAllUpper>
-<test:upper>foo</test:upper><test:nl/>
-<test:other/>
-</test:tokenize> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.loader.expected.java b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.loader.expected.java
deleted file mode 100644
index 7cb9a2a..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.loader.expected.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package org.eclipse.jet.compiled;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.jet.JET2TemplateLoader;
-import org.eclipse.jet.JET2TemplateLoaderExtension;
-import org.eclipse.jet.JET2Template;
-
-public class TemplateLoaderClass implements JET2TemplateLoader, JET2TemplateLoaderExtension {
-
- private static final class TemplateFactoryMethod {
-
- private final String templatePath;
- private final String templateClass;
-
- public TemplateFactoryMethod(String templatePath, String templateClass) {
- this.templatePath = templatePath;
- this.templateClass = templateClass;
-
- }
-
- public String getTemplateClass() {
- return this.templateClass;
- }
-
- public String getTemplatePath() {
- return this.templatePath;
- }
-
- public JET2Template newTemplate() {
- JET2Template template = null;
- try {
- template = (JET2Template) Class.forName(this.templateClass).newInstance();
- } catch (InstantiationException e) {
- // ignore
- } catch (IllegalAccessException e) {
- // ignore
- } catch (ClassNotFoundException e) {
- // ignore
- }
- return template;
- }
-
-
- }
-
- private Map pathToFactoryMap = null;
-
- private JET2TemplateLoader delegate = null;
-
- public TemplateLoaderClass() {
- super();
- }
-
- public JET2Template getTemplate(String templatePath) {
- if(this.pathToFactoryMap == null) {
- initPathToFactoryMap();
- }
- TemplateFactoryMethod factory = (TemplateFactoryMethod)this.pathToFactoryMap.get(templatePath);
- return factory == null ? this.delegate == null ? null : this.delegate.getTemplate(templatePath) : factory.newTemplate();
- }
-
- private void addTemplate(String templatePath, String templateClass) {
- this.pathToFactoryMap.put(templatePath,
- new TemplateFactoryMethod(templatePath, templateClass));
- }
-
- private void initPathToFactoryMap() {
- this.pathToFactoryMap = new HashMap(2);
- addTemplate("simple.v2.input.jet", "org.eclipse.jet.compiled._jet_simplev2input" ); //$NON-NLS-1$ //$NON-NLS-2$
- addTemplate("simple.v2.input2.jet", "org.eclipse.jet.compiled._jet_simplev2input2" ); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void setDelegateLoader(JET2TemplateLoader loader) {
- this.delegate = loader;
- }
-
- public JET2TemplateLoader getDelegateLoader() {
- return this.delegate;
- }
-}
-
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat
deleted file mode 100644
index 23c0af8..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat
+++ /dev/null
@@ -1 +0,0 @@
-simple.v2.pat
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat2 b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat2
deleted file mode 100644
index 0ff28f8..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat2
+++ /dev/null
@@ -1 +0,0 @@
-simple.v2.pat2
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat3 b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat3
deleted file mode 100644
index 8ecde48..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat3
+++ /dev/null
@@ -1 +0,0 @@
-simple.v2.pat3
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat4 b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat4
deleted file mode 100644
index 768f2a8..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.pat4
+++ /dev/null
@@ -1 +0,0 @@
-simple.v2.pat4
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet
deleted file mode 100644
index e77b527..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet
+++ /dev/null
@@ -1,3 +0,0 @@
-This template uses a predefined tag library:
-
-<c:get select="$useMe/@attr"/>
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet.nopredefs.expected.java b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet.nopredefs.expected.java
deleted file mode 100644
index 4757149..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet.nopredefs.expected.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.eclipse.jet.compiled;
-
-import org.eclipse.jet.JET2Context;
-import org.eclipse.jet.JET2Template;
-import org.eclipse.jet.JET2Writer;
-
-public class _jet_simplev2usePredefTagLibs implements JET2Template {
-
- public _jet_simplev2usePredefTagLibs() {
- super();
- }
-
- private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
-
- public void generate(final JET2Context context, final JET2Writer __out) {
- JET2Writer out = __out;
- out.write("This template uses a predefined tag library:"); //$NON-NLS-1$
- out.write(NL);
- out.write(NL);
- out.write("<c:get select=\"$useMe/@attr\"/>"); //$NON-NLS-1$
- out.write(NL);
- }
-}
diff --git a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet.predefs.expected.java b/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet.predefs.expected.java
deleted file mode 100644
index bb5ad30..0000000
--- a/tests/org.eclipse.jet.tests/data/simplifiedCompiler/templates/simple.v2.usePredefTagLibs.jet.predefs.expected.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.eclipse.jet.compiled;
-
-import org.eclipse.jet.JET2Context;
-import org.eclipse.jet.JET2Template;
-import org.eclipse.jet.JET2Writer;
-import org.eclipse.jet.taglib.RuntimeTagElement;
-import org.eclipse.jet.taglib.TagInfo;
-
-public class _jet_simplev2usePredefTagLibs implements JET2Template {
- private static final String _jetns_c = "org.eclipse.jet.controlTags"; //$NON-NLS-1$
-
- public _jet_simplev2usePredefTagLibs() {
- super();
- }
-
- private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
-
- private static final TagInfo _td_c_get_3_1 = new TagInfo("c:get", //$NON-NLS-1$
- 3, 1,
- new String[] {
- "select", //$NON-NLS-1$
- },
- new String[] {
- "$useMe/@attr", //$NON-NLS-1$
- } );
-
- public void generate(final JET2Context context, final JET2Writer __out) {
- JET2Writer out = __out;
- out.write("This template uses a predefined tag library:"); //$NON-NLS-1$
- out.write(NL);
- out.write(NL);
- RuntimeTagElement _jettag_c_get_3_1 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_3_1); //$NON-NLS-1$ //$NON-NLS-2$
- _jettag_c_get_3_1.setRuntimeParent(null);
- _jettag_c_get_3_1.setTagInfo(_td_c_get_3_1);
- _jettag_c_get_3_1.doStart(context, out);
- _jettag_c_get_3_1.doEnd();
- out.write(NL);
- }
-}

Back to the top