summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorahaase2008-01-22 10:19:26 (EST)
committer ahaase2008-01-22 10:19:26 (EST)
commit6eb065042e3e6d1db2569c9299c8ed6c8090c4c6 (patch)
tree7c04034dbf695bfe8469c5830c064bd6521982b7
parent926823f27920e20a5dcc41a04f1210f669411df0 (diff)
downloadorg.eclipse.xpand-6eb065042e3e6d1db2569c9299c8ed6c8090c4c6.zip
org.eclipse.xpand-6eb065042e3e6d1db2569c9299c8ed6c8090c4c6.tar.gz
org.eclipse.xpand-6eb065042e3e6d1db2569c9299c8ed6c8090c4c6.tar.bz2
results of progressing initial development in a bulk while waiting for committer status.
added copyright comments.
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/Output.java1
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/OutputImpl.java4
-rw-r--r--plugins/org.eclipse.xtend.backend/.classpath2
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/BackendFacade.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/CreationCacheImpl.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/ExecutionContextImpl.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/FunctionInvokerImpl.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/GlobalVarContextImpl.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/BackendType.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/BackendTypesystem.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Constants.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ContributionStateContext.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/CreationCache.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/EfficientLazyString.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExecutionContext.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExecutionException.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExecutionListener.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExpressionBase.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Function.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/FunctionDefContext.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/FunctionInvoker.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/GlobalVarContext.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Helpers.java39
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/LocalVarContext.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/NamedFunction.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Property.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/SourcePos.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/StaticProperty.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/AndExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/ConcatExpression.java45
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CreateCachedExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CreateUncachedExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CurriedFunction.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CurryingExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/GlobalVarExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/HidingLocalVarDefExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/IfExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InitClosureExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnCollectionExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnObjectExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnWhateverExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/ListLiteralExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/LiteralExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/LocalVarEvalExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/NewLocalVarDefExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/OrExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/PropertyOnCollectionExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/PropertyOnObjectExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/PropertyOnWhateverExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/SequenceExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/SetPropertyExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/SwitchExpression.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/Closure.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/DuplicateAwareFunctionCollection.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/DuplicateAwareNamedFunctionCollection.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/FunctionDefContextImpl.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/PolymorphicResolver.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/SourceDefinedFunction.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/TypesComparator.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/iface/BackendContributor.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/AbstractType.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/CompositeTypesystem.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BooleanType.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BuiltInOperation.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BuiltinProperty.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/CollectionType.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/DoubleType.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/FunctionType.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/ListType.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/LongType.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/ObjectType.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/PropertyType.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/SetType.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StaticPropertyType.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StringType.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/TypeType.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/VoidType.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Cache.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/CollectionHelper.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/DoubleKeyCache.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/ErrorHandler.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/FatalException.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/NullWriter.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Pair.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/ReflectionHelper.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/ResourceToList.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/StringHelper.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/SyntaxConstants.java12
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/TripleKeyCache.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Triplet.java10
-rw-r--r--plugins/org.eclipse.xtend.middleend.old/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/JavaExtensionFunction.java10
-rw-r--r--plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldDefinitionConverter.java37
-rw-r--r--plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldExpressionConverter.java10
-rw-r--r--plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldExtensionConverter.java10
-rw-r--r--plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldXpandRegistry.java116
-rw-r--r--plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldXtendHelper.java14
-rw-r--r--plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldXtendRegistry.java12
-rw-r--r--plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/TypeToBackendType.java10
-rw-r--r--plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/XpandBackendContributor.java75
-rw-r--r--plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/XtendBackendContributor.java10
-rw-r--r--plugins/org.eclipse.xtend.middleend/src/org/eclipose/xtend/middleend/BackendTypesystemFactory.java57
-rw-r--r--plugins/org.eclipse.xtend.middleend/src/org/eclipose/xtend/middleend/FunctionDefContextFactory.java10
-rw-r--r--tests/org.eclipse.xtend.middleend.old.test/META-INF/MANIFEST.MF3
-rw-r--r--tests/org.eclipse.xtend.middleend.old.test/src/org/eclipse/xtend/middleend/old/first/FirstAttempt.java47
-rw-r--r--tests/org.eclipse.xtend.middleend.old.test/src/org/eclipse/xtend/middleend/old/first/aTemplate.xpt11
106 files changed, 1332 insertions, 46 deletions
diff --git a/plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/Output.java b/plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/Output.java
index 1dac2cb..83f633a 100644
--- a/plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/Output.java
+++ b/plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/Output.java
@@ -30,4 +30,5 @@ public interface Output {
public void addOutlet(Outlet outlet);
+ public Outlet getOutlet (String name);
}
diff --git a/plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/OutputImpl.java b/plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/OutputImpl.java
index ff79825..825b28e 100644
--- a/plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/OutputImpl.java
+++ b/plugins/org.eclipse.xpand/src/org/eclipse/xpand2/output/OutputImpl.java
@@ -49,6 +49,10 @@ public class OutputImpl implements Output {
outlets.put(outlet.getName(), outlet);
}
+ public Outlet getOutlet (String name) {
+ return outlets.get (name);
+ }
+
protected FileHandle current() {
return (fileHandles.isEmpty() ? null : fileHandles.peek());
}
diff --git a/plugins/org.eclipse.xtend.backend/.classpath b/plugins/org.eclipse.xtend.backend/.classpath
index 751c8f2..731aa0f 100644
--- a/plugins/org.eclipse.xtend.backend/.classpath
+++ b/plugins/org.eclipse.xtend.backend/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
+ <classpathentry excluding="org/eclipse/xtend/backend/StaticPackageDependenciesAspect.aj" kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/BackendFacade.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/BackendFacade.java
index c67a41c..034c697 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/BackendFacade.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/BackendFacade.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+*/
package org.eclipse.xtend.backend;
import java.util.List;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/CreationCacheImpl.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/CreationCacheImpl.java
index f6cf78f..982d08d 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/CreationCacheImpl.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/CreationCacheImpl.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend;
import java.util.List;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/ExecutionContextImpl.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/ExecutionContextImpl.java
index b19a4c6..cfd0751 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/ExecutionContextImpl.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/ExecutionContextImpl.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend;
import org.apache.commons.logging.LogFactory;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/FunctionInvokerImpl.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/FunctionInvokerImpl.java
index a158737..0a07a21 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/FunctionInvokerImpl.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/FunctionInvokerImpl.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend;
import java.util.List;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/GlobalVarContextImpl.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/GlobalVarContextImpl.java
index 5012a52..bc82aaf 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/GlobalVarContextImpl.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/GlobalVarContextImpl.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend;
import java.util.HashMap;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/BackendType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/BackendType.java
index d5166df..5074ed9 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/BackendType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/BackendType.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
import java.util.Collection;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/BackendTypesystem.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/BackendTypesystem.java
index ef3ec5d..809c406 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/BackendTypesystem.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/BackendTypesystem.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Constants.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Constants.java
index 2a55090..5275f07 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Constants.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Constants.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
import org.eclipse.xtend.backend.BackendFacade;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ContributionStateContext.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ContributionStateContext.java
index df8d149..f9eace8 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ContributionStateContext.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ContributionStateContext.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
import java.util.HashMap;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/CreationCache.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/CreationCache.java
index 0e73c6e..8277d63 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/CreationCache.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/CreationCache.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
import java.util.List;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/EfficientLazyString.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/EfficientLazyString.java
index 21fee63..23fbcfc 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/EfficientLazyString.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/EfficientLazyString.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
import java.io.IOException;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExecutionContext.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExecutionContext.java
index 1df132b..6cd3ef8 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExecutionContext.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExecutionContext.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExecutionException.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExecutionException.java
index 55a7f32..2a07738 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExecutionException.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExecutionException.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExecutionListener.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExecutionListener.java
index 1bcf8f0..69ff1dd 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExecutionListener.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExecutionListener.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExpressionBase.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExpressionBase.java
index 405f8c9..779cd2c 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExpressionBase.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/ExpressionBase.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Function.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Function.java
index bdb2baa..676cd8a 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Function.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Function.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
import java.util.List;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/FunctionDefContext.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/FunctionDefContext.java
index 82e1829..f125d11 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/FunctionDefContext.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/FunctionDefContext.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
import java.util.Collection;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/FunctionInvoker.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/FunctionInvoker.java
index 7d7e373..3086125 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/FunctionInvoker.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/FunctionInvoker.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
import java.util.List;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/GlobalVarContext.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/GlobalVarContext.java
index 86c01d1..7880792 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/GlobalVarContext.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/GlobalVarContext.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
import java.util.Map;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Helpers.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Helpers.java
new file mode 100644
index 0000000..50b92a8
--- /dev/null
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Helpers.java
@@ -0,0 +1,39 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
+package org.eclipse.xtend.backend.common;
+
+import java.util.Collections;
+
+
+/**
+ *
+ * @author Arno Haase (http://www.haase-consulting.com)
+ */
+public class Helpers {
+ /**
+ * This method is public static so as to be available as a helper method for all code that needs to call "toString".
+ * It calls "toString" on an object, taking into account all potential overriding extensions.<br>
+ */
+ public static CharSequence overridableToString (ExecutionContext ctx, Object o) {
+ if (o == null)
+ return "";
+
+ if (o instanceof EfficientLazyString)
+ return (CharSequence) o;
+
+ final Object resultRaw = ctx.getFunctionDefContext().invoke (ctx, "toString", Collections.singletonList (o));
+ if (resultRaw instanceof CharSequence)
+ return (CharSequence) resultRaw;
+
+ return String.valueOf (resultRaw);
+ }
+
+}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/LocalVarContext.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/LocalVarContext.java
index 9aa27f2..f6931b0 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/LocalVarContext.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/LocalVarContext.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
import java.util.HashMap;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/NamedFunction.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/NamedFunction.java
index 55352f3..41076af 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/NamedFunction.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/NamedFunction.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Property.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Property.java
index f227396..98b2825 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Property.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/Property.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/SourcePos.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/SourcePos.java
index fe65e52..f34c457 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/SourcePos.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/SourcePos.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/StaticProperty.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/StaticProperty.java
index bf33463..bdccd9d 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/StaticProperty.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/StaticProperty.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.common;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/AndExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/AndExpression.java
index 5f017c1..289206a 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/AndExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/AndExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import org.eclipse.xtend.backend.common.ExecutionContext;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/ConcatExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/ConcatExpression.java
new file mode 100644
index 0000000..9b9dd8d
--- /dev/null
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/ConcatExpression.java
@@ -0,0 +1,45 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
+package org.eclipse.xtend.backend.expr;
+
+import java.util.List;
+
+import org.eclipse.xtend.backend.common.EfficientLazyString;
+import org.eclipse.xtend.backend.common.ExecutionContext;
+import org.eclipse.xtend.backend.common.ExpressionBase;
+import org.eclipse.xtend.backend.common.Helpers;
+import org.eclipse.xtend.backend.common.SourcePos;
+
+
+/**
+ *
+ * @author Arno Haase (http://www.haase-consulting.com)
+ */
+public final class ConcatExpression extends ExpressionBase {
+ private final List<? extends ExpressionBase> _parts;
+
+ public ConcatExpression (List<? extends ExpressionBase> parts, SourcePos sourcePos) {
+ super(sourcePos);
+
+ _parts = parts;
+ }
+
+ @Override
+ protected Object evaluateInternal (ExecutionContext ctx) {
+ final EfficientLazyString result = new EfficientLazyString ();
+
+ for (ExpressionBase expr: _parts)
+ result.append (Helpers.overridableToString (ctx, expr.evaluate(ctx)));
+
+ return result;
+ }
+
+}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CreateCachedExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CreateCachedExpression.java
index 6815586..df31f93 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CreateCachedExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CreateCachedExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CreateUncachedExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CreateUncachedExpression.java
index 70fad46..1d24137 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CreateUncachedExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CreateUncachedExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import org.eclipse.xtend.backend.common.BackendType;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CurriedFunction.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CurriedFunction.java
index 966cb93..cd1ec27 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CurriedFunction.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CurriedFunction.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CurryingExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CurryingExpression.java
index aa5ccba..4c17d5d 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CurryingExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/CurryingExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import java.util.List;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/GlobalVarExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/GlobalVarExpression.java
index 82ab063..2c8f945 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/GlobalVarExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/GlobalVarExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import org.eclipse.xtend.backend.common.ExecutionContext;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/HidingLocalVarDefExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/HidingLocalVarDefExpression.java
index cbfed30..508529a 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/HidingLocalVarDefExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/HidingLocalVarDefExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import org.eclipse.xtend.backend.common.ExecutionContext;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/IfExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/IfExpression.java
index d0a7af8..2dc710f 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/IfExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/IfExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import org.eclipse.xtend.backend.common.ExecutionContext;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InitClosureExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InitClosureExpression.java
index 172bee8..0ae3b73 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InitClosureExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InitClosureExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import java.util.List;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnCollectionExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnCollectionExpression.java
index 7b9f346..03c549e 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnCollectionExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnCollectionExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnObjectExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnObjectExpression.java
index d8c0525..d4eb1de 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnObjectExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnObjectExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnWhateverExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnWhateverExpression.java
index 10be3fe..daa6a7f 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnWhateverExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnWhateverExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/ListLiteralExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/ListLiteralExpression.java
index 56cd2e5..c0ce0ef 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/ListLiteralExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/ListLiteralExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/LiteralExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/LiteralExpression.java
index 8c3003e..76d2f98 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/LiteralExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/LiteralExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import org.eclipse.xtend.backend.common.ExecutionContext;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/LocalVarEvalExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/LocalVarEvalExpression.java
index 464f2e3..a6c2589 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/LocalVarEvalExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/LocalVarEvalExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import org.eclipse.xtend.backend.common.ExecutionContext;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/NewLocalVarDefExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/NewLocalVarDefExpression.java
index e25073a..cae95c7 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/NewLocalVarDefExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/NewLocalVarDefExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import org.eclipse.xtend.backend.common.ExecutionContext;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/OrExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/OrExpression.java
index 1604d85..9cf8219 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/OrExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/OrExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import org.eclipse.xtend.backend.common.ExecutionContext;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/PropertyOnCollectionExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/PropertyOnCollectionExpression.java
index 3b84ce4..aaa0543 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/PropertyOnCollectionExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/PropertyOnCollectionExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/PropertyOnObjectExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/PropertyOnObjectExpression.java
index e53eebb..833e790 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/PropertyOnObjectExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/PropertyOnObjectExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import org.eclipse.xtend.backend.common.ExecutionContext;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/PropertyOnWhateverExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/PropertyOnWhateverExpression.java
index 2c2f061..a58030a 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/PropertyOnWhateverExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/PropertyOnWhateverExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/SequenceExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/SequenceExpression.java
index ded8d63..2b58151 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/SequenceExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/SequenceExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import java.util.List;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/SetPropertyExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/SetPropertyExpression.java
index c0fb33b..582ab91 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/SetPropertyExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/SetPropertyExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import org.eclipse.xtend.backend.common.BackendType;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/SwitchExpression.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/SwitchExpression.java
index 282f7ed..e71b8fe 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/SwitchExpression.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/SwitchExpression.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.expr;
import java.util.List;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/Closure.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/Closure.java
index b97cb83..be2f035 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/Closure.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/Closure.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.functions;
import java.util.List;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/DuplicateAwareFunctionCollection.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/DuplicateAwareFunctionCollection.java
index 90bdbcf..46bbdf5 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/DuplicateAwareFunctionCollection.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/DuplicateAwareFunctionCollection.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.functions;
import java.util.Collection;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/DuplicateAwareNamedFunctionCollection.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/DuplicateAwareNamedFunctionCollection.java
index 81e5004..7e287e7 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/DuplicateAwareNamedFunctionCollection.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/DuplicateAwareNamedFunctionCollection.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.functions;
import java.util.Collection;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/FunctionDefContextImpl.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/FunctionDefContextImpl.java
index c02ea77..887227e 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/FunctionDefContextImpl.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/FunctionDefContextImpl.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.functions;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/PolymorphicResolver.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/PolymorphicResolver.java
index e6dd6df..f1b78fe 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/PolymorphicResolver.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/PolymorphicResolver.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.functions;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/SourceDefinedFunction.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/SourceDefinedFunction.java
index db3451c..e17a07d 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/SourceDefinedFunction.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/SourceDefinedFunction.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.functions;
import java.util.List;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/TypesComparator.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/TypesComparator.java
index 99bc9ed..15c3595 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/TypesComparator.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/TypesComparator.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.functions;
import java.util.Comparator;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/iface/BackendContributor.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/iface/BackendContributor.java
index 1b96534..bbf1f47 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/iface/BackendContributor.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/iface/BackendContributor.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.iface;
import java.util.Collection;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/AbstractType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/AbstractType.java
index c2e9495..8e9a5ee 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/AbstractType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/AbstractType.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.types;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/CompositeTypesystem.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/CompositeTypesystem.java
index 2f9b776..ff3394a 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/CompositeTypesystem.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/CompositeTypesystem.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.types;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BooleanType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BooleanType.java
index 09d310a..43c3e56 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BooleanType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BooleanType.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.types.builtin;
import org.eclipse.xtend.backend.common.BackendType;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BuiltInOperation.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BuiltInOperation.java
index 46adcf7..0e1ae9e 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BuiltInOperation.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BuiltInOperation.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.types.builtin;
import java.util.Arrays;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BuiltinProperty.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BuiltinProperty.java
index b55a924..80693be 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BuiltinProperty.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BuiltinProperty.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.types.builtin;
import java.lang.reflect.Method;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/CollectionType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/CollectionType.java
index c944092..aaf0900 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/CollectionType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/CollectionType.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.types.builtin;
import java.util.Collection;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/DoubleType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/DoubleType.java
index 603114f..4754f7e 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/DoubleType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/DoubleType.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.types.builtin;
import org.eclipse.xtend.backend.common.BackendType;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/FunctionType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/FunctionType.java
index 7836d4e..fca4031 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/FunctionType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/FunctionType.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.types.builtin;
import java.util.Arrays;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/ListType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/ListType.java
index e3b8f10..9be1015 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/ListType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/ListType.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.types.builtin;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/LongType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/LongType.java
index 367d08b..edceee5 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/LongType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/LongType.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.types.builtin;
import org.eclipse.xtend.backend.common.BackendType;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/ObjectType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/ObjectType.java
index ebb8f77..7a57fd4 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/ObjectType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/ObjectType.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.types.builtin;
import org.eclipse.xtend.backend.common.BackendType;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/PropertyType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/PropertyType.java
index 2151ed6..b6258db 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/PropertyType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/PropertyType.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.types.builtin;
import org.eclipse.xtend.backend.common.BackendType;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/SetType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/SetType.java
index cfe7e23..71f65da 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/SetType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/SetType.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.types.builtin;
import java.util.HashSet;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StaticPropertyType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StaticPropertyType.java
index f224344..34c232a 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StaticPropertyType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StaticPropertyType.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.types.builtin;
import org.eclipse.xtend.backend.common.BackendType;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StringType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StringType.java
index 88128cb..82fc063 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StringType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StringType.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.types.builtin;
import org.eclipse.xtend.backend.common.BackendType;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/TypeType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/TypeType.java
index 2dccc2e..9ae75ea 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/TypeType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/TypeType.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.types.builtin;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/VoidType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/VoidType.java
index b0a486b..135ead4 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/VoidType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/VoidType.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.types.builtin;
import org.eclipse.xtend.backend.common.BackendType;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Cache.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Cache.java
index c0c9d92..e74129c 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Cache.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Cache.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.util;
import java.util.HashMap;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/CollectionHelper.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/CollectionHelper.java
index 8c8374b..8c3f51a 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/CollectionHelper.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/CollectionHelper.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.util;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/DoubleKeyCache.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/DoubleKeyCache.java
index cfd0234..0adb56c 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/DoubleKeyCache.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/DoubleKeyCache.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.util;
import java.util.HashMap;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/ErrorHandler.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/ErrorHandler.java
index 18dae51..a114763 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/ErrorHandler.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/ErrorHandler.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.util;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/FatalException.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/FatalException.java
index 49f9da8..ec3f2d8 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/FatalException.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/FatalException.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.util;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/NullWriter.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/NullWriter.java
index 0abcbb0..84f44bb 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/NullWriter.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/NullWriter.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.util;
import java.io.IOException;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Pair.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Pair.java
index a549014..7e8893c 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Pair.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Pair.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.util;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/ReflectionHelper.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/ReflectionHelper.java
index c63896f..e0c0b6c 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/ReflectionHelper.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/ReflectionHelper.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.util;
import java.lang.reflect.Method;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/ResourceToList.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/ResourceToList.java
index 0ae62e1..04b4da8 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/ResourceToList.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/ResourceToList.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.util;
import java.io.BufferedReader;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/StringHelper.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/StringHelper.java
index 2e5433d..5a46f9c 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/StringHelper.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/StringHelper.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.util;
import java.text.DateFormat;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/SyntaxConstants.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/SyntaxConstants.java
index e0142ac..134ec88 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/SyntaxConstants.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/SyntaxConstants.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.util;
@@ -10,7 +20,7 @@ public interface SyntaxConstants {
String THIS = "this";
// special function names
- String CONCAT = "concat";
+ String WRITE_TO_FILE = "writeToFile";
String FOREACH_WITHOUT_ITERATOR = "forEach";
String FOREACH_WITH_ITERATOR = "forEachWithIterator";
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/TripleKeyCache.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/TripleKeyCache.java
index f1999ca..408640c 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/TripleKeyCache.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/TripleKeyCache.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.util;
import java.util.HashMap;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Triplet.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Triplet.java
index e495c3c..eb563ce 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Triplet.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Triplet.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.backend.util;
diff --git a/plugins/org.eclipse.xtend.middleend.old/META-INF/MANIFEST.MF b/plugins/org.eclipse.xtend.middleend.old/META-INF/MANIFEST.MF
index 61ef8ab..f73250c 100644
--- a/plugins/org.eclipse.xtend.middleend.old/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.xtend.middleend.old/META-INF/MANIFEST.MF
@@ -10,5 +10,6 @@ Require-Bundle: org.eclipse.xtend.backend,
org.eclipse.xtend.backend.syslib,
org.eclipse.xtend,
org.eclipse.xpand,
- org.eclipse.xtend.typesystem.emf
+ org.eclipse.xtend.typesystem.emf,
+ org.eclipse.emf.mwe.core
Export-Package: org.eclipse.xtend.middleend.old
diff --git a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/JavaExtensionFunction.java b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/JavaExtensionFunction.java
index 5a8a4db..873a524 100644
--- a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/JavaExtensionFunction.java
+++ b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/JavaExtensionFunction.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.middleend.old;
import java.lang.reflect.Method;
diff --git a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldDefinitionConverter.java b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldDefinitionConverter.java
index de37f8f..4c1eec3 100644
--- a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldDefinitionConverter.java
+++ b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldDefinitionConverter.java
@@ -1,8 +1,17 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.middleend.old;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collections;
import java.util.HashSet;
import java.util.List;
@@ -22,12 +31,15 @@ import org.eclipse.internal.xpand2.type.IteratorType;
import org.eclipse.internal.xtend.expression.ast.DeclaredParameter;
import org.eclipse.internal.xtend.expression.ast.Expression;
import org.eclipse.internal.xtend.expression.ast.SyntaxElement;
+import org.eclipse.xpand2.XpandExecutionContext;
+import org.eclipse.xpand2.output.Outlet;
import org.eclipse.xtend.backend.common.BackendType;
import org.eclipse.xtend.backend.common.ExpressionBase;
import org.eclipse.xtend.backend.common.Function;
import org.eclipse.xtend.backend.common.FunctionDefContext;
import org.eclipse.xtend.backend.common.NamedFunction;
import org.eclipse.xtend.backend.common.SourcePos;
+import org.eclipse.xtend.backend.expr.ConcatExpression;
import org.eclipse.xtend.backend.expr.HidingLocalVarDefExpression;
import org.eclipse.xtend.backend.expr.IfExpression;
import org.eclipse.xtend.backend.expr.InitClosureExpression;
@@ -37,6 +49,7 @@ import org.eclipse.xtend.backend.expr.LocalVarEvalExpression;
import org.eclipse.xtend.backend.expr.NewLocalVarDefExpression;
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.XtendIterator;
import org.eclipse.xtend.backend.types.builtin.ObjectType;
import org.eclipse.xtend.backend.util.SyntaxConstants;
@@ -118,10 +131,7 @@ final class OldDefinitionConverter {
for (Statement stmt: statements)
parts.add(convertStatement (stmt));
- final SourcePos newPos = OldExpressionConverter.getSourcePos (oldPos, _definitionName);
- final ExpressionBase paramExpr = new LiteralExpression (parts, newPos);
-
- return new InvocationOnObjectExpression (SyntaxConstants.CONCAT, Collections.singletonList (paramExpr), newPos);
+ return new ConcatExpression (parts, getSourcePos(oldPos));
}
private ExpressionBase convertStatement (Statement stmt) {
@@ -293,7 +303,22 @@ final class OldDefinitionConverter {
}
private ExpressionBase convertFileStatement (FileStatement stmt) {
- throw new UnsupportedOperationException(); //TODO implement FileStatement
+ final ExpressionBase body = convertStatmentSequence (stmt.getBody(), stmt);
+ final ExpressionBase filename = convertExpression (stmt.getTargetFileName());
+
+ final Outlet outlet = ((XpandExecutionContext) _ctx).getOutput().getOutlet (stmt.getOutletName());
+ if (outlet == null) {
+ if (stmt.getOutletName() == null)
+ throw new IllegalStateException ("no default outlet was registered");
+ else
+ throw new IllegalStateException ("no outlet for name '" + stmt.getOutletName() + "' was registered");
+ }
+
+ final ExpressionBase outletName = new LiteralExpression ((stmt.getOutletName() != null) ? stmt.getOutletName() : FileIoOperations.DEFAULT_OUTLET_NAME, getSourcePos(stmt));
+ final ExpressionBase append = new LiteralExpression (outlet.isAppend(), getSourcePos(stmt));
+
+ //TODO register the outlets
+ return new InvocationOnObjectExpression (SyntaxConstants.WRITE_TO_FILE, Arrays.asList(outletName, filename, append, body), getSourcePos (stmt));
}
private ExpressionBase convertProtectStatement (ProtectStatement stmt) {
diff --git a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldExpressionConverter.java b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldExpressionConverter.java
index 6b6c5e3..3b33f2d 100644
--- a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldExpressionConverter.java
+++ b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldExpressionConverter.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.middleend.old;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldExtensionConverter.java b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldExtensionConverter.java
index a4a836f..2b0d0ed 100644
--- a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldExtensionConverter.java
+++ b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldExtensionConverter.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.middleend.old;
import java.lang.reflect.Method;
diff --git a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldXpandRegistry.java b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldXpandRegistry.java
new file mode 100644
index 0000000..de2def7
--- /dev/null
+++ b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldXpandRegistry.java
@@ -0,0 +1,116 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
+package org.eclipse.xtend.middleend.old;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipose.xtend.middleend.FunctionDefContextFactory;
+import org.eclipse.internal.xpand2.ast.Template;
+import org.eclipse.internal.xpand2.model.XpandDefinition;
+import org.eclipse.xpand2.XpandExecutionContext;
+import org.eclipse.xpand2.XpandUtil;
+import org.eclipse.xtend.backend.common.NamedFunction;
+import org.eclipse.xtend.backend.functions.FunctionDefContextImpl;
+import org.eclipse.xtend.backend.types.CompositeTypesystem;
+import org.eclipse.xtend.backend.util.Cache;
+
+
+/**
+ * This class manages the interdependent graph of parsed and converted Xpand files, allowing access to them by "compilation unit".
+ *
+ * @author Arno Haase (http://www.haase-consulting.com)
+ */
+final class OldXpandRegistry {
+ private final XpandExecutionContext _ctx;
+ private final CompositeTypesystem _ts;
+ private final OldXtendRegistry _extensions;
+
+ private final Cache<String, FunctionDefContextImpl> _functionDefContexts = new Cache<String, FunctionDefContextImpl> () {
+ @Override
+ protected FunctionDefContextImpl create (String compilationUnit) {
+ return new FunctionDefContextFactory (_ts).create();
+ }
+ };
+
+ /**
+ * all functions actually defined in a given compilation unit
+ */
+ private final Map<String, List<NamedFunction>> _functionsByResource = new HashMap <String, List<NamedFunction>>();
+
+
+ public OldXpandRegistry (XpandExecutionContext ctx, CompositeTypesystem ts, OldXtendRegistry extensions) {
+ _ctx = ctx;
+ _ts = ts;
+ _extensions = extensions;
+ }
+
+
+ private FunctionDefContextImpl getFunctionDefContext (String xtendName) {
+ return _functionDefContexts.get (OldXtendHelper.normalizeXtendResourceName (xtendName));
+ }
+
+
+ /**
+ * parses and converts an Xpand file and all other files it depends on.
+ */
+ public void registerXpandFile (String xpandFile) {
+ xpandFile = OldXtendHelper.normalizeXpandResourceName (xpandFile);
+
+ if (_functionsByResource.containsKey (xpandFile))
+ return;
+
+ final Template file = (Template) _ctx.getResourceManager().loadResource (xpandFile, XpandUtil.TEMPLATE_EXTENSION);
+ if (file == null)
+ throw new IllegalArgumentException ("could not find extension '" + xpandFile + "'");
+
+ final XpandExecutionContext ctx = (XpandExecutionContext) _ctx.cloneWithResource (file);
+
+ final TypeToBackendType typeConverter = new TypeToBackendType (_ts, ctx);
+ final OldDefinitionConverter definitionFactory = new OldDefinitionConverter (ctx, typeConverter);
+
+ final List<NamedFunction> defined = new ArrayList<NamedFunction>();
+ final FunctionDefContextImpl fdc = getFunctionDefContext (xpandFile);
+
+ //TODO imported namespaces
+ //TODO referenced other template files
+
+ for (XpandDefinition ext: file.getDefinitions ())
+ defined.add (definitionFactory.create (ext, fdc));
+
+
+ _functionsByResource.put (xpandFile, defined);
+
+ // make sure all imported resources are registered as well
+ for (String imported: file.getImportedExtensions())
+ _extensions.registerExtension (imported);
+
+ // make all imported extensions visible for the scope of this compilation unit
+ for (String imported: file.getImportedExtensions()) {
+ for (NamedFunction f: _extensions.getContributedFunctions(imported))
+ fdc.register (f);
+ }
+ }
+
+ public Collection<NamedFunction> getContributedFunctions (String xpandFile) {
+ return _functionsByResource.get (OldXtendHelper.normalizeXpandResourceName (xpandFile));
+ }
+}
+
+
+
+
+
+
+
diff --git a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldXtendHelper.java b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldXtendHelper.java
index 413b7b4..b8cfb3c 100644
--- a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldXtendHelper.java
+++ b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldXtendHelper.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.middleend.old;
import org.eclipse.internal.xtend.expression.parser.SyntaxConstants;
@@ -16,4 +26,8 @@ final class OldXtendHelper {
return xtendName;
}
+
+ public static String normalizeXpandResourceName (String xpandName) {
+ return xpandName;
+ }
}
diff --git a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldXtendRegistry.java b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldXtendRegistry.java
index 371733e..93b21b4 100644
--- a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldXtendRegistry.java
+++ b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldXtendRegistry.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.middleend.old;
import java.util.ArrayList;
@@ -147,7 +157,7 @@ final class OldXtendRegistry {
}
public Collection<NamedFunction> getContributedFunctions (String xtendFile) {
- return _exportedFunctionsByResource.get (xtendFile);
+ return _exportedFunctionsByResource.get (OldXtendHelper.normalizeXtendResourceName(xtendFile));
}
}
diff --git a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/TypeToBackendType.java b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/TypeToBackendType.java
index 8161fa8..ed37d3f 100644
--- a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/TypeToBackendType.java
+++ b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/TypeToBackendType.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.middleend.old;
import java.lang.reflect.Field;
diff --git a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/XpandBackendContributor.java b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/XpandBackendContributor.java
new file mode 100644
index 0000000..c4bd41f
--- /dev/null
+++ b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/XpandBackendContributor.java
@@ -0,0 +1,75 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
+package org.eclipse.xtend.middleend.old;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipose.xtend.middleend.FunctionDefContextFactory;
+import org.eclipse.xpand2.XpandExecutionContextImpl;
+import org.eclipse.xpand2.output.Outlet;
+import org.eclipse.xpand2.output.Output;
+import org.eclipse.xpand2.output.OutputImpl;
+import org.eclipse.xtend.backend.common.BackendType;
+import org.eclipse.xtend.backend.common.BackendTypesystem;
+import org.eclipse.xtend.backend.common.FunctionDefContext;
+import org.eclipse.xtend.backend.common.NamedFunction;
+import org.eclipse.xtend.backend.functions.SourceDefinedFunction;
+import org.eclipse.xtend.backend.iface.BackendContributor;
+import org.eclipse.xtend.backend.types.CompositeTypesystem;
+import org.eclipse.xtend.typesystem.MetaModel;
+
+
+/**
+ *
+ * @author Arno Haase (http://www.haase-consulting.com)
+ */
+public final class XpandBackendContributor implements BackendContributor {
+ private final OldXtendRegistry _extensions;
+ private final OldXpandRegistry _registry;
+ private final String _xpandFile;
+ private final BackendTypesystem _ts;
+
+ public XpandBackendContributor (String xpandFile, Collection<MetaModel> mms, CompositeTypesystem ts, Collection <Outlet> outlets) {
+ _xpandFile = OldXtendHelper.normalizeXpandResourceName (xpandFile);
+ _ts = ts;
+
+ final Output output = new OutputImpl ();
+ for (Outlet outlet: outlets)
+ output.addOutlet (outlet);
+ //TODO ProtectedRegionResolver
+ final XpandExecutionContextImpl ctx = new XpandExecutionContextImpl (output, null);
+ for (MetaModel mm: mms)
+ ctx.registerMetaModel (mm);
+ ctx.setFileEncoding("iso-8859-1"); //TODO really set the encoding
+
+ _extensions = new OldXtendRegistry (ctx, ts);
+ _registry = new OldXpandRegistry (ctx, ts, _extensions);
+ _registry.registerXpandFile (xpandFile);
+ }
+
+ public BackendType convertToType (List<String> segments) {
+ return null;
+ }
+
+ public Collection<NamedFunction> getContributedFunctions () {
+ return _registry.getContributedFunctions (_xpandFile);
+ }
+
+ public FunctionDefContext getFunctionDefContext () {
+ if (getContributedFunctions().isEmpty())
+ return new FunctionDefContextFactory(_ts).create();
+
+ return ((SourceDefinedFunction) getContributedFunctions().iterator().next().getFunction()).getFunctionDefContext();
+ }
+}
+
+
diff --git a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/XtendBackendContributor.java b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/XtendBackendContributor.java
index a6ba34b..2048a5c 100644
--- a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/XtendBackendContributor.java
+++ b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/XtendBackendContributor.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.middleend.old;
import java.util.Collection;
diff --git a/plugins/org.eclipse.xtend.middleend/src/org/eclipose/xtend/middleend/BackendTypesystemFactory.java b/plugins/org.eclipse.xtend.middleend/src/org/eclipose/xtend/middleend/BackendTypesystemFactory.java
index d7602ec..b1f2128 100644
--- a/plugins/org.eclipse.xtend.middleend/src/org/eclipose/xtend/middleend/BackendTypesystemFactory.java
+++ b/plugins/org.eclipse.xtend.middleend/src/org/eclipose/xtend/middleend/BackendTypesystemFactory.java
@@ -1,13 +1,21 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipose.xtend.middleend;
-import java.io.InputStream;
+import java.util.List;
import org.eclipse.xtend.backend.common.BackendTypesystem;
import org.eclipse.xtend.backend.types.CompositeTypesystem;
import org.eclipse.xtend.backend.types.emf.EmfTypesystem;
import org.eclipse.xtend.backend.types.java.GlobalJavaBeansTypesystem;
-import org.eclipse.xtend.backend.util.ErrorHandler;
-import org.eclipse.xtend.backend.util.ResourceToList;
/**
@@ -15,28 +23,33 @@ import org.eclipse.xtend.backend.util.ResourceToList;
* @author Arno Haase (http://www.haase-consulting.com)
*/
public final class BackendTypesystemFactory {
- public static final String BACKEND_TYPESYSTEM_RESOURCE = "/xtend.backend.typesystems";
- public CompositeTypesystem create () {
+ /**
+ * This generic factory requires the caller to provide a complete list of typesystems that
+ * will comprise the actual typesystem. The ordering in this list is semantically
+ * relevant because types are searched from beginning to end.
+ */
+ public static CompositeTypesystem create (List<? extends BackendTypesystem> typesystems) {
final CompositeTypesystem result = new CompositeTypesystem ();
-
- final InputStream in = getClass().getResourceAsStream (BACKEND_TYPESYSTEM_RESOURCE);
- if (in == null) {
- result.register (new EmfTypesystem ());
- result.register (new GlobalJavaBeansTypesystem ());
- }
- else {
- for (String s: new ResourceToList (in).getResult()) {
- try {
- final Class<?> cls = Class.forName (s);
- final Object o = cls.newInstance();
- result.register ((BackendTypesystem) o);
- } catch (Exception e) {
- ErrorHandler.handle(e);
- }
- }
- }
+ for (BackendTypesystem ts: typesystems)
+ result.register(ts);
+
+ return result;
+ }
+
+ /**
+ * This is a convenience factory method to create a typesystem that supports both EMF
+ * and Java Beans. UML is left out for performance reasons - the UML metamodel requires
+ * the UML metamodel to be parsed initially which takes significant time.
+ */
+ public static CompositeTypesystem createWithoutUml () {
+ final CompositeTypesystem result = new CompositeTypesystem ();
+
+ result.register (new EmfTypesystem ());
+ result.register (new GlobalJavaBeansTypesystem ());
+
return result;
}
}
+
diff --git a/plugins/org.eclipse.xtend.middleend/src/org/eclipose/xtend/middleend/FunctionDefContextFactory.java b/plugins/org.eclipse.xtend.middleend/src/org/eclipose/xtend/middleend/FunctionDefContextFactory.java
index 2cff521..d2e5f5d 100644
--- a/plugins/org.eclipse.xtend.middleend/src/org/eclipose/xtend/middleend/FunctionDefContextFactory.java
+++ b/plugins/org.eclipse.xtend.middleend/src/org/eclipose/xtend/middleend/FunctionDefContextFactory.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipose.xtend.middleend;
import org.eclipse.xtend.backend.common.BackendTypesystem;
diff --git a/tests/org.eclipse.xtend.middleend.old.test/META-INF/MANIFEST.MF b/tests/org.eclipse.xtend.middleend.old.test/META-INF/MANIFEST.MF
index 4ece6b5..453102d 100644
--- a/tests/org.eclipse.xtend.middleend.old.test/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.xtend.middleend.old.test/META-INF/MANIFEST.MF
@@ -6,4 +6,5 @@ Bundle-Version: 1.0.0
Require-Bundle: org.eclipse.xtend.backend,
org.eclipse.xtend.middleend.old,
org.eclipse.xtend.middleend,
- org.eclipse.xtend
+ org.eclipse.xtend,
+ org.eclipse.xpand
diff --git a/tests/org.eclipse.xtend.middleend.old.test/src/org/eclipse/xtend/middleend/old/first/FirstAttempt.java b/tests/org.eclipse.xtend.middleend.old.test/src/org/eclipse/xtend/middleend/old/first/FirstAttempt.java
index b7bff04..ff1c49f 100644
--- a/tests/org.eclipse.xtend.middleend.old.test/src/org/eclipse/xtend/middleend/old/first/FirstAttempt.java
+++ b/tests/org.eclipse.xtend.middleend.old.test/src/org/eclipse/xtend/middleend/old/first/FirstAttempt.java
@@ -1,3 +1,13 @@
+/*
+Copyright (c) 2008 Arno Haase.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Arno Haase - initial API and implementation
+ */
package org.eclipse.xtend.middleend.old.first;
import java.util.ArrayList;
@@ -6,9 +16,11 @@ import java.util.List;
import org.eclipose.xtend.middleend.BackendTypesystemFactory;
import org.eclipse.internal.xtend.type.impl.java.JavaBeansMetaModel;
+import org.eclipse.xpand2.output.Outlet;
import org.eclipse.xtend.backend.BackendFacade;
import org.eclipse.xtend.backend.common.ExecutionContext;
import org.eclipse.xtend.backend.types.CompositeTypesystem;
+import org.eclipse.xtend.middleend.old.XpandBackendContributor;
import org.eclipse.xtend.middleend.old.XtendBackendContributor;
import org.eclipse.xtend.typesystem.MetaModel;
@@ -18,19 +30,28 @@ public class FirstAttempt {
final List<MetaModel> mms = new ArrayList<MetaModel> ();
mms.add (new JavaBeansMetaModel ());
- final CompositeTypesystem ts = new BackendTypesystemFactory().create();
-
- final XtendBackendContributor bc = new XtendBackendContributor ("org::eclipse::xtend::middleend::old::first::first", mms, ts);
-
- final ExecutionContext ctx = BackendFacade.createExecutionContext (bc.getFunctionDefContext(), ts);
- System.err.println (BackendFacade.invoke (ctx, "test", Arrays.asList ("Arno")));
- System.err.println (BackendFacade.invoke (ctx, "testColl", Arrays.asList (Arrays.asList (1L, "Hallo"))));
- System.err.println (BackendFacade.invoke (ctx, "reexp", Arrays.asList (2L)));
-
- final Person p = new Person ();
- p.setFirstName ("Testa");
- p.setName ("Testarossa");
+ final CompositeTypesystem ts = BackendTypesystemFactory.createWithoutUml();
+
+ {
+ final XpandBackendContributor xp = new XpandBackendContributor ("org::eclipse::xtend::middleend::old::first::aTemplate", mms, ts, new ArrayList<Outlet>());
+ final ExecutionContext ctx = BackendFacade.createExecutionContext (xp.getFunctionDefContext(), ts);
+
+ System.err.println (BackendFacade.invoke (ctx, "greeting", Arrays.asList("Arno")));
+ }
- System.err.println (BackendFacade.invoke (ctx, "testPerson", Arrays.asList(p)));
+ {
+ final XtendBackendContributor bc = new XtendBackendContributor ("org::eclipse::xtend::middleend::old::first::first", mms, ts);
+ final ExecutionContext ctx = BackendFacade.createExecutionContext (bc.getFunctionDefContext(), ts);
+
+ System.err.println (BackendFacade.invoke (ctx, "test", Arrays.asList ("Arno")));
+ System.err.println (BackendFacade.invoke (ctx, "testColl", Arrays.asList (Arrays.asList (1L, "Hallo"))));
+ System.err.println (BackendFacade.invoke (ctx, "reexp", Arrays.asList (2L)));
+
+ final Person p = new Person ();
+ p.setFirstName ("Testa");
+ p.setName ("Testarossa");
+
+ System.err.println (BackendFacade.invoke (ctx, "testPerson", Arrays.asList(p)));
+ }
}
}
diff --git a/tests/org.eclipse.xtend.middleend.old.test/src/org/eclipse/xtend/middleend/old/first/aTemplate.xpt b/tests/org.eclipse.xtend.middleend.old.test/src/org/eclipse/xtend/middleend/old/first/aTemplate.xpt
new file mode 100644
index 0000000..6e31bfe
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.old.test/src/org/eclipse/xtend/middleend/old/first/aTemplate.xpt
@@ -0,0 +1,11 @@
+«EXTENSION org::eclipse::xtend::middleend::old::first::first»
+
+«DEFINE greeting FOR String»
+Hello, «this»: «test(this)»
+«EXPAND name FOR this»
+«ENDDEFINE»
+
+«DEFINE name FOR String»
+ Name: «this»
+«ENDDEFINE»
+