Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2008-04-01 15:37:13 -0400
committerpelder2008-04-01 15:37:13 -0400
commit5dbc639b904884dd88c04b724ce6471f69651e15 (patch)
tree457272fa4fffdbcac5621af1637802a7463ab6fd
parentfbd1e17b2b776b5b01f082b9c6d891f72d67f453 (diff)
downloadorg.eclipse.jet-5dbc639b904884dd88c04b724ce6471f69651e15.tar.gz
org.eclipse.jet-5dbc639b904884dd88c04b724ce6471f69651e15.tar.xz
org.eclipse.jet-5dbc639b904884dd88c04b724ce6471f69651e15.zip
[218579] Impossible to invoke a transform in the same JET2Writer
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/transform/TransformContextExtender.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/transform/TransformContextExtender.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/transform/TransformContextExtender.java
index 72e1602..8348cf8 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/transform/TransformContextExtender.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/transform/TransformContextExtender.java
@@ -417,8 +417,24 @@ public final class TransformContextExtender
}
}
+ /**
+ * Invoke another JET transformation
+ * @param id the JET transformation ID
+ * @throws JET2TagException if an execution error occurs
+ */
public void runSubTransform(String id) throws JET2TagException
{
+ runSubTransform(id, new BodyContentWriter());
+ }
+
+ /**
+ * Invoke another JET transformation, recording the main template results in the specified writer
+ * @param id the JET transformation ID
+ * @param writer a template writer
+ * @throws JET2TagException if an execution error occurs
+ */
+ public void runSubTransform(String id, final BodyContentWriter writer) throws JET2TagException
+ {
final IJETBundleManager bundleManager = JET2Platform.getJETBundleManager();
final IJETBundleDescriptor savedDescriptor = contextData.descriptor;
final JET2TemplateLoader savedLoader = contextData.loader;
@@ -437,7 +453,7 @@ public final class TransformContextExtender
setOverride(descriptor.getOverridesId(), new NullProgressMonitor());
}
- execute(descriptor.getMainTemplate(), new BodyContentWriter());
+ execute(descriptor.getMainTemplate(), writer);
}
catch (BundleException e)

Back to the top