summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorahaase2008-01-28 10:53:54 (EST)
committerahaase2008-01-28 10:53:54 (EST)
commit2334ff6e506bdd02b970dc888d5b66943219de97 (patch)
tree8dfbb64b2aa644f1837ef11e07afb8e5f52eae5b
parent3ec540ff60d95bb981a2d5cecd44869aa7be2477 (diff)
downloadorg.eclipse.xpand-2334ff6e506bdd02b970dc888d5b66943219de97.zip
org.eclipse.xpand-2334ff6e506bdd02b970dc888d5b66943219de97.tar.gz
org.eclipse.xpand-2334ff6e506bdd02b970dc888d5b66943219de97.tar.bz2
added support for postprocessor hooks during the write process of files
-rw-r--r--plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/XpandBackendFacade.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/XpandBackendFacade.java b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/XpandBackendFacade.java
index d9f66fa..a51c93c 100644
--- a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/XpandBackendFacade.java
+++ b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/XpandBackendFacade.java
@@ -11,6 +11,8 @@ Contributors:
package org.eclipse.xtend.middleend.old;
import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.Arrays;
@@ -41,7 +43,9 @@ import org.eclipse.xtend.backend.functions.FunctionDefContextImpl;
import org.eclipse.xtend.backend.functions.SourceDefinedFunction;
import org.eclipse.xtend.backend.syslib.FileIoOperations;
import org.eclipse.xtend.backend.syslib.FileOutlet;
+import org.eclipse.xtend.backend.syslib.InMemoryPostprocessor;
import org.eclipse.xtend.backend.syslib.SysLibNames;
+import org.eclipse.xtend.backend.syslib.UriBasedPostprocessor;
import org.eclipse.xtend.backend.types.CompositeTypesystem;
import org.eclipse.xtend.backend.types.emf.EmfTypesystem;
import org.eclipse.xtend.expression.Variable;
@@ -136,6 +140,8 @@ public final class XpandBackendFacade {
if (oldOutlet.getFileEncoding() != null)
newOutlet.setFileEncoding (oldOutlet.getFileEncoding());
newOutlet.setOverwrite (oldOutlet.isOverwrite());
+
+ // TODO register old postprocessors via adapters
final String outletName = (oldOutlet.getName() != null) ? oldOutlet.getName() : FileIoOperations.DEFAULT_OUTLET_NAME;
ctx.getFunctionDefContext ().invoke (ctx, SysLibNames.REGISTER_OUTLET, Arrays.asList (outletName, newOutlet));