Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--features/org.eclipse.xtend.backend-feature/.project17
-rw-r--r--features/org.eclipse.xtend.backend-feature/build.properties5
-rw-r--r--features/org.eclipse.xtend.backend-feature/eclipse_update_120.jpgbin0 -> 14641 bytes
-rw-r--r--features/org.eclipse.xtend.backend-feature/epl-v10.html328
-rw-r--r--features/org.eclipse.xtend.backend-feature/feature.properties164
-rw-r--r--features/org.eclipse.xtend.backend-feature/feature.xml39
-rw-r--r--features/org.eclipse.xtend.backend-feature/license.html73
-rw-r--r--features/org.eclipse.xtend.backend-feature/rootfiles/epl-v10.html304
-rw-r--r--features/org.eclipse.xtend.backend-feature/rootfiles/notice.html86
-rw-r--r--features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/build.properties17
-rw-r--r--features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/eclipse_update_120.jpgbin0 -> 14641 bytes
-rw-r--r--features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/feature.properties144
-rw-r--r--features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/license.html73
-rw-r--r--features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/rootfiles/epl-v10.html304
-rw-r--r--features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/rootfiles/notice.html86
-rw-r--r--features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/ModelingFeature.pngbin0 -> 2414 bytes
-rw-r--r--features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/about.html29
-rw-r--r--features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/about.ini28
-rw-r--r--features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/about.properties23
-rw-r--r--features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/build.properties33
-rw-r--r--features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/.project17
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/build.properties5
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/eclipse_update_120.jpgbin0 -> 14641 bytes
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/epl-v10.html328
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/feature.properties164
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/feature.xml37
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/license.html73
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/rootfiles/epl-v10.html304
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/rootfiles/notice.html86
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/build.properties17
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/eclipse_update_120.jpgbin0 -> 14641 bytes
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/feature.properties144
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/license.html73
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/rootfiles/epl-v10.html304
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/rootfiles/notice.html86
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/ModelingFeature.pngbin0 -> 2414 bytes
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/about.html29
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/about.ini28
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/about.properties23
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/build.properties33
-rw-r--r--features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/.project17
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/build.properties5
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/eclipse_update_120.jpgbin0 -> 14641 bytes
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/epl-v10.html328
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/feature.properties164
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/feature.xml40
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/license.html73
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/rootfiles/epl-v10.html304
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/rootfiles/notice.html86
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/build.properties17
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/eclipse_update_120.jpgbin0 -> 14641 bytes
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/feature.properties144
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/license.html73
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/rootfiles/epl-v10.html304
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/rootfiles/notice.html86
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/ModelingFeature.pngbin0 -> 2414 bytes
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/about.html29
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/about.ini28
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/about.properties23
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/build.properties33
-rw-r--r--features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/.deployment1
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/.project17
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/build.properties5
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/eclipse_update_120.jpgbin0 -> 14641 bytes
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/epl-v10.html328
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/feature.properties164
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/feature.xml41
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/license.html73
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/rootfiles/epl-v10.html304
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/rootfiles/notice.html86
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/build.properties17
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/eclipse_update_120.jpgbin0 -> 14641 bytes
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/feature.properties144
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/license.html73
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/rootfiles/epl-v10.html304
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/rootfiles/notice.html86
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/ModelingFeature.pngbin0 -> 2414 bytes
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/about.html29
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/about.ini28
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/about.properties23
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/build.properties33
-rw-r--r--features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/UmlTypesystem.java4
-rw-r--r--plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/internal/EnumType.java4
-rw-r--r--plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/internal/MultipleStereotypeType.java4
-rw-r--r--plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/internal/StereotypeType.java4
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/BackendFacade.java7
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/AdvisedFunction.java7
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/AroundAdvice.java18
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/ExecutionPointcut.java20
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/Pointcut.java12
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/ThisJoinPointStaticPart.java13
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/internal/AdviceContextImpl.java15
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/AdviceContext.java6
-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/Helpers.java8
-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/QualifiedName.java94
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnCollectionExpression.java9
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnObjectExpression.java9
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/expr/InvocationOnWhateverExpression.java9
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/DuplicateAwareNamedFunctionCollection.java9
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/SourceDefinedFunction.java11
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/internal/FunctionDefContextImpl.java68
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/internal/PolymorphicResolver.java9
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/syslib/ReflectionOperations.java7
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/syslib/SysLibNames.java6
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/AbstractType.java11
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/FunctionType.java7
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/TypeType.java7
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/emf/internal/EClassType.java7
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/internal/FunctionBackedProperty.java9
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/internal/SyntheticPropertyExtracter.java20
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/java/internal/JavaBeansType.java10
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Base64Codec.java280
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/FileHelper.java211
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/GenericFileFilter.java177
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/middleend/javaannotations/JavaFunctionClassContributor.java12
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/middleend/javaannotations/M2tQualifiedName.java28
-rw-r--r--plugins/org.eclipse.xtend.middleend.xpand/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/OldXpandRegistry.java9
-rw-r--r--plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/XpandBackendFacade.java52
-rw-r--r--plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/XpandComponent.java45
-rw-r--r--plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/OldDefinitionConverter.java70
-rw-r--r--plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/OldXpandRegistryFactory.java4
-rw-r--r--plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/XpandLibContributor.java43
-rw-r--r--plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/XpandLibNames.java23
-rw-r--r--plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/XpandProtectedRegionOperations.java58
-rw-r--r--plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/pr/DuplicateXpandProtectedRegionException.java35
-rw-r--r--plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/pr/XpandProtectedRegionResolver.java477
-rw-r--r--plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/pr/XpandProtectedRegionSyntaxException.java26
-rw-r--r--plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/plugin/XpandDefinitionName.java3
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/plugin.xml3
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/CheckBackendFacade.java72
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/CheckComponent.java6
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/OldCheckRegistry.java118
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/OldXtendRegistry.java4
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/XtendBackendFacade.java9
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/XtendComponent.java6
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/OldExpressionConverter.java83
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/OldHelper.java18
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/OldTypeAnalyzer.java4
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/TypeToBackendType.java4
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtend/CheckConverter.java32
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtend/JavaExtensionFunction.java4
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtend/OldExtensionConverter.java48
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XpandIsDeleteLine.java3
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendCollectionOperations.java11
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendGlobalVarOperations.java18
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendIterator.java4
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendLibContributor.java4
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendLibNames.java4
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/plugin/OldCheckRegistryFactory.java39
-rw-r--r--plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/plugin/OldXtendRegistryFactory.java4
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/ast/CreateExtensionStatement.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/aop/AopTest.java52
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/aop/ConcatAdviceFactory.java14
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/common/ExpressionBaseTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/common/QualifiedNameTest.java45
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/AndExpressionTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/ConcatExpressionTest.java6
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/CreateCachedExpressionTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/CreateUncachedExpressionTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/HidingLocalVarDefExpressionTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/IfExpressionTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InitClosureExpressionTest.java13
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InvocationOnCollectionExpressionTest.java11
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InvocationOnObjectExpressionTest.java26
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InvocationOnWhateverExpressionTest.java33
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/ListLiteralExpressionTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/LiteralExpressionTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/LocalVarEvalExpressionTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/NewLocalVarDefExpressionTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/OrExpressionTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/PropertyOnCollectionExpressionTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/PropertyOnObjectExpressionTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/PropertyOnWhateverExpressionTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/SequenceExpressionTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/SetPropertyExpressionTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/SwitchExpressionTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/functions/FunctionTest.java31
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/functions/PolymorphicResolverTest.java10
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/syslib/OverrideTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/BackendTestHelper.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/CheckEvaluationExpression.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/ExceptionThrowingExpression.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/MutableLiteralExpression.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/NamedFunctionFactory.java7
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/types/AbstractTypeTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/types/BuiltinTypesTest.java4
-rw-r--r--tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/types/JavaBeansTypeTest.java15
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/.classpath7
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/.project34
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/.settings/org.eclipse.core.resources.prefs5
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/.settings/org.openarchitectureware.base.prefs4
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/META-INF/MANIFEST.MF14
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/build.properties4
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/out/dummy.txt3
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/out2/org/eclipse/xtend/middleend/xpand/test/ProtectedRegionImportTest.java17
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/out3/Person.java22
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/out4/Person.java20
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/AbstractXpandTest.java50
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/AllXpandTests.java27
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/GeneralXpandTest.java202
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/Person.java38
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/WithFileOutput.xpt6
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandAopTest.java174
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandProtectedRegionResolverTest.java132
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandProtectedRegions.xpt27
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandStatementTest.java216
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandStatements.xpt100
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/aTemplate.xpt17
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/advices.xpt11
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/first.ext14
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/imported.ext4
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/otherTemplate.xpt3
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/reexported.ext5
-rw-r--r--tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/sub/templateInOtherPackage.xpt4
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/.classpath7
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/.project34
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/.settings/org.openarchitectureware.base.prefs4
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/META-INF/MANIFEST.MF14
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/build.properties4
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/Address.java15
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/AllTests.java28
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/AopTest.java92
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/CheckTest.java113
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/Checks.chk4
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/CollectionExpressionTest.java55
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/Employee.java51
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/ExpressionTest.java81
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/GeneralXtendTest.java69
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/JavaXtendTest.java54
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/OperatorExpressionTest.java70
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/Person.java75
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/advices.ext8
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/expressions.ext60
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/first.ext14
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/imported.ext5
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/reexported.ext5
-rw-r--r--tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/sub/subpackage.ext5
253 files changed, 12965 insertions, 326 deletions
diff --git a/features/org.eclipse.xtend.backend-feature/.project b/features/org.eclipse.xtend.backend-feature/.project
new file mode 100644
index 00000000..2e651cea
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.xtend.backend-feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.xtend.backend-feature/build.properties b/features/org.eclipse.xtend.backend-feature/build.properties
new file mode 100644
index 00000000..c6af93f4
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/build.properties
@@ -0,0 +1,5 @@
+bin.includes = feature.xml,\
+ eclipse_update_120.jpg,\
+ epl-v10.html,\
+ feature.properties,\
+ license.html
diff --git a/features/org.eclipse.xtend.backend-feature/eclipse_update_120.jpg b/features/org.eclipse.xtend.backend-feature/eclipse_update_120.jpg
new file mode 100644
index 00000000..68e3e024
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.xtend.backend-feature/epl-v10.html b/features/org.eclipse.xtend.backend-feature/epl-v10.html
new file mode 100644
index 00000000..ed4b1966
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/epl-v10.html
@@ -0,0 +1,328 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 9">
+<meta name=Originator content="Microsoft Word 9">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang=EN-US style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.backend-feature/feature.properties b/features/org.eclipse.xtend.backend-feature/feature.properties
new file mode 100644
index 00000000..8a0b7b91
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/feature.properties
@@ -0,0 +1,164 @@
+# /**
+# * <copyright>
+# *
+# * Copyright (c) 2008, 2009 committers of openArchitectureWare and others.
+# * 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
+# *
+# * </copyright>
+# *
+# * $Id: feature.properties,v 1.1 2009/02/11 09:23:50 bkolb Exp $
+# */
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ==============================================================================
+# Do not change the properties between this line and the last line containing:
+# %%% END OF TRANSLATED PROPERTIES %%%
+# Instead, either redefine an existing property, or create a new property,
+# append it to the end of the file, and change the code to use the new name.
+# ==============================================================================
+
+# This file contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Xtend Backend (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse.org
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Eclipse Model to Text (M2T) Updates
+
+# "description" property - description of the feature
+description=Xtend Backend (Incubation)
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2008-2009 committers of openArchitectureWare and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ committers of openArchitectureWare - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.xtend.backend-feature/feature.xml b/features/org.eclipse.xtend.backend-feature/feature.xml
new file mode 100644
index 00000000..b54eee85
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/feature.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.xtend.backend"
+ label="%featureName"
+ version="0.7.0.qualifier"
+ provider-name="%providerName">
+
+ <description url="http://www.eclipse.org/modeling/m2t">
+ %description
+ </description>
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="%updateSiteName" url="http://download.eclipse.org/modeling/m2t/updates/"/>
+ </url>
+
+ <requires>
+ <import plugin="org.apache.commons.logging"/>
+ <import plugin="org.eclipse.emf.ecore"/>
+ <import plugin="org.eclipse.osgi"/>
+ <import plugin="org.eclipse.equinox.registry"/>
+ <import plugin="org.eclipse.emf.mwe.core"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.xtend.backend"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.xtend.backend-feature/license.html b/features/org.eclipse.xtend.backend-feature/license.html
new file mode 100644
index 00000000..3ca8ac4d
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/license.html
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>January 28, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<p>Content may be apportioned into plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;). A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins and/or Fragments associated with a Feature. Plug-ins and Fragments are located in directories
+ named &quot;plugins&quot; and Features are located in directories named &quot;features&quot;.</p>
+
+<p>Features may also include other Features (&quot;Included Features&quot;). Files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</p>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Subdirectories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot;.
+Such Abouts, Feature Licenses and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.backend-feature/rootfiles/epl-v10.html b/features/org.eclipse.xtend.backend-feature/rootfiles/epl-v10.html
new file mode 100644
index 00000000..cb1073a4
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/rootfiles/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.backend-feature/rootfiles/notice.html b/features/org.eclipse.xtend.backend-feature/rootfiles/notice.html
new file mode 100644
index 00000000..da529cb0
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/rootfiles/notice.html
@@ -0,0 +1,86 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java<sup>TM</sup> ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+
+</body>
+</html>
diff --git a/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/build.properties b/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/build.properties
new file mode 100644
index 00000000..be208904
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+###############################################################################
+# Copyright (c) 2006 committers of openArchitectureWare and others.
+# 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+root=rootfiles
+bin.includes =\
+epl-v10.html,\
+feature.xml,\
+feature.properties,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 00000000..68e3e024
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 00000000..ed4b1966
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,328 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 9">
+<meta name=Originator content="Microsoft Word 9">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang=EN-US style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 00000000..95dfba74
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,144 @@
+###############################################################################
+# Copyright (c) 2003, 2005 committers of openArchitectureWare and others.
+# 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Xtend Backend UML2Types Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse.org
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Eclipse.org update site
+
+# "description" property - description of the feature
+description=API documentation and source code zips for Xtend Backend UML2Types component.
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2008, 2009 committers of openArchitectureWare and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ committers of openArchitectureWare - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/license.html b/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/license.html
new file mode 100644
index 00000000..3259fb99
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/license.html
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>January 28, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<p>Content may be apportioned into plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;). A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins and/or Fragments associated with a Feature. Plug-ins and Fragments are located in directories
+ named &quot;plugins&quot; and Features are located in directories named &quot;features&quot;.</p>
+
+<p>Features may also include other Features (&quot;Included Features&quot;). Files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</p>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Subdirectories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot;.
+Such Abouts, Feature Licenses and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+</body>
+</html>
diff --git a/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/rootfiles/epl-v10.html b/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/rootfiles/epl-v10.html
new file mode 100644
index 00000000..cb1073a4
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/rootfiles/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/rootfiles/notice.html b/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/rootfiles/notice.html
new file mode 100644
index 00000000..da529cb0
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/sourceTemplateFeature/rootfiles/notice.html
@@ -0,0 +1,86 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java<sup>TM</sup> ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+
+</body>
+</html>
diff --git a/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/ModelingFeature.png b/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/ModelingFeature.png
new file mode 100644
index 00000000..6b08de2a
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/ModelingFeature.png
Binary files differ
diff --git a/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/about.html b/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/about.html
new file mode 100644
index 00000000..d4f39ad5
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+ <h3>About This Content</h3>
+
+ <p>June 5, 2007</p>
+ <h3>License</h3>
+
+ <p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).
+ Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
+ Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+ at <a href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+ <p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+ being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+ apply to your use of any object code in the Content. Check the Redistributor's license
+ that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+ indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+ and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+ <p align="right"><small><a href="#top">go to top</a></small></p>
+
+</body>
+</html>
diff --git a/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 00000000..93fc30a1
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,28 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=ModelingFeature.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+# Property "tipsAndTricksHref" contains the Help topic href to a tips and tricks page
+# optional
+#tipsAndTricksHref=/org.eclipse.jet.doc/tips/jet_tips.html \ No newline at end of file
diff --git a/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 00000000..a28390a7
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 00000000..a6884bda
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2006 committers of openArchitectureWare and others.
+# 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=Eclipse Model to Text - Xpand SDK\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright committers of openArchitectureWare and others 2005, 2006. All rights reserved.\n\
+http://www.eclipse.org/modeling/m2t/?project=xpand#xpand \ No newline at end of file
diff --git a/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 00000000..e75e178d
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,33 @@
+###############################################################################
+# Copyright (c) 2005 Borland Software Corporation and others.
+# 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:
+# Borland Software Corporation - initial API and implementation
+###############################################################################
+bin.includes = ModelingFeature.png,\
+ about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ plugin.xml,\
+ plugin.properties,\
+ src/**,\
+ META-INF/,\
+ eclipse_update_120.jpg,\
+ epl-v10.html,\
+ feature.properties,\
+ feature.xml,\
+ license.html
+sourcePlugin=true
+src.includes = about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ plugin.xml,\
+ plugin.properties,\
+ src/**,\
+ META-INF/
diff --git a/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 00000000..b0df896f
--- /dev/null
+++ b/features/org.eclipse.xtend.backend-feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2003, 2005 committers of openArchitectureWare and others.
+# 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+pluginName=Xtend Source (Incubation)
+providerName=Eclipse.org
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/.project b/features/org.eclipse.xtend.backend.uml2types-feature/.project
new file mode 100644
index 00000000..8cd013b0
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.xtend.backend.uml2types-feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/build.properties b/features/org.eclipse.xtend.backend.uml2types-feature/build.properties
new file mode 100644
index 00000000..c6af93f4
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/build.properties
@@ -0,0 +1,5 @@
+bin.includes = feature.xml,\
+ eclipse_update_120.jpg,\
+ epl-v10.html,\
+ feature.properties,\
+ license.html
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/eclipse_update_120.jpg b/features/org.eclipse.xtend.backend.uml2types-feature/eclipse_update_120.jpg
new file mode 100644
index 00000000..68e3e024
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/epl-v10.html b/features/org.eclipse.xtend.backend.uml2types-feature/epl-v10.html
new file mode 100644
index 00000000..ed4b1966
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/epl-v10.html
@@ -0,0 +1,328 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 9">
+<meta name=Originator content="Microsoft Word 9">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang=EN-US style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/feature.properties b/features/org.eclipse.xtend.backend.uml2types-feature/feature.properties
new file mode 100644
index 00000000..19c678f5
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/feature.properties
@@ -0,0 +1,164 @@
+# /**
+# * <copyright>
+# *
+# * Copyright (c) 2008, 2009 committers of openArchitectureWare and others.
+# * 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
+# *
+# * </copyright>
+# *
+# * $Id: feature.properties,v 1.1 2009/02/11 09:23:16 bkolb Exp $
+# */
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ==============================================================================
+# Do not change the properties between this line and the last line containing:
+# %%% END OF TRANSLATED PROPERTIES %%%
+# Instead, either redefine an existing property, or create a new property,
+# append it to the end of the file, and change the code to use the new name.
+# ==============================================================================
+
+# This file contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Xtend Backend UML2Types (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse.org
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Eclipse Model to Text (M2T) Updates
+
+# "description" property - description of the feature
+description=Xtend Backend UML2Types (Incubation)
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2008-2009 committers of openArchitectureWare and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ committers of openArchitectureWare - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/feature.xml b/features/org.eclipse.xtend.backend.uml2types-feature/feature.xml
new file mode 100644
index 00000000..e7a83e09
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/feature.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.xtend.backend.uml2types"
+ label="%featureName"
+ version="0.7.0.qualifier"
+ provider-name="%providerName">
+
+ <description url="http://www.eclipse.org/modeling/m2t">
+ %description
+ </description>
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="%updateSiteName" url="http://download.eclipse.org/modeling/m2t/updates/"/>
+ </url>
+
+ <requires>
+ <import plugin="org.apache.commons.logging"/>
+ <import plugin="org.eclipse.xtend.backend"/>
+ <import plugin="org.eclipse.uml2.uml"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.xtend.backend.uml2types"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/license.html b/features/org.eclipse.xtend.backend.uml2types-feature/license.html
new file mode 100644
index 00000000..3ca8ac4d
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/license.html
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>January 28, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<p>Content may be apportioned into plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;). A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins and/or Fragments associated with a Feature. Plug-ins and Fragments are located in directories
+ named &quot;plugins&quot; and Features are located in directories named &quot;features&quot;.</p>
+
+<p>Features may also include other Features (&quot;Included Features&quot;). Files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</p>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Subdirectories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot;.
+Such Abouts, Feature Licenses and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/rootfiles/epl-v10.html b/features/org.eclipse.xtend.backend.uml2types-feature/rootfiles/epl-v10.html
new file mode 100644
index 00000000..cb1073a4
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/rootfiles/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/rootfiles/notice.html b/features/org.eclipse.xtend.backend.uml2types-feature/rootfiles/notice.html
new file mode 100644
index 00000000..da529cb0
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/rootfiles/notice.html
@@ -0,0 +1,86 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java<sup>TM</sup> ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+
+</body>
+</html>
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/build.properties b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/build.properties
new file mode 100644
index 00000000..be208904
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+###############################################################################
+# Copyright (c) 2006 committers of openArchitectureWare and others.
+# 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+root=rootfiles
+bin.includes =\
+epl-v10.html,\
+feature.xml,\
+feature.properties,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 00000000..68e3e024
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 00000000..ed4b1966
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,328 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 9">
+<meta name=Originator content="Microsoft Word 9">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang=EN-US style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 00000000..9edfdfb8
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,144 @@
+###############################################################################
+# Copyright (c) 2003, 2005 committers of openArchitectureWare and others.
+# 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Xtend Backend Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse.org
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Eclipse.org update site
+
+# "description" property - description of the feature
+description=API documentation and source code zips for Xtend Backend component.
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2008, 2009 committers of openArchitectureWare and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ committers of openArchitectureWare - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/license.html b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/license.html
new file mode 100644
index 00000000..3259fb99
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/license.html
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>January 28, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<p>Content may be apportioned into plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;). A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins and/or Fragments associated with a Feature. Plug-ins and Fragments are located in directories
+ named &quot;plugins&quot; and Features are located in directories named &quot;features&quot;.</p>
+
+<p>Features may also include other Features (&quot;Included Features&quot;). Files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</p>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Subdirectories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot;.
+Such Abouts, Feature Licenses and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+</body>
+</html>
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/rootfiles/epl-v10.html b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/rootfiles/epl-v10.html
new file mode 100644
index 00000000..cb1073a4
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/rootfiles/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/rootfiles/notice.html b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/rootfiles/notice.html
new file mode 100644
index 00000000..da529cb0
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplateFeature/rootfiles/notice.html
@@ -0,0 +1,86 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java<sup>TM</sup> ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+
+</body>
+</html>
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/ModelingFeature.png b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/ModelingFeature.png
new file mode 100644
index 00000000..6b08de2a
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/ModelingFeature.png
Binary files differ
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/about.html b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/about.html
new file mode 100644
index 00000000..d4f39ad5
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+ <h3>About This Content</h3>
+
+ <p>June 5, 2007</p>
+ <h3>License</h3>
+
+ <p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).
+ Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
+ Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+ at <a href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+ <p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+ being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+ apply to your use of any object code in the Content. Check the Redistributor's license
+ that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+ indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+ and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+ <p align="right"><small><a href="#top">go to top</a></small></p>
+
+</body>
+</html>
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 00000000..93fc30a1
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,28 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=ModelingFeature.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+# Property "tipsAndTricksHref" contains the Help topic href to a tips and tricks page
+# optional
+#tipsAndTricksHref=/org.eclipse.jet.doc/tips/jet_tips.html \ No newline at end of file
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 00000000..a28390a7
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 00000000..a6884bda
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2006 committers of openArchitectureWare and others.
+# 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=Eclipse Model to Text - Xpand SDK\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright committers of openArchitectureWare and others 2005, 2006. All rights reserved.\n\
+http://www.eclipse.org/modeling/m2t/?project=xpand#xpand \ No newline at end of file
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 00000000..e75e178d
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,33 @@
+###############################################################################
+# Copyright (c) 2005 Borland Software Corporation and others.
+# 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:
+# Borland Software Corporation - initial API and implementation
+###############################################################################
+bin.includes = ModelingFeature.png,\
+ about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ plugin.xml,\
+ plugin.properties,\
+ src/**,\
+ META-INF/,\
+ eclipse_update_120.jpg,\
+ epl-v10.html,\
+ feature.properties,\
+ feature.xml,\
+ license.html
+sourcePlugin=true
+src.includes = about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ plugin.xml,\
+ plugin.properties,\
+ src/**,\
+ META-INF/
diff --git a/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 00000000..b0df896f
--- /dev/null
+++ b/features/org.eclipse.xtend.backend.uml2types-feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2003, 2005 committers of openArchitectureWare and others.
+# 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+pluginName=Xtend Source (Incubation)
+providerName=Eclipse.org
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/.project b/features/org.eclipse.xtend.middleend.xpand-feature/.project
new file mode 100644
index 00000000..39cbca54
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.xtend.middleend.xpand-feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/build.properties b/features/org.eclipse.xtend.middleend.xpand-feature/build.properties
new file mode 100644
index 00000000..c6af93f4
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/build.properties
@@ -0,0 +1,5 @@
+bin.includes = feature.xml,\
+ eclipse_update_120.jpg,\
+ epl-v10.html,\
+ feature.properties,\
+ license.html
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/eclipse_update_120.jpg b/features/org.eclipse.xtend.middleend.xpand-feature/eclipse_update_120.jpg
new file mode 100644
index 00000000..68e3e024
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/epl-v10.html b/features/org.eclipse.xtend.middleend.xpand-feature/epl-v10.html
new file mode 100644
index 00000000..ed4b1966
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/epl-v10.html
@@ -0,0 +1,328 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 9">
+<meta name=Originator content="Microsoft Word 9">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang=EN-US style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/feature.properties b/features/org.eclipse.xtend.middleend.xpand-feature/feature.properties
new file mode 100644
index 00000000..baf25c6e
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/feature.properties
@@ -0,0 +1,164 @@
+# /**
+# * <copyright>
+# *
+# * Copyright (c) 2008, 2009 committers of openArchitectureWare and others.
+# * 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:
+# * committers of openArchitectureWare - Initial API and implementation
+# *
+# * </copyright>
+# *
+# * $Id: feature.properties,v 1.1 2009/02/11 09:24:20 bkolb Exp $
+# */
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ==============================================================================
+# Do not change the properties between this line and the last line containing:
+# %%% END OF TRANSLATED PROPERTIES %%%
+# Instead, either redefine an existing property, or create a new property,
+# append it to the end of the file, and change the code to use the new name.
+# ==============================================================================
+
+# This file contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Xpand Middleend (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse.org
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Eclipse Model to Text (M2T) Updates
+
+# "description" property - description of the feature
+description=Xpand Middleend (Incubation)
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2008-2009 committers of openArchitectureWare and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ committers of openArchitectureWare - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/feature.xml b/features/org.eclipse.xtend.middleend.xpand-feature/feature.xml
new file mode 100644
index 00000000..ddcba977
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/feature.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.xtend.middleend.xpand"
+ label="%featureName"
+ version="0.7.0.qualifier"
+ provider-name="%providerName">
+
+ <description url="http://www.eclipse.org/modeling/m2t">
+ %description
+ </description>
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="%updateSiteName" url="http://download.eclipse.org/modeling/m2t/updates/"/>
+ </url>
+
+ <requires>
+ <import plugin="org.eclipse.xpand"/>
+ <import plugin="org.eclipse.xtend"/>
+ <import plugin="org.eclipse.xtend.backend"/>
+ <import plugin="org.eclipse.emf.mwe.core"/>
+ <import plugin="org.apache.commons.logging"/>
+ <import plugin="org.eclipse.xtend.middleend.xtend"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.xtend.middleend.xpand"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/license.html b/features/org.eclipse.xtend.middleend.xpand-feature/license.html
new file mode 100644
index 00000000..3ca8ac4d
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/license.html
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>January 28, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<p>Content may be apportioned into plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;). A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins and/or Fragments associated with a Feature. Plug-ins and Fragments are located in directories
+ named &quot;plugins&quot; and Features are located in directories named &quot;features&quot;.</p>
+
+<p>Features may also include other Features (&quot;Included Features&quot;). Files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</p>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Subdirectories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot;.
+Such Abouts, Feature Licenses and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/rootfiles/epl-v10.html b/features/org.eclipse.xtend.middleend.xpand-feature/rootfiles/epl-v10.html
new file mode 100644
index 00000000..cb1073a4
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/rootfiles/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/rootfiles/notice.html b/features/org.eclipse.xtend.middleend.xpand-feature/rootfiles/notice.html
new file mode 100644
index 00000000..da529cb0
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/rootfiles/notice.html
@@ -0,0 +1,86 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java<sup>TM</sup> ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+
+</body>
+</html>
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/build.properties b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/build.properties
new file mode 100644
index 00000000..be208904
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+###############################################################################
+# Copyright (c) 2006 committers of openArchitectureWare and others.
+# 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+root=rootfiles
+bin.includes =\
+epl-v10.html,\
+feature.xml,\
+feature.properties,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 00000000..68e3e024
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 00000000..ed4b1966
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,328 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 9">
+<meta name=Originator content="Microsoft Word 9">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang=EN-US style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 00000000..33b9af7d
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,144 @@
+###############################################################################
+# Copyright (c) 2003, 2005 committers of openArchitectureWare and others.
+# 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Xpand Middleend Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse.org
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Eclipse.org update site
+
+# "description" property - description of the feature
+description=API documentation and source code zips for Xpand Middleend component.
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2008, 2009 committers of openArchitectureWare and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ committers of openArchitectureWare - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/license.html b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/license.html
new file mode 100644
index 00000000..3259fb99
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/license.html
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>January 28, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<p>Content may be apportioned into plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;). A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins and/or Fragments associated with a Feature. Plug-ins and Fragments are located in directories
+ named &quot;plugins&quot; and Features are located in directories named &quot;features&quot;.</p>
+
+<p>Features may also include other Features (&quot;Included Features&quot;). Files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</p>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Subdirectories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot;.
+Such Abouts, Feature Licenses and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+</body>
+</html>
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/rootfiles/epl-v10.html b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/rootfiles/epl-v10.html
new file mode 100644
index 00000000..cb1073a4
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/rootfiles/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/rootfiles/notice.html b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/rootfiles/notice.html
new file mode 100644
index 00000000..da529cb0
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplateFeature/rootfiles/notice.html
@@ -0,0 +1,86 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java<sup>TM</sup> ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+
+</body>
+</html>
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/ModelingFeature.png b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/ModelingFeature.png
new file mode 100644
index 00000000..6b08de2a
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/ModelingFeature.png
Binary files differ
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/about.html b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/about.html
new file mode 100644
index 00000000..d4f39ad5
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+ <h3>About This Content</h3>
+
+ <p>June 5, 2007</p>
+ <h3>License</h3>
+
+ <p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).
+ Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
+ Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+ at <a href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+ <p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+ being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+ apply to your use of any object code in the Content. Check the Redistributor's license
+ that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+ indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+ and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+ <p align="right"><small><a href="#top">go to top</a></small></p>
+
+</body>
+</html>
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 00000000..93fc30a1
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,28 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=ModelingFeature.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+# Property "tipsAndTricksHref" contains the Help topic href to a tips and tricks page
+# optional
+#tipsAndTricksHref=/org.eclipse.jet.doc/tips/jet_tips.html \ No newline at end of file
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 00000000..a28390a7
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 00000000..a6884bda
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2006 committers of openArchitectureWare and others.
+# 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=Eclipse Model to Text - Xpand SDK\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright committers of openArchitectureWare and others 2005, 2006. All rights reserved.\n\
+http://www.eclipse.org/modeling/m2t/?project=xpand#xpand \ No newline at end of file
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 00000000..e75e178d
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,33 @@
+###############################################################################
+# Copyright (c) 2005 Borland Software Corporation and others.
+# 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:
+# Borland Software Corporation - initial API and implementation
+###############################################################################
+bin.includes = ModelingFeature.png,\
+ about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ plugin.xml,\
+ plugin.properties,\
+ src/**,\
+ META-INF/,\
+ eclipse_update_120.jpg,\
+ epl-v10.html,\
+ feature.properties,\
+ feature.xml,\
+ license.html
+sourcePlugin=true
+src.includes = about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ plugin.xml,\
+ plugin.properties,\
+ src/**,\
+ META-INF/
diff --git a/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 00000000..b0df896f
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xpand-feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2003, 2005 committers of openArchitectureWare and others.
+# 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+pluginName=Xtend Source (Incubation)
+providerName=Eclipse.org
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/.deployment b/features/org.eclipse.xtend.middleend.xtend-feature/.deployment
new file mode 100644
index 00000000..0d0f1032
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/.deployment
@@ -0,0 +1 @@
+deploymenet.output.folder=Deployment \ No newline at end of file
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/.project b/features/org.eclipse.xtend.middleend.xtend-feature/.project
new file mode 100644
index 00000000..5cdc3a02
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.xtend.middleend.xtend-feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/build.properties b/features/org.eclipse.xtend.middleend.xtend-feature/build.properties
new file mode 100644
index 00000000..c6af93f4
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/build.properties
@@ -0,0 +1,5 @@
+bin.includes = feature.xml,\
+ eclipse_update_120.jpg,\
+ epl-v10.html,\
+ feature.properties,\
+ license.html
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/eclipse_update_120.jpg b/features/org.eclipse.xtend.middleend.xtend-feature/eclipse_update_120.jpg
new file mode 100644
index 00000000..68e3e024
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/epl-v10.html b/features/org.eclipse.xtend.middleend.xtend-feature/epl-v10.html
new file mode 100644
index 00000000..ed4b1966
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/epl-v10.html
@@ -0,0 +1,328 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 9">
+<meta name=Originator content="Microsoft Word 9">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang=EN-US style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/feature.properties b/features/org.eclipse.xtend.middleend.xtend-feature/feature.properties
new file mode 100644
index 00000000..390e1cdd
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/feature.properties
@@ -0,0 +1,164 @@
+# /**
+# * <copyright>
+# *
+# * Copyright (c) 2008, 2009 committers of openArchitectureWare and others.
+# * 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:
+# * committers of openArchitectureWare - Initial API and implementation
+# *
+# * </copyright>
+# *
+# * $Id: feature.properties,v 1.1 2009/02/11 09:23:28 bkolb Exp $
+# */
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ==============================================================================
+# Do not change the properties between this line and the last line containing:
+# %%% END OF TRANSLATED PROPERTIES %%%
+# Instead, either redefine an existing property, or create a new property,
+# append it to the end of the file, and change the code to use the new name.
+# ==============================================================================
+
+# This file contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Xtend Middleend (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse.org
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Eclipse Model to Text (M2T) Updates
+
+# "description" property - description of the feature
+description=Xtend Middleend (Incubation)
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2008-2009 committers of openArchitectureWare and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ committers of openArchitectureWare - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/feature.xml b/features/org.eclipse.xtend.middleend.xtend-feature/feature.xml
new file mode 100644
index 00000000..ca659ba4
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/feature.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.xtend.middleend.xtend"
+ label="%featureName"
+ version="0.7.0.qualifier"
+ provider-name="%providerName">
+
+ <description url="http://www.eclipse.org/modeling/m2t">
+ %description
+ </description>
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="%updateSiteName" url="http://download.eclipse.org/modeling/m2t/updates/"/>
+ </url>
+
+ <requires>
+ <import plugin="org.eclipse.xtend"/>
+ <import plugin="org.apache.commons.logging"/>
+ <import plugin="org.eclipse.emf.mwe.core"/>
+ <import plugin="org.eclipse.emf.ecore"/>
+ <import plugin="org.eclipse.xtend.backend"/>
+ <import plugin="org.eclipse.xtend.typesystem.emf"/>
+ <import plugin="org.eclipse.xpand"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.xtend.middleend.xtend"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/license.html b/features/org.eclipse.xtend.middleend.xtend-feature/license.html
new file mode 100644
index 00000000..3ca8ac4d
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/license.html
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>January 28, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<p>Content may be apportioned into plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;). A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins and/or Fragments associated with a Feature. Plug-ins and Fragments are located in directories
+ named &quot;plugins&quot; and Features are located in directories named &quot;features&quot;.</p>
+
+<p>Features may also include other Features (&quot;Included Features&quot;). Files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</p>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Subdirectories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot;.
+Such Abouts, Feature Licenses and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/rootfiles/epl-v10.html b/features/org.eclipse.xtend.middleend.xtend-feature/rootfiles/epl-v10.html
new file mode 100644
index 00000000..cb1073a4
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/rootfiles/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/rootfiles/notice.html b/features/org.eclipse.xtend.middleend.xtend-feature/rootfiles/notice.html
new file mode 100644
index 00000000..da529cb0
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/rootfiles/notice.html
@@ -0,0 +1,86 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java<sup>TM</sup> ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+
+</body>
+</html>
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/build.properties b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/build.properties
new file mode 100644
index 00000000..be208904
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+###############################################################################
+# Copyright (c) 2006 committers of openArchitectureWare and others.
+# 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+root=rootfiles
+bin.includes =\
+epl-v10.html,\
+feature.xml,\
+feature.properties,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 00000000..68e3e024
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 00000000..ed4b1966
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,328 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 9">
+<meta name=Originator content="Microsoft Word 9">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang=EN-US style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 00000000..e4b722ae
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,144 @@
+###############################################################################
+# Copyright (c) 2003, 2005 committers of openArchitectureWare and others.
+# 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Xtend Middleend Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse.org
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Eclipse.org update site
+
+# "description" property - description of the feature
+description=API documentation and source code zips for Xtend Middleend component.
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2008, 2009 committers of openArchitectureWare and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ committers of openArchitectureWare - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/license.html b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/license.html
new file mode 100644
index 00000000..3259fb99
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/license.html
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>January 28, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<p>Content may be apportioned into plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;). A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins and/or Fragments associated with a Feature. Plug-ins and Fragments are located in directories
+ named &quot;plugins&quot; and Features are located in directories named &quot;features&quot;.</p>
+
+<p>Features may also include other Features (&quot;Included Features&quot;). Files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</p>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Subdirectories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot;.
+Such Abouts, Feature Licenses and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+</body>
+</html>
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/rootfiles/epl-v10.html b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/rootfiles/epl-v10.html
new file mode 100644
index 00000000..cb1073a4
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/rootfiles/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/rootfiles/notice.html b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/rootfiles/notice.html
new file mode 100644
index 00000000..da529cb0
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplateFeature/rootfiles/notice.html
@@ -0,0 +1,86 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
+ modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java<sup>TM</sup> ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+
+</body>
+</html>
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/ModelingFeature.png b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/ModelingFeature.png
new file mode 100644
index 00000000..6b08de2a
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/ModelingFeature.png
Binary files differ
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/about.html b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/about.html
new file mode 100644
index 00000000..d4f39ad5
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+ <h3>About This Content</h3>
+
+ <p>June 5, 2007</p>
+ <h3>License</h3>
+
+ <p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).
+ Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
+ Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+ at <a href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+ <p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+ being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+ apply to your use of any object code in the Content. Check the Redistributor's license
+ that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+ indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+ and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+ <p align="right"><small><a href="#top">go to top</a></small></p>
+
+</body>
+</html>
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 00000000..93fc30a1
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,28 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=ModelingFeature.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+# Property "tipsAndTricksHref" contains the Help topic href to a tips and tricks page
+# optional
+#tipsAndTricksHref=/org.eclipse.jet.doc/tips/jet_tips.html \ No newline at end of file
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 00000000..a28390a7
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 00000000..a6884bda
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2006 committers of openArchitectureWare and others.
+# 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=Eclipse Model to Text - Xpand SDK\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright committers of openArchitectureWare and others 2005, 2006. All rights reserved.\n\
+http://www.eclipse.org/modeling/m2t/?project=xpand#xpand \ No newline at end of file
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 00000000..e75e178d
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,33 @@
+###############################################################################
+# Copyright (c) 2005 Borland Software Corporation and others.
+# 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:
+# Borland Software Corporation - initial API and implementation
+###############################################################################
+bin.includes = ModelingFeature.png,\
+ about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ plugin.xml,\
+ plugin.properties,\
+ src/**,\
+ META-INF/,\
+ eclipse_update_120.jpg,\
+ epl-v10.html,\
+ feature.properties,\
+ feature.xml,\
+ license.html
+sourcePlugin=true
+src.includes = about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ plugin.xml,\
+ plugin.properties,\
+ src/**,\
+ META-INF/
diff --git a/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 00000000..b0df896f
--- /dev/null
+++ b/features/org.eclipse.xtend.middleend.xtend-feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2003, 2005 committers of openArchitectureWare and others.
+# 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:
+# committers of openArchitectureWare - initial API and implementation
+###############################################################################
+pluginName=Xtend Source (Incubation)
+providerName=Eclipse.org
diff --git a/plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/UmlTypesystem.java b/plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/UmlTypesystem.java
index 8a3fc507..866722fd 100644
--- a/plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/UmlTypesystem.java
+++ b/plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/UmlTypesystem.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.types.uml2;
@@ -48,6 +49,7 @@ import org.eclipse.xtend.backend.types.uml2.internal.StereotypeType;
* as well. But if you use both, make sure UmlTypesystem comes before EmfTypesystem.
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class UmlTypesystem implements BackendTypesystem {
private BackendTypesystem _rootTs;
diff --git a/plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/internal/EnumType.java b/plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/internal/EnumType.java
index 651594dd..38123996 100644
--- a/plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/internal/EnumType.java
+++ b/plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/internal/EnumType.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.types.uml2.internal;
@@ -25,6 +26,7 @@ import org.eclipse.xtend.backend.types.emf.EObjectType;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class EnumType extends AbstractType {
/** The Enumeration represented by this. */
diff --git a/plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/internal/MultipleStereotypeType.java b/plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/internal/MultipleStereotypeType.java
index 2a754a4a..88f1571d 100644
--- a/plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/internal/MultipleStereotypeType.java
+++ b/plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/internal/MultipleStereotypeType.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.types.uml2.internal;
@@ -21,6 +22,7 @@ import org.eclipse.xtend.backend.types.AbstractType;
* them for each wrapped stereotype.
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class MultipleStereotypeType extends AbstractType {
diff --git a/plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/internal/StereotypeType.java b/plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/internal/StereotypeType.java
index 42832f05..9d21f564 100644
--- a/plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/internal/StereotypeType.java
+++ b/plugins/org.eclipse.xtend.backend.uml2types/src/org/eclipse/xtend/backend/types/uml2/internal/StereotypeType.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.types.uml2.internal;
@@ -40,6 +41,7 @@ import org.eclipse.xtend.backend.types.uml2.UmlTypesystem;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class StereotypeType extends AbstractType {
private final Stereotype _stereoType;
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 22ec951a..1c066f2e 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,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend;
@@ -15,19 +16,21 @@ import java.util.List;
import org.eclipse.xtend.backend.common.BackendTypesystem;
import org.eclipse.xtend.backend.common.ExecutionContext;
import org.eclipse.xtend.backend.common.FunctionDefContext;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.internal.ExecutionContextImpl;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class BackendFacade {
public static ExecutionContext createExecutionContext (FunctionDefContext initialContext, BackendTypesystem typesystem, boolean logStacktrace) {
return new ExecutionContextImpl (initialContext, typesystem, logStacktrace);
}
- public static Object invoke (ExecutionContext ctx, String functionName, List<? extends Object> params) {
+ public static Object invoke (ExecutionContext ctx, QualifiedName functionName, List<? extends Object> params) {
return ctx.getFunctionDefContext().invoke(ctx, functionName, params);
}
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/AdvisedFunction.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/AdvisedFunction.java
index 732a58d0..5fc04e8a 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/AdvisedFunction.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/AdvisedFunction.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.aop;
@@ -15,6 +16,7 @@ import java.util.List;
import org.eclipse.xtend.backend.aop.internal.AdviceScopeCounter;
import org.eclipse.xtend.backend.common.ExecutionContext;
import org.eclipse.xtend.backend.common.Function;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.util.ObjectWrapper;
import org.eclipse.xtend.backend.util.Triplet;
@@ -30,6 +32,7 @@ import org.eclipse.xtend.backend.util.Triplet;
* name and context.
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class AdvisedFunction {
private final Function _function;
@@ -40,7 +43,7 @@ public final class AdvisedFunction {
private final ThisJoinPointStaticPart _thisJoinPointStaticPart;
- public AdvisedFunction (String functionName, Function function, List<AroundAdvice> advice, AdviceScopeCounter scopeCounter) {
+ public AdvisedFunction (QualifiedName functionName, Function function, List<AroundAdvice> advice, AdviceScopeCounter scopeCounter) {
_function = function;
_advice = advice;
_scopeCounter = scopeCounter;
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/AroundAdvice.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/AroundAdvice.java
index 5fee28bb..d59431e2 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/AroundAdvice.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/AroundAdvice.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,18 +7,23 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.aop;
+import java.util.Iterator;
+
import org.eclipse.xtend.backend.aop.internal.AdviceScopeCounter;
import org.eclipse.xtend.backend.common.ExecutionContext;
import org.eclipse.xtend.backend.common.ExpressionBase;
import org.eclipse.xtend.backend.common.FunctionDefContext;
import org.eclipse.xtend.backend.common.SyntaxConstants;
+import org.eclipse.xtend.backend.util.Pair;
/**
* @author Arno Haase (http://www.haase-consulting.com)
+ * @André Arnold
*/
public final class AroundAdvice {
private final ExpressionBase _body;
@@ -49,6 +54,14 @@ public final class AroundAdvice {
scopeCounter.enterAdvice();
ctx.getLocalVarContext().getLocalVars().put (SyntaxConstants.THIS_JOINPOINT, thisJoinPoint);
ctx.getLocalVarContext().getLocalVars().put (SyntaxConstants.THIS_JOINPOINT_STATICPART, thisJoinPointStaticPart);
+ // TODO assign params from thisJoinPoint via _pointcut.paramTypes to _body localVarContext, see also AdvicedFunction
+ Iterator<Pair<String, AdviceParamType>> paramTypeIt = _pointcut.getParamTypes().iterator();
+ Iterator<?> paramIt = thisJoinPoint.getParameters().iterator();
+ while (paramTypeIt.hasNext () && paramIt.hasNext ()) {
+ Pair<String, AdviceParamType> paramType = paramTypeIt.next();
+ Object param = paramIt.next();
+ ctx.getLocalVarContext().getLocalVars().put (paramType.getFirst(), param);
+ }
final FunctionDefContext oldFdc = ctx.getFunctionDefContext();
ctx.setFunctionDefContext (_fdc);
@@ -60,6 +73,9 @@ public final class AroundAdvice {
ctx.setFunctionDefContext (oldFdc);
ctx.getLocalVarContext ().getLocalVars ().remove (SyntaxConstants.THIS_JOINPOINT);
ctx.getLocalVarContext ().getLocalVars ().remove (SyntaxConstants.THIS_JOINPOINT_STATICPART);
+ for (Pair<String, AdviceParamType> advParamType : _pointcut.getParamTypes()) {
+ ctx.getLocalVarContext().getLocalVars().remove (advParamType.getFirst());
+ }
scopeCounter.leaveAdvice();
}
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/ExecutionPointcut.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/ExecutionPointcut.java
index 13575905..0650abc4 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/ExecutionPointcut.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/ExecutionPointcut.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.aop;
@@ -15,6 +16,7 @@ import java.util.regex.Pattern;
import org.eclipse.xtend.backend.common.BackendType;
import org.eclipse.xtend.backend.common.Function;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.util.Pair;
@@ -61,9 +63,7 @@ public final class ExecutionPointcut implements Pointcut {
_varArgsType = varArgsType;
}
- //TODO testen!!!
-
- public boolean matches (String name, Function function) {
+ public boolean matches (QualifiedName name, Function function) {
if (! matchesName (name))
return false;
@@ -97,12 +97,16 @@ public final class ExecutionPointcut implements Pointcut {
return true;
}
- private boolean matchesName (String functionName) {
- if (_hasCompleteName)
- return functionName.equals (_functionNamePattern);
+ private boolean matchesName (QualifiedName functionName) {
+ if (_hasCompleteName && functionName.getNameSpace() == null)
+ return functionName.getSimpleName().equals (_functionNamePattern);
- return _namePattern.matcher (functionName).matches();
+ return _namePattern.matcher (functionName.getFullQualifiedName()).matches();
}
+
+ public List<Pair<String, AdviceParamType>> getParamTypes() {
+ return _paramTypes;
+ }
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/Pointcut.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/Pointcut.java
index 4a1af326..57a78c7e 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/Pointcut.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/Pointcut.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,10 +7,15 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.aop;
+import java.util.List;
+
import org.eclipse.xtend.backend.common.Function;
+import org.eclipse.xtend.backend.common.QualifiedName;
+import org.eclipse.xtend.backend.util.Pair;
/**
@@ -22,5 +27,8 @@ public interface Pointcut {
/**
* checks if this pointcut matches a given function
*/
- public boolean matches (String name, Function f);
+ public boolean matches (QualifiedName name, Function f);
+
+ public List<Pair<String, AdviceParamType>> getParamTypes ();
+
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/ThisJoinPointStaticPart.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/ThisJoinPointStaticPart.java
index a61f6366..2e493ebb 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/ThisJoinPointStaticPart.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/ThisJoinPointStaticPart.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,27 +7,30 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.aop;
import org.eclipse.xtend.backend.common.Function;
+import org.eclipse.xtend.backend.common.QualifiedName;
/**
* This class exposes all static information about the matched join point.
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class ThisJoinPointStaticPart {
- private final String _functionName;
+ private final QualifiedName _functionName;
private final Function _function;
- public ThisJoinPointStaticPart (String functionName, Function function) {
+ public ThisJoinPointStaticPart (QualifiedName functionName, Function function) {
_functionName = functionName;
_function = function;
}
- public String getFunctionName () {
+ public QualifiedName getFunctionName () {
return _functionName;
}
@@ -37,6 +40,6 @@ public final class ThisJoinPointStaticPart {
@Override
public String toString () {
- return _functionName + ": " + _function;
+ return _functionName.toString() + ": " + _function;
}
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/internal/AdviceContextImpl.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/internal/AdviceContextImpl.java
index a934bcfd..13cc9a2e 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/internal/AdviceContextImpl.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/aop/internal/AdviceContextImpl.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.aop.internal;
@@ -20,6 +21,7 @@ import org.eclipse.xtend.backend.aop.AdvisedFunction;
import org.eclipse.xtend.backend.aop.AroundAdvice;
import org.eclipse.xtend.backend.common.AdviceContext;
import org.eclipse.xtend.backend.common.Function;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.util.DoubleKeyCache;
import org.eclipse.xtend.backend.util.ObjectWrapper;
import org.eclipse.xtend.backend.util.Triplet;
@@ -36,6 +38,7 @@ import org.eclipse.xtend.backend.util.Triplet;
* invocation of functions.
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class AdviceContextImpl implements AdviceContext {
private final List<AroundAdvice> _advice = new ArrayList<AroundAdvice> ();
@@ -56,9 +59,9 @@ public final class AdviceContextImpl implements AdviceContext {
};
- private final DoubleKeyCache <String, Function, AdvisedFunction> _advisedFunctionCache = new DoubleKeyCache<String, Function, AdvisedFunction> () {
+ private final DoubleKeyCache <QualifiedName, Function, AdvisedFunction> _advisedFunctionCache = new DoubleKeyCache<QualifiedName, Function, AdvisedFunction> () {
@Override
- protected AdvisedFunction create (String functionName, Function f) {
+ protected AdvisedFunction create (QualifiedName functionName, Function f) {
final List<AroundAdvice> applicableAdvice = new ArrayList<AroundAdvice> ();
for (AroundAdvice advice: _advice)
@@ -96,14 +99,12 @@ public final class AdviceContextImpl implements AdviceContext {
return result;
}
- //TODO test this (including the order in which advice is applied)!!!
-
/**
* returns the advice to be applied to this function, starting with the outermost
* advice, i.e. the advice that is to wrapped around all other advice applicable
* to a given function.
*/
- public AdvisedFunction getAdvice (String functionName, Function f) {
+ public AdvisedFunction getAdvice (QualifiedName functionName, Function f) {
// this distinction adds an implicit " && ! within <any advice>" to every pointcut. That is
// done to avoid endless recursion when a function is called from within advice that is
// applicable to this function
@@ -116,7 +117,7 @@ public final class AdviceContextImpl implements AdviceContext {
}
@SuppressWarnings("unchecked")
- private AdvisedFunction unadvisedFunction (String functionName, Function f) {
+ private AdvisedFunction unadvisedFunction (QualifiedName functionName, Function f) {
return new AdvisedFunction (functionName, f, Collections.EMPTY_LIST, _scopeCounter);
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/AdviceContext.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/AdviceContext.java
index 7ffd0c21..eb5a1245 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/AdviceContext.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/AdviceContext.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.common;
@@ -22,9 +23,10 @@ import org.eclipse.xtend.backend.util.Triplet;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @André Arnold
*/
public interface AdviceContext {
AdviceContext copyWithAdvice (AroundAdvice advice);
- AdvisedFunction getAdvice (String functionName, Function f);
+ AdvisedFunction getAdvice (QualifiedName functionName, Function f);
public Map<Triplet<Function, AroundAdvice, List<?>>, ObjectWrapper> getResultCache ();
}
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 9ef69bf0..8dc1716d 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,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.common;
@@ -20,9 +21,10 @@ import java.util.List;
* that is valid within its body.
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public interface FunctionDefContext {
- Object invoke (ExecutionContext ctx, String functionName, List<? extends Object> params);
+ Object invoke (ExecutionContext ctx, QualifiedName functionName, List<? extends Object> params);
/**
* for reflection. This method returns all functions, both those separately registered and those "built into" the
@@ -34,14 +36,14 @@ public interface FunctionDefContext {
* for reflection. This method returns all functions, both those built-into the types and those
* registered separately.
*/
- Function getMatch (ExecutionContext ctx, String name, List<BackendType> params);
+ Function getMatch (ExecutionContext ctx, QualifiedName name, List<BackendType> params);
/**
* for dynamic matching, e.g. to determine if a function should be called on a collection itself or
* on all of its members. This method matches against all functions, both those built into the
* types and those registered separately.
*/
- boolean hasMatch (ExecutionContext ctx, String functionName, List<? extends Object> params);
+ boolean hasMatch (ExecutionContext ctx, QualifiedName functionName, List<? extends Object> params);
Collection<NamedFunction> getPublicFunctions ();
}
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
index 475de8b3..66a05c12 100644
--- 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
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.common;
@@ -18,10 +19,11 @@ import java.util.Collections;
* This class contains commonly used helper operations.
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class Helpers {
- public static String TO_STRING_METHOD_NAME = "toString";
- public static String EQUALS_NAME = "operatorEquals";
+ public static QualifiedName TO_STRING_METHOD_NAME = new QualifiedName ("toString");
+ public static QualifiedName EQUALS_NAME = new QualifiedName ("operatorEquals");
/**
* This method is public static so as to be available as a helper method for all code that needs to call "toString".
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 41076af8..8c390b5e 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,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.common;
@@ -16,12 +17,13 @@ package org.eclipse.xtend.backend.common;
* concept from Function itself so that the same function can have several names.
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class NamedFunction {
private final Function _function;
- private final String _name;
+ private final QualifiedName _name;
- public NamedFunction (String name, Function f) {
+ public NamedFunction (QualifiedName name, Function f) {
_function = f;
_name = name;
}
@@ -30,7 +32,7 @@ public class NamedFunction {
return _function;
}
- public String getName () {
+ public QualifiedName getName () {
return _name;
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/QualifiedName.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/QualifiedName.java
new file mode 100644
index 00000000..68469f42
--- /dev/null
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/common/QualifiedName.java
@@ -0,0 +1,94 @@
+/*
+Copyright (c) 2008 André Arnold.
+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:
+ André Arnold - initial API and implementation
+ */
+package org.eclipse.xtend.backend.common;
+
+/**
+ *
+ * @author André Arnold
+ *
+ */
+public class QualifiedName {
+
+ private final String _simpleName;
+
+ private final String _nameSpace;
+
+ public QualifiedName (String fullQualifiedName) {
+ int sepPos = fullQualifiedName.lastIndexOf (SyntaxConstants.NS_DELIM);
+ if (sepPos > -1) {
+ _simpleName = fullQualifiedName.substring (sepPos + SyntaxConstants.NS_DELIM.length() );
+ _nameSpace = fullQualifiedName.substring (0, sepPos);
+ } else {
+ _simpleName = fullQualifiedName;
+ _nameSpace = null;
+ }
+ }
+
+ public QualifiedName (String simpleName, String nameSpace) {
+ super();
+ _simpleName = simpleName;
+ _nameSpace = nameSpace;
+ }
+
+ public String getSimpleName () {
+ return _simpleName;
+ }
+
+ public String getNameSpace () {
+ return _nameSpace;
+ }
+
+ public String getFullQualifiedName () {
+ if (_nameSpace != null)
+ return _nameSpace + SyntaxConstants.NS_DELIM + _simpleName;
+ else
+ return _simpleName;
+ }
+
+ @Override
+ public int hashCode () {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result
+ + ((_nameSpace == null) ? 0 : _nameSpace.hashCode());
+ result = prime * result
+ + ((_simpleName == null) ? 0 : _simpleName.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ QualifiedName other = (QualifiedName) obj;
+ if (_nameSpace == null) {
+ if (other._nameSpace != null)
+ return false;
+ } else if (!_nameSpace.equals (other._nameSpace))
+ return false;
+ if (_simpleName == null) {
+ if (other._simpleName != null)
+ return false;
+ } else if (!_simpleName.equals(other._simpleName))
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString () {
+ return getFullQualifiedName ();
+ }
+
+}
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 cad3e68d..bc2bba02 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,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -16,6 +17,7 @@ import java.util.List;
import org.eclipse.xtend.backend.common.ExecutionContext;
import org.eclipse.xtend.backend.common.ExpressionBase;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.common.SourcePos;
import org.eclipse.xtend.backend.syslib.CollectionOperations;
@@ -23,13 +25,14 @@ import org.eclipse.xtend.backend.syslib.CollectionOperations;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class InvocationOnCollectionExpression extends ExpressionBase {
private final ExpressionBase _coll;
- private final String _functionName;
+ private final QualifiedName _functionName;
private final List<ExpressionBase> _params;
- public InvocationOnCollectionExpression (ExpressionBase coll, String functionName, List<ExpressionBase> params, SourcePos sourcePos) {
+ public InvocationOnCollectionExpression (ExpressionBase coll, QualifiedName functionName, List<ExpressionBase> params, SourcePos sourcePos) {
super (sourcePos);
_coll = coll;
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 91314db6..d73a0bdb 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,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -15,19 +16,21 @@ import java.util.List;
import org.eclipse.xtend.backend.common.ExecutionContext;
import org.eclipse.xtend.backend.common.ExpressionBase;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.common.SourcePos;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class InvocationOnObjectExpression extends ExpressionBase {
- private final String _functionName;
+ private final QualifiedName _functionName;
private final List<? extends ExpressionBase> _params;
private final boolean _nullIfFirstParamIsNull;
- public InvocationOnObjectExpression (String functionName, List<? extends ExpressionBase> params, boolean nullIfFirstParamIsNull, SourcePos sourcePos) {
+ public InvocationOnObjectExpression (QualifiedName functionName, List<? extends ExpressionBase> params, boolean nullIfFirstParamIsNull, SourcePos sourcePos) {
super (sourcePos);
_functionName = functionName;
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 817b807e..3588ec99 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,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -16,6 +17,7 @@ import java.util.List;
import org.eclipse.xtend.backend.common.ExecutionContext;
import org.eclipse.xtend.backend.common.ExpressionBase;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.common.SourcePos;
import org.eclipse.xtend.backend.syslib.CollectionOperations;
@@ -32,13 +34,14 @@ import org.eclipse.xtend.backend.syslib.CollectionOperations;
* middle end, to statically resolve that.
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class InvocationOnWhateverExpression extends ExpressionBase {
- private final String _functionName;
+ private final QualifiedName _functionName;
private final List<? extends ExpressionBase> _params;
private final boolean _nullIfFirstParamIsNull;
- public InvocationOnWhateverExpression (String functionName, List<? extends ExpressionBase> params, boolean nullIfFirstParamIsNull, SourcePos sourcePos) {
+ public InvocationOnWhateverExpression (QualifiedName functionName, List<? extends ExpressionBase> params, boolean nullIfFirstParamIsNull, SourcePos sourcePos) {
super (sourcePos);
_functionName = functionName;
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 63a633c9..2f5a2c3f 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,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.functions;
@@ -14,6 +15,7 @@ import java.util.Collection;
import java.util.HashSet;
import org.eclipse.xtend.backend.common.NamedFunction;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.util.Cache;
@@ -25,12 +27,13 @@ import org.eclipse.xtend.backend.util.Cache;
* is left for a future version.
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class DuplicateAwareNamedFunctionCollection {
private final Collection<NamedFunction> _allFunctions = new HashSet<NamedFunction>();
- private final Cache<String, Collection<NamedFunction>> _byName = new Cache<String, Collection<NamedFunction>> () {
+ private final Cache<QualifiedName, Collection<NamedFunction>> _byName = new Cache<QualifiedName, Collection<NamedFunction>> () {
@Override
- protected Collection<NamedFunction> create (String key) {
+ protected Collection<NamedFunction> create (QualifiedName key) {
return new HashSet<NamedFunction>();
}
};
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 e45eda03..6a26176d 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,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.functions;
@@ -16,19 +17,21 @@ import org.eclipse.xtend.backend.common.BackendType;
import org.eclipse.xtend.backend.common.ExecutionContext;
import org.eclipse.xtend.backend.common.ExpressionBase;
import org.eclipse.xtend.backend.common.LocalVarContext;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.common.StacktraceEntry;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class SourceDefinedFunction extends AbstractFunction {
- private final String _name;
+ private final QualifiedName _name;
private final List<String> _paramNames;
private final ExpressionBase _def;
- public SourceDefinedFunction (String name, List<String> paramNames, List<BackendType> paramTypes, ExpressionBase def, boolean cached, ExpressionBase guard) {
+ public SourceDefinedFunction (QualifiedName name, List<String> paramNames, List<BackendType> paramTypes, ExpressionBase def, boolean cached, ExpressionBase guard) {
super (guard, paramTypes, cached);
_name = name;
_paramNames = paramNames;
@@ -58,7 +61,7 @@ public final class SourceDefinedFunction extends AbstractFunction {
}
}
- public String getName () {
+ public QualifiedName getName () {
return _name;
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/internal/FunctionDefContextImpl.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/internal/FunctionDefContextImpl.java
index f1834e06..8e570d06 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/internal/FunctionDefContextImpl.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/internal/FunctionDefContextImpl.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.functions.internal;
@@ -19,9 +20,11 @@ import org.eclipse.xtend.backend.common.BackendTypesystem;
import org.eclipse.xtend.backend.common.ExecutionContext;
import org.eclipse.xtend.backend.common.Function;
import org.eclipse.xtend.backend.common.NamedFunction;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.functions.DuplicateAwareFunctionCollection;
import org.eclipse.xtend.backend.functions.DuplicateAwareNamedFunctionCollection;
import org.eclipse.xtend.backend.functions.FunctionDefContextInternal;
+import org.eclipse.xtend.backend.functions.SourceDefinedFunction;
import org.eclipse.xtend.backend.util.Cache;
import org.eclipse.xtend.backend.util.DoubleKeyCache;
import org.eclipse.xtend.backend.util.ErrorHandler;
@@ -31,6 +34,7 @@ import org.eclipse.xtend.backend.util.StringHelper;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class FunctionDefContextImpl implements FunctionDefContextInternal {
@@ -41,21 +45,29 @@ public final class FunctionDefContextImpl implements FunctionDefContextInternal
}
};
- private final DoubleKeyCache<String, Integer, DuplicateAwareNamedFunctionCollection> _functions = new DoubleKeyCache<String, Integer, DuplicateAwareNamedFunctionCollection>() {
+ private final DoubleKeyCache<QualifiedName, Integer, DuplicateAwareNamedFunctionCollection> _functions = new DoubleKeyCache<QualifiedName, Integer, DuplicateAwareNamedFunctionCollection>() {
@Override
- protected DuplicateAwareNamedFunctionCollection create(String key1, Integer key2) {
+ protected DuplicateAwareNamedFunctionCollection create(QualifiedName key1, Integer key2) {
+ return new DuplicateAwareNamedFunctionCollection ();
+ }
+ };
+
+ // TODO verify fix: André
+ private final DoubleKeyCache<QualifiedName, Integer, DuplicateAwareNamedFunctionCollection> _bySimpleName = new DoubleKeyCache<QualifiedName, Integer, DuplicateAwareNamedFunctionCollection>() {
+ @Override
+ protected DuplicateAwareNamedFunctionCollection create(QualifiedName key1, Integer key2) {
return new DuplicateAwareNamedFunctionCollection ();
}
};
- private final DoubleKeyCache<String, List<BackendType>, Collection<Function>> _byParamTypes = new DoubleKeyCache<String, List<BackendType>, Collection<Function>>() {
+ private final DoubleKeyCache<QualifiedName, List<BackendType>, Collection<Function>> _byParamTypes = new DoubleKeyCache<QualifiedName, List<BackendType>, Collection<Function>>() {
@Override
- protected Collection<Function> create (String functionName, List<BackendType> paramTypes) {
+ protected Collection<Function> create (QualifiedName functionName, List<BackendType> paramTypes) {
return new PolymorphicResolver(functionName).getBestFitCandidates (findCandidates (functionName, paramTypes)); // TODO go around this cache if there is a dynamically provided function
}
- private Collection<Function> findCandidates (String functionName, List<BackendType> paramTypes) {
+ private Collection<Function> findCandidates (QualifiedName functionName, List<BackendType> paramTypes) {
final int paramCount = paramTypes.size();
final BackendType firstParamType = paramTypes.isEmpty() ? null : paramTypes.get(0);
@@ -69,10 +81,20 @@ public final class FunctionDefContextImpl implements FunctionDefContextInternal
}
// merge with registered functions
- for (NamedFunction f: _functions.get (functionName, paramCount).getFunctions())
- if (matchesParamTypes (f.getFunction(), paramTypes))
- result.register (f.getFunction());
-
+ if (functionName.getNameSpace() == null) {
+ for (NamedFunction f: _bySimpleName.get (functionName, paramCount).getFunctions()) {
+ if (matchesParamTypes (f.getFunction(), paramTypes)) {
+ result.register (f.getFunction());
+ }
+ }
+ } else {
+ // TODO check for overriding
+ for (NamedFunction f: _functions.get (functionName, paramCount).getFunctions()) {
+ if (matchesParamTypes (f.getFunction(), paramTypes)) {
+ result.register (f.getFunction());
+ }
+ }
+ }
return result.getFunctions();
}
@@ -95,16 +117,22 @@ public final class FunctionDefContextImpl implements FunctionDefContextInternal
if (isPublic)
_publicFunctions.register (f);
+ // TODO verify fix for simple names: André
+ final QualifiedName simpleName = new QualifiedName (f.getName().getSimpleName());
final NamedFunction old = _functions.get (f.getName(), f.getFunction().getParameterTypes().size()).register (f);
+ final NamedFunction simpleOld = _bySimpleName.get (simpleName, f.getFunction().getParameterTypes().size()).register (f);
if (old != null && old.getFunction().getParameterTypes().size() > 0)
_byFirstParameterType.get (old.getFunction().getParameterTypes().get (0)).remove (old);
+
+ if (simpleOld != null && simpleOld.getFunction().getParameterTypes().size() > 0)
+ _byFirstParameterType.get (simpleOld.getFunction().getParameterTypes().get (0)).remove (simpleOld);
if (f.getFunction().getParameterTypes().size() > 0)
_byFirstParameterType.get (f.getFunction().getParameterTypes().get(0)).add (f);
}
- public Object invoke (ExecutionContext ctx, String functionName, List<? extends Object> params) {
+ public Object invoke (ExecutionContext ctx, QualifiedName functionName, List<? extends Object> params) {
final Collection<Function> candidates = findFunctionCandidates (functionName, typesForParameters (ctx.getTypesystem(), params));
Function f = null;
@@ -114,8 +142,16 @@ public final class FunctionDefContextImpl implements FunctionDefContextInternal
catch (Exception exc) {
ErrorHandler.handle ("could not resolve function '" + functionName + "' for parameter types " + StringHelper.getTypesAsString (params) + " - candidates were " + candidates, exc);
}
-
- return ctx.getAdviceContext().getAdvice (functionName, f).evaluate(ctx, params);
+ QualifiedName name = null;
+ if (f instanceof NamedFunction) {
+ name = ((NamedFunction) f).getName();
+ } else if (f instanceof SourceDefinedFunction) {
+ name = ((SourceDefinedFunction) f).getName();
+ } else {
+ name = functionName;
+ }
+
+ return ctx.getAdviceContext().getAdvice (name, f).evaluate(ctx, params);
}
/**
@@ -132,7 +168,7 @@ public final class FunctionDefContextImpl implements FunctionDefContextInternal
/**
* is public only for testing purposes
*/
- public Collection<Function> findFunctionCandidates (String functionName, List<BackendType> paramTypes) {
+ public Collection<Function> findFunctionCandidates (QualifiedName functionName, List<BackendType> paramTypes) {
try {
return _byParamTypes.get (functionName, paramTypes);
} catch (RuntimeException e) {
@@ -150,7 +186,7 @@ public final class FunctionDefContextImpl implements FunctionDefContextInternal
return result;
}
- public Function getMatch (ExecutionContext ctx, String name, List<BackendType> params) {
+ public Function getMatch (ExecutionContext ctx, QualifiedName name, List<BackendType> params) {
final Collection<Function> candidates = findFunctionCandidates (name, params);
if (candidates.isEmpty())
return null;
@@ -160,7 +196,7 @@ public final class FunctionDefContextImpl implements FunctionDefContextInternal
return candidates.iterator().next();
}
- public boolean hasMatch (ExecutionContext ctx, String functionName, List<? extends Object> params) {
+ public boolean hasMatch (ExecutionContext ctx, QualifiedName functionName, List<? extends Object> params) {
return findFunctionCandidates (functionName, typesForParameters (ctx.getTypesystem(), params)).size() > 0;
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/internal/PolymorphicResolver.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/internal/PolymorphicResolver.java
index d2b7f141..e48bf55f 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/internal/PolymorphicResolver.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/functions/internal/PolymorphicResolver.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.functions.internal;
@@ -18,19 +19,21 @@ import java.util.List;
import org.eclipse.xtend.backend.common.ExecutionContext;
import org.eclipse.xtend.backend.common.Function;
+import org.eclipse.xtend.backend.common.QualifiedName;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class PolymorphicResolver {
- private final String _name; // only for error messages
+ private final QualifiedName _name; // only for error messages
/**
* @param functionName the name of the functions to be resolved - used for error messages
*/
- public PolymorphicResolver (String functionName) {
+ public PolymorphicResolver (QualifiedName functionName) {
_name = functionName;
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/syslib/ReflectionOperations.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/syslib/ReflectionOperations.java
index 8e118b19..defe114f 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/syslib/ReflectionOperations.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/syslib/ReflectionOperations.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.syslib;
@@ -16,6 +17,7 @@ import java.util.List;
import org.eclipse.xtend.backend.common.BackendType;
import org.eclipse.xtend.backend.common.Function;
import org.eclipse.xtend.backend.common.Property;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.common.StaticProperty;
import org.eclipse.xtend.middleend.javaannotations.AbstractExecutionContextAware;
@@ -24,6 +26,7 @@ import org.eclipse.xtend.middleend.javaannotations.AbstractExecutionContextAware
* This class provides the built-in operations for the Xtend reflection layer
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class ReflectionOperations extends AbstractExecutionContextAware {
@@ -51,7 +54,7 @@ public final class ReflectionOperations extends AbstractExecutionContextAware {
return t.getStaticProperties().get (name);
}
- public Function getOperation (BackendType t, String name, List<BackendType> paramTypes) {
+ public Function getOperation (BackendType t, QualifiedName name, List<BackendType> paramTypes) {
final List<BackendType> allParamTypes = new ArrayList<BackendType> ();
allParamTypes.add (t);
allParamTypes.addAll (paramTypes);
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/syslib/SysLibNames.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/syslib/SysLibNames.java
index 10abd2de..ed28a3f5 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/syslib/SysLibNames.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/syslib/SysLibNames.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.syslib;
@@ -16,6 +17,7 @@ import org.eclipse.xtend.backend.common.Helpers;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public interface SysLibNames {
// special function names
@@ -37,7 +39,7 @@ public interface SysLibNames {
String OPERATOR_DIV = "operatorDiv";
String OPERATOR_MOD = "operatorMod";
- String OPERATOR_EQUALS = Helpers.EQUALS_NAME;
+ String OPERATOR_EQUALS = Helpers.EQUALS_NAME.getSimpleName();
String OPERATOR_NOT_EQUALS = "operatorNotEquals";
String OPERATOR_LESS = "operatorLess";
String OPERATOR_LESS_OR_EQUALS = "operatorLessOrEquals";
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 8321c6ee..f7ab6524 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,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.types;
@@ -26,6 +27,7 @@ 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.Property;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.common.StaticProperty;
import org.eclipse.xtend.backend.types.builtin.ObjectType;
import org.eclipse.xtend.backend.types.builtin.VoidType;
@@ -36,6 +38,7 @@ import org.eclipse.xtend.backend.util.StringHelper;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public abstract class AbstractType implements BackendType {
private final String _name;
@@ -71,16 +74,16 @@ public abstract class AbstractType implements BackendType {
protected void register (Property p, BackendType type) {
_properties.put (p.getName(), p);
- register ("get" + StringHelper.firstUpper (p.getName()), new GetterOperation (p));
+ register (new QualifiedName ("get" + StringHelper.firstUpper (p.getName())), new GetterOperation (p));
if (p.isWritable())
- register ("set" + StringHelper.firstUpper (p.getName()), new SetterOperation (p, type));
+ register (new QualifiedName ("set" + StringHelper.firstUpper (p.getName())), new SetterOperation (p, type));
}
protected void register (StaticProperty p) {
_staticProperties.put (p.getName(), p);
}
- protected void register (String name, Function f) {
+ protected void register (QualifiedName name, Function f) {
_builtinOperations.add (new NamedFunction (name, f));
}
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 6834a77c..24c37a63 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,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.types.builtin;
@@ -18,12 +19,14 @@ import org.eclipse.xtend.backend.common.ExecutionContext;
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.QualifiedName;
import org.eclipse.xtend.backend.types.AbstractType;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class FunctionType extends AbstractType {
public static final FunctionType INSTANCE = new FunctionType ();
@@ -31,7 +34,7 @@ public final class FunctionType extends AbstractType {
private FunctionType () {
super ("Function", "{builtin}Function");
- register ("invoke", new Function () {
+ register (new QualifiedName ("invoke"), new Function () {
public List<BackendType> getParameterTypes() {
return Arrays.asList(new BackendType[] {FunctionType.INSTANCE, ListType.INSTANCE});
}
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 ebe849a9..fb44feac 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,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.types.builtin;
@@ -19,6 +20,7 @@ import org.eclipse.xtend.backend.common.ExecutionContext;
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.QualifiedName;
import org.eclipse.xtend.backend.types.AbstractProperty;
import org.eclipse.xtend.backend.types.AbstractType;
import org.eclipse.xtend.backend.util.ReflectionHelper;
@@ -28,6 +30,7 @@ import org.eclipse.xtend.backend.util.ReflectionHelper;
* This class represents the type of a type. It serves as an entry point for meta programming.
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class TypeType extends AbstractType {
public static final TypeType INSTANCE = new TypeType ();
@@ -58,7 +61,7 @@ public final class TypeType extends AbstractType {
}
}, CollectionType.INSTANCE);
- register ("getProperty", new Function () {
+ register (new QualifiedName ("getProperty"), new Function () {
final List<? extends BackendType> _paramTypes = Arrays.asList (TypeType.this, StringType.INSTANCE);
public ExpressionBase getGuard () {
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/emf/internal/EClassType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/emf/internal/EClassType.java
index 9b68e7a8..1ae3a228 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/emf/internal/EClassType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/emf/internal/EClassType.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.types.emf.internal;
@@ -27,6 +28,7 @@ import org.eclipse.xtend.backend.common.ExecutionContext;
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.QualifiedName;
import org.eclipse.xtend.backend.types.AbstractProperty;
import org.eclipse.xtend.backend.types.AbstractType;
import org.eclipse.xtend.backend.types.emf.EObjectType;
@@ -38,6 +40,7 @@ import org.eclipse.xtend.backend.util.ErrorHandler;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class EClassType extends AbstractType {
private final EClass _cls;
@@ -100,7 +103,7 @@ public final class EClassType extends AbstractType {
try {
final Method mtd = _cls.getInstanceClass().getMethod(op.getName(), paramClasses);
- register (op.getName(), new Function () {
+ register (new QualifiedName (op.getName()), new Function () {
public ExpressionBase getGuard () {
return null;
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/internal/FunctionBackedProperty.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/internal/FunctionBackedProperty.java
index d0d5d402..70efec4b 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/internal/FunctionBackedProperty.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/internal/FunctionBackedProperty.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.types.internal;
@@ -15,11 +16,13 @@ import java.util.Arrays;
import org.eclipse.xtend.backend.common.BackendType;
import org.eclipse.xtend.backend.common.ExecutionContext;
import org.eclipse.xtend.backend.common.Property;
+import org.eclipse.xtend.backend.common.QualifiedName;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class FunctionBackedProperty implements Property {
private final String _name;
@@ -38,11 +41,11 @@ public final class FunctionBackedProperty implements Property {
public Object get (ExecutionContext ctx, Object o) {
- return ctx.getFunctionDefContext().invoke (ctx, _getterName, Arrays.asList (o));
+ return ctx.getFunctionDefContext().invoke (ctx, new QualifiedName (_getterName), Arrays.asList (o));
}
public void set (ExecutionContext ctx, Object o, Object newValue) {
- ctx.getFunctionDefContext().invoke (ctx, _setterName, Arrays.asList (o, newValue));
+ ctx.getFunctionDefContext().invoke (ctx, new QualifiedName (_setterName), Arrays.asList (o, newValue));
}
public String getName () {
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/internal/SyntheticPropertyExtracter.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/internal/SyntheticPropertyExtracter.java
index 24b21c13..873d5dbb 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/internal/SyntheticPropertyExtracter.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/internal/SyntheticPropertyExtracter.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.types.internal;
@@ -29,6 +30,7 @@ import org.eclipse.xtend.backend.util.Pair;
* against Java Bean naming conventions.
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class SyntheticPropertyExtracter {
private final Cache<String, AccessorPair> _accessorPairs = new Cache<String, AccessorPair> () {
@@ -56,9 +58,9 @@ public final class SyntheticPropertyExtracter {
final boolean isSetter = propAcc.getFirst();
if (isSetter)
- ap._setterName = f.getName();
+ ap._setterName = f.getName().getSimpleName();
else
- ap._getterName = f.getName();
+ ap._getterName = f.getName().getSimpleName();
}
}
@@ -82,21 +84,21 @@ public final class SyntheticPropertyExtracter {
if (f.getFunction().getGuard() != null)
return null;
- if (hasPrefix (f.getName(), "set")) {
+ if (hasPrefix (f.getName().getSimpleName(), "set")) {
if (f.getFunction().getParameterTypes().size() != 2)
return null;
- return new Pair<Boolean, String> (true, f.getName().substring (3));
+ return new Pair<Boolean, String> (true, f.getName().getSimpleName().substring (3));
}
if (f.getFunction().getParameterTypes().size() != 1)
return null;
- if (hasPrefix (f.getName(), "get") || hasPrefix (f.getName(), "has"))
- return new Pair<Boolean, String> (false, f.getName().substring (3));
+ if (hasPrefix (f.getName().getSimpleName(), "get") || hasPrefix (f.getName().getSimpleName(), "has"))
+ return new Pair<Boolean, String> (false, f.getName().getSimpleName().substring (3));
- if (hasPrefix (f.getName(), "is"))
- return new Pair<Boolean, String> (false, f.getName().substring (2));
+ if (hasPrefix (f.getName().getSimpleName(), "is"))
+ return new Pair<Boolean, String> (false, f.getName().getSimpleName().substring (2));
return null;
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/java/internal/JavaBeansType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/java/internal/JavaBeansType.java
index 04538ab5..e7035331 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/java/internal/JavaBeansType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/java/internal/JavaBeansType.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.types.java.internal;
@@ -15,10 +16,12 @@ import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.List;
import org.eclipse.xtend.backend.common.BackendType;
import org.eclipse.xtend.backend.common.BackendTypesystem;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.functions.java.internal.JavaBuiltinConverterFactory;
import org.eclipse.xtend.backend.types.AbstractType;
import org.eclipse.xtend.backend.util.ErrorHandler;
@@ -27,6 +30,7 @@ import org.eclipse.xtend.backend.util.ErrorHandler;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class JavaBeansType extends AbstractType {
private final Class<?> _javaClass;
@@ -38,7 +42,7 @@ public final class JavaBeansType extends AbstractType {
}
private static BackendType[] superTypes (Class<?> javaCls, BackendTypesystem ts) {
- final List<Class<?>> resultRaw = new ArrayList<Class<?>> (Arrays.asList (javaCls.getInterfaces()));
+ final List<Class<?>> resultRaw = new ArrayList<Class<?>> ((Collection<? extends Class<?>>) Arrays.asList (javaCls.getInterfaces())); //final List<Class<?>> resultRaw = new ArrayList<Class<?>> (Arrays.asList (javaCls.getInterfaces()));
Class<?> superClass = javaCls.getSuperclass();
if (superClass != null)
@@ -67,7 +71,7 @@ public final class JavaBeansType extends AbstractType {
paramTypes.add (ts.getRootTypesystem().findType(cls));
}
- register (mtd.getName(), new JavaOperation (mtd, paramTypes, null));
+ register (new QualifiedName (mtd.getName()), new JavaOperation (mtd, paramTypes, null));
}
// static properties
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Base64Codec.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Base64Codec.java
new file mode 100644
index 00000000..7482d935
--- /dev/null
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/Base64Codec.java
@@ -0,0 +1,280 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007, 2009 committers of openArchitectureWare and others.
+ * 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:
+ * committers of openArchitectureWare - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.xtend.backend.util;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FilterOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+/**
+ * Port of org.eclipse.internal.xpand2.pr.util.BASE64 to the backend
+ *
+ * @author André Arnold
+ *
+ */
+public class Base64Codec {
+ /**
+ * Creates an <tt>OutputStream</tt> that writes base64 encoded bytes to
+ * the given <tt>OutputStream</tt>.
+ *
+ * It writes a line separator every 54 bytes.
+ *
+ * @param out
+ * <tt>OutputStream</tt> to write to.
+ *
+ * @return BASE64 encoding OutputStream
+ */
+ public static OutputStream createOutputStream(final OutputStream out) {
+ return new BASE64OutputStream(out);
+ }
+
+ /**
+ * Creates an <tt>OutputStream</tt> that writes base64 encoded bytes to
+ * the given <tt>OutputStream</tt>
+ *
+ * @param out
+ * <tt>OutputStream</tt> to write to.
+ * @param linebreak
+ * iff true write a line separator every 54 bytes.
+ *
+ * @return BASE64 encoding OutputStream
+ */
+ public static OutputStream createOutputStream(final OutputStream out, final boolean linebreak) {
+ return new BASE64OutputStream(out, linebreak);
+ }
+
+ public static String toString(final String raw) throws IOException {
+ return toString(raw.getBytes());
+ }
+
+ public static String toString(final byte[] raw) throws IOException {
+ final ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ final OutputStream os = new BASE64OutputStream(bos, false);
+ final InputStream is = new ByteArrayInputStream(raw);
+
+ int c = 0;
+ while ((c = is.read()) != -1) {
+ os.write(c);
+ }
+ is.close();
+ os.close();
+
+ return new String(bos.toByteArray());
+ }
+
+ public static byte[] toByteArray(final String b64) throws IOException {
+ final ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ final InputStream is = new BASE64InputStream(new ByteArrayInputStream(b64.getBytes()));
+
+ int c = 0;
+ while ((c = is.read()) != -1) {
+ bos.write(c);
+ }
+
+ is.close();
+ bos.close();
+
+ return bos.toByteArray();
+ }
+
+ private static class BASE64OutputStream extends FilterOutputStream {
+ public BASE64OutputStream(final OutputStream out) {
+ this(out, true);
+ }
+
+ public BASE64OutputStream(final OutputStream out, final boolean linebreak) {
+ super(out);
+ this.linebreak = linebreak;
+ }
+
+ // Close the stream.
+ @Override
+ public void close() throws IOException {
+ // write padding and buffered bytes
+ // System.out.println("CLOSE: "+Integer.toString(stack,2));
+ switch (pos % 3) {
+ case 0:
+ break;
+
+ case 1:
+ out.write(base64[(stack >> 18) & 0x3F]); // 18-23
+ out.write(base64[(stack >> 12) & 0x3F]); // 12-17
+ out.write(padding);
+ out.write(padding);
+ break;
+ case 2:
+ out.write(base64[(stack >> 18) & 0x3F]); // 18-23
+ out.write(base64[(stack >> 12) & 0x3F]); // 12-17
+ out.write(base64[(stack >> 6) & 0x3F]); // 6-11
+ out.write(padding);
+
+ break;
+ }
+ stack = 0;
+ pos = 0;
+
+ super.close();
+ }
+
+ private int pos = 0;
+
+ private int stack = 0;
+
+ private boolean linebreak = false;
+
+ // Writes the specified byte to this output stream.
+ @Override
+ public void write(final int c) throws IOException {
+ // DEBUG System.out.println("WRITEB64: "+c+"
+ // ("+pos+","+Integer.toString(c,2)+","+(byte) c+")");
+ switch (pos % 3) {
+ case 0:
+ // 0-7
+ stack |= (c << 16) & 0xFF0000;
+ // DEBUG System.out.println("WRITEB64 STACK: "+stack);
+ break;
+ case 1:
+ // 8-15
+ stack |= (c << 8) & 0x00FF00;
+ // DEBUG System.out.println("WRITEB64 STACK: "+stack);
+ break;
+ case 2:
+ // 16-23
+ stack |= (c << 0) & 0x0000FF;
+
+ // DEBUG System.out.println("WRITEB64 STACK: "+stack+
+ // "("+Integer.toString(stack,2)+")");
+ // DEBUG System.out.println("WRITEB64: WRITING!");
+ // write
+ out.write(base64[(stack >> 18) & 0x3F]); // 18-23
+ out.write(base64[(stack >> 12) & 0x3F]); // 12-17
+ out.write(base64[(stack >> 6) & 0x3F]); // 6-11
+ out.write(base64[(stack >> 0) & 0x3F]); // 0-5
+ // reset stack after writing
+ stack = 0;
+ break;
+ }
+
+ // don't let pos increase to much. In fact we only need to know
+ // if we have just written a chunk of 54 original bytes for line
+ // breaking
+ pos = (pos + 1) % 54;
+
+ if (linebreak && pos == 0) {
+ out.write(System.getProperty("line.separator").getBytes());
+ }
+
+ }
+
+ }
+
+ private static final int[] base64 = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
+ 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
+ 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4',
+ '5', '6', '7', '8', '9', '+', '/' };
+
+ private static final int padding = '=';
+
+ private static final int[] bin64 = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1,
+ -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, 64, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
+
+ private static class BASE64InputStream extends InputStream {
+ public BASE64InputStream(final InputStream in) {
+ this.in = in;
+ }
+
+ private InputStream in;
+
+ // pos is the current position (mod 3)
+ private int pos = 0;
+
+ // keeps 3 current bytes and returns it on read()
+ private int stack = 0;
+
+ private int eof = -1;
+
+ private int readAndSkipNonBase64() throws IOException {
+ int c;
+ while ((c = in.read()) != -1) {
+ if (bin64[c] != -1)
+ return c;
+ }
+ return c;
+ }
+
+ // Reads the next byte of data from this input stream.
+ // TODO: think about abort condition (eof != -1)
+ @Override
+ public int read() throws IOException {
+ // System.out.println("READ
+ // (eof="+eof+",pos="+pos+",stack="+Integer.toString(stack,2)+")");
+ if (eof == -1 && pos == 0) {
+ // read new chunk
+ stack = 0;
+
+ int count = 0;
+ int c = 0;
+ while (count != 4 && (c = readAndSkipNonBase64()) != -1) {
+ if (c == padding) {
+ if (eof == -1) {
+ eof = count;
+ }
+ count++;
+ continue;
+ }
+ if (bin64[c] != -1) {
+ stack |= (bin64[c] & 0x3F) << (18 - count * 6);
+ count++;
+ }
+ }
+ // System.out.println("READ AFTER CHUNK
+ // (eof="+eof+",pos="+pos+",stack="+Integer.toString(stack,2)+","+count+")");
+ if (count == 0) {
+ eof = 0;
+ } else {
+ if (count != 4)
+ throw new IOException("Invalid base64 data. Found chunk of size " + count);
+ }
+ }
+ if (eof == 0)
+ return -1;
+ if (eof == 1)
+ return -1;
+ if (eof == 2 && pos > 0)
+ return -1;
+ if (eof == 3 && pos > 1)
+ return -1;
+ // return pos'th byte from stack
+ final int ret = (stack >> (16 - pos * 8)) & 0xFF;
+ pos = (pos + 1) % 3;
+ return ret;
+ }
+
+ // Closes this input stream and releases any system resources
+ @Override
+ public void close() throws IOException {
+ in.close();
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/FileHelper.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/FileHelper.java
new file mode 100644
index 00000000..d28bf4ed
--- /dev/null
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/FileHelper.java
@@ -0,0 +1,211 @@
+/*******************************************************************************
+ * Copyright (c) 005, 2007, 2008 committers of openArchitectureWare and others.
+ * 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:
+ * committers of openArchitectureWare - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.xtend.backend.util;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.xtend.backend.common.EfficientLazyString;
+
+/**
+ * Ported from org.eclipse.internal.xpand2.pr.util.FSIO to the backend
+ * @author André Arnold
+ */
+public class FileHelper {
+
+ private static final char[] FILE_DELIMITER = { '\\', '/' };
+
+ private static int _cvNumerOfFilesRead = 1;
+
+ private static int _cvSize = 2000;
+
+ private static void getAllFilesInternal(final File aPath,
+ final FilenameFilter filter, final List<File> fileList) {
+ final File[] allFiles = aPath.listFiles (filter);
+ for (int i = 0; i < allFiles.length; i++) {
+ if (allFiles[i].isDirectory ())
+ getAllFilesInternal (allFiles[i], filter, fileList);
+ else
+ fileList.add (allFiles[i]);
+ }
+ }
+
+ public static String read (final String filename) throws IOException {
+ if (filename == null)
+ throw new IllegalArgumentException(
+ "Fileparameter should not be null!");
+ return read (new File(filename), null);
+ }
+
+ public static String read (final String filename, final String encoding) throws IOException {
+ if (filename == null)
+ throw new IllegalArgumentException(
+ "Fileparameter should not be null!");
+ return read (new File(filename), encoding);
+ }
+
+ public static String read (final File file, final String encoding) throws IOException {
+ if (file == null)
+ throw new IllegalArgumentException(
+ "Fileparameter should not be null!");
+
+ if (!file.isFile ())
+ throw new IOException(file.getPath() + " is not a file!");
+ if (!file.canRead ())
+ throw new IOException(file.getPath() + " is not a readable!");
+
+ final StringBuffer body = new StringBuffer ();
+ Reader fileReader = null;
+ {
+ if (encoding == null) {
+ fileReader = new FileReader (file);
+ } else {
+ fileReader = new InputStreamReader (new FileInputStream(file),
+ encoding);
+ }
+ }
+ final int size = (int) Math.floor ((double) _cvSize
+ / (double) _cvNumerOfFilesRead);
+ _cvNumerOfFilesRead++;
+ final char[] chars = new char[size];
+ int len;
+ while ((len = fileReader.read (chars)) != -1) {
+ _cvSize += len;
+ body.append(chars, 0, len);
+ }
+ fileReader.close();
+
+ return body.toString();
+ }
+
+ /**
+ *
+ * @param reader
+ * @return
+ * @throws IOException
+ */
+ public static String read (final Reader reader) throws IOException {
+ if (reader == null)
+ throw new IllegalArgumentException("Reader must not be null!");
+
+ final StringBuffer aString = new StringBuffer();
+
+ final int size = (int) Math.floor ((double) _cvSize
+ / (double) _cvNumerOfFilesRead);
+ _cvNumerOfFilesRead++;
+ final char[] chars = new char[size];
+ int len;
+ while ((len = reader.read (chars)) != -1) {
+ _cvSize += len;
+ aString.append (chars, 0, len);
+ }
+ reader.close();
+
+ return aString.toString();
+ }
+
+ /**
+ *
+ * @param writer
+ * @param text
+ * @throws IOException
+ */
+ public static void write (final Writer writer, EfficientLazyString text)
+ throws IOException {
+ if (writer == null)
+ throw new IllegalArgumentException("Writer must not be null!");
+
+ StringReader reader = new StringReader (text.toString());
+ write (writer, reader);
+ }
+
+ /**
+ *
+ * @param writer
+ * @param text
+ * @throws IOException
+ */
+ public static void write (final Writer writer, CharSequence text)
+ throws IOException {
+ if (writer == null)
+ throw new IllegalArgumentException ("Writer must not be null!");
+
+ StringReader reader = new StringReader (text.toString());
+ write (writer, reader);
+ }
+
+ /**
+ *
+ * @param writer
+ * @param text
+ * @throws IOException
+ */
+ public static void write (String path, CharSequence text)
+ throws IOException {
+ if (path == null)
+ throw new IllegalArgumentException ("path must not be null!");
+ Writer writer = new FileWriter (new File (path));
+ StringReader reader = new StringReader (text.toString());
+ write (writer, reader);
+ }
+
+ /**
+ *
+ * @param writer
+ * @param text
+ * @throws IOException
+ */
+ public static void write (final Writer writer, Reader reader)
+ throws IOException {
+ if (writer == null)
+ throw new IllegalArgumentException("Writer must not be null!");
+
+ final char[] chars = new char[4096];
+ int len;
+ while ((len = reader.read (chars)) != -1) {
+ _cvSize += len;
+ writer.write(chars, 0, len);
+ }
+ reader.close ();
+ writer.close ();
+ }
+
+ public static File[] getAllFiles (final File file, final FilenameFilter filter) throws IOException {
+ if (!file.isDirectory())
+ throw new IOException(file.getPath() + " is not a directory!");
+ final List<File> returnList = new ArrayList<File>();
+ getAllFilesInternal(file, filter, returnList);
+ return returnList.toArray(new File[returnList.size()]);
+ }
+
+ public static File[] getAllFilesInHierarchy (final String basePath, final FilenameFilter filter) throws IOException {
+ return getAllFiles(new File(basePath), filter);
+ }
+
+ public static String normalizePath (String filename) {
+ for (int i = 0; i < FILE_DELIMITER.length; i++) {
+ filename = filename
+ .replace(FILE_DELIMITER[i], File.separatorChar);
+ }
+ return filename;
+ }
+
+}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/GenericFileFilter.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/GenericFileFilter.java
new file mode 100644
index 00000000..467c9bd5
--- /dev/null
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/util/GenericFileFilter.java
@@ -0,0 +1,177 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007, 2009 committers of openArchitectureWare and others.
+ * 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:
+ * committers of openArchitectureWare - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.xtend.backend.util;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FilenameFilter;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Configurable FilenameFilter. By default this filter does not accept well known files or directories
+ * managed by source control systems and temporary files.
+ *
+ * Ported from org.eclipse.internal.xpand2.pr.util.GenericFileFile to the backend
+ *
+ * @see http://www.cvshome.org/docs/manual/cvs-1.11.10/cvs_18.html#SEC156
+ */
+public class GenericFileFilter implements FilenameFilter {
+ private final Log log = LogFactory.getLog(getClass());
+
+ // ignore list vom CVS and SVN.
+ public final static String DEFAULTIGNORELIST =
+ ".svn "
+ + "RCS SCCS CVS CVS.adm RCSLOG cvslog.* "
+ + "tags TAGS .make.state .nse_depinfo "
+ + "*~ #* .#* ,* _$* *$ "
+ + "*.old *.bak *.BAK *.orig *.rej .del-* "
+ + "*.a *.olb *.o *.obj *.so *.exe "
+ + "*.Z *.elc *.ln " + "core "
+ ;
+
+ private String ivIgnoreList;
+
+ private List<GlobbingFileFilter> fileFilters = null;
+
+ /**
+ *
+ * @param aIgnoreList List of file patterns to ignore. This list can be comma-separated or space-separated.
+ * Note that file patterns containing commas can't be handled, since they will be recognized as two separated patterns.
+ * @param aDefaultexcludes <code>true</code> use the default exclude list.
+ */
+ public GenericFileFilter(final String aIgnoreList, final boolean aDefaultexcludes) {
+ ivIgnoreList = aDefaultexcludes ? DEFAULTIGNORELIST : "";
+ if (aIgnoreList != null) {
+ ivIgnoreList += aIgnoreList.replaceAll(",", " ");
+ }
+ fileFilters = buildFileFilters(ivIgnoreList);
+ }
+
+ public GenericFileFilter(final String aIgnoreList) {
+ this(aIgnoreList, false);
+ }
+
+ /**
+ * Creates the Filter with default excludes.
+ */
+ public GenericFileFilter() {
+ this(null);
+ }
+
+ /**
+ * Accept all files and directories not included in the ignore list.
+ * @param dir Directory to search in for a file
+ * @param name File name to check
+ * @return <code>true</code> when the file is accepted by the filter.
+ */
+ public boolean accept(final File dir, final String name) {
+ return accept(new File(dir, name));
+ }
+
+ /**
+ * Accept all files and directories not included in the ignore list.
+ * @param file File to check
+ * @return <code>true</code> when the file is accepted by the filter.
+ */
+ public boolean accept(final File file) {
+ if (!file.isFile() && !file.isDirectory())
+ return false;
+
+ for (final Iterator<GlobbingFileFilter> iter = fileFilters.iterator(); iter.hasNext();) {
+ final FileFilter ffilter = iter.next();
+ if (ffilter.accept(file)) {
+ if (log.isDebugEnabled()) {
+ log.debug("File " + file + " excluded (pattern: " + ffilter + ").");
+ }
+ return false;
+ }
+ }
+ if (log.isDebugEnabled()) {
+ log.debug("File " + file + " included.");
+ }
+
+ return true;
+ }
+
+ private List<GlobbingFileFilter> buildFileFilters(final String aIgnoreList) {
+ final List<GlobbingFileFilter> fileFilters = new ArrayList<GlobbingFileFilter>();
+ for (final StringTokenizer st = new StringTokenizer(aIgnoreList); st.hasMoreTokens();) {
+ final String pattern = st.nextToken().trim();
+ fileFilters.add(new GlobbingFileFilter(pattern));
+ }
+ return fileFilters;
+ }
+
+ /**
+ * File filter that accepts wildcards.
+ */
+ private static class GlobbingFileFilter implements FileFilter {
+ private String globvalue;
+
+ /**
+ * Creates a globbing file filter.
+ * @param globvalue a filename pattern
+ * @throws IllegalArgumentException The file pattern is invalid. Not accepted are the following situations:
+ * <ol>
+ * <li>The pattern contains multiple wildcards (e.g. <tt>'*test*.xml'</tt>)
+ * <li>The pattern has a wildcard in the middle (e.g. <tt>'test*.xml'</tt>)
+ * </ol>
+ */
+ public GlobbingFileFilter(final String globvalue) throws IllegalArgumentException {
+ final int pos = globvalue.indexOf("*");
+ if (pos>=0) {
+ if (pos != globvalue.lastIndexOf("*")) {
+ throw new IllegalArgumentException("GlobbingFileFilter does not support multiple stars (" + globvalue
+ + ").");
+ } else if (pos > 0 && pos < (globvalue.length() - 1)) {
+ throw new IllegalArgumentException("GlobbingFileFilter does not support stars in the middle (" + globvalue
+ + ").");
+ }
+ }
+ this.globvalue = globvalue;
+ }
+
+ /**
+ * @param pathname A file to check this filter against
+ * @return <code>true</code> if the filter accepts this file, <code>false</code> if it is rejected.
+ * @see FileFilter#accept(File)
+ */
+ public boolean accept(final File pathname) {
+ final int pos = globvalue.indexOf("*");
+ if (pos == -1) {
+ // no wildcard
+ return pathname.getName().equals(globvalue);
+ } else if (pos == 0) {
+ return pathname.getName().endsWith(globvalue.substring(pos + 1));
+ } else {
+ // must be 'pos == (globvalue.length() - 1)', since other situations already detected in constuctor
+ return pathname.getName().startsWith(globvalue.substring(0, pos));
+ }
+ }
+
+ @Override
+ public String toString() {
+ return globvalue;
+ }
+ }
+
+ @Override
+ public String toString() {
+ return ivIgnoreList.replaceAll("\\s+", ", ");
+ }
+}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/middleend/javaannotations/JavaFunctionClassContributor.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/middleend/javaannotations/JavaFunctionClassContributor.java
index f13cd07e..a0c07c8f 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/middleend/javaannotations/JavaFunctionClassContributor.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/middleend/javaannotations/JavaFunctionClassContributor.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.javaannotations;
@@ -16,6 +17,8 @@ import java.lang.reflect.Modifier;
import org.eclipse.emf.mwe.core.resources.ResourceLoader;
import org.eclipse.emf.mwe.core.resources.ResourceLoaderFactory;
import org.eclipse.xtend.backend.common.NamedFunction;
+import org.eclipse.xtend.backend.common.QualifiedName;
+import org.eclipse.xtend.backend.common.SyntaxConstants;
import org.eclipse.xtend.middleend.MiddleEnd;
import org.eclipse.xtend.middleend.javaannotations.internal.JavaDefinedFunction;
import org.eclipse.xtend.middleend.plugins.LanguageSpecificMiddleEnd;
@@ -28,6 +31,7 @@ import org.eclipse.xtend.middleend.plugins.ParsedResource;
* For more global sharing of the instance, Contributor instances must be shared.
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class JavaFunctionClassContributor implements LanguageSpecificMiddleEnd {
public static final String MIDDLE_END_NAME = "JavaAnnotations";
@@ -78,7 +82,11 @@ public final class JavaFunctionClassContributor implements LanguageSpecificMiddl
continue;
final boolean isPublicFunction = (mtd.getAnnotation (M2tPrivateFunction.class) == null);
- final NamedFunction f = new NamedFunction (mtd.getName(), new JavaDefinedFunction (mtd, null, _middleEnd.getTypesystem()));
+ final QualifiedName functionName = (mtd.getAnnotation (M2tQualifiedName.class) != null) ?
+ new QualifiedName (cls.getCanonicalName().replaceAll(".", SyntaxConstants.NS_DELIM), mtd.getName())
+ :
+ new QualifiedName (mtd.getName());
+ final NamedFunction f = new NamedFunction (functionName, new JavaDefinedFunction (mtd, null, _middleEnd.getTypesystem()));
if (isPublicFunction)
result.getPublicFunctions().add (f);
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/middleend/javaannotations/M2tQualifiedName.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/middleend/javaannotations/M2tQualifiedName.java
new file mode 100644
index 00000000..aa46bc96
--- /dev/null
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/middleend/javaannotations/M2tQualifiedName.java
@@ -0,0 +1,28 @@
+/*
+Copyright (c) 2009 André Arnold.
+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:
+ André Arnold - initial API and implementation
+ */
+package org.eclipse.xtend.middleend.javaannotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Methods marked with this annotation us fully qualified names.
+ *
+ * @author aarnold
+ *
+ */
+@Retention (RetentionPolicy.RUNTIME)
+@Target (ElementType.METHOD)
+public @interface M2tQualifiedName {
+
+}
diff --git a/plugins/org.eclipse.xtend.middleend.xpand/META-INF/MANIFEST.MF b/plugins/org.eclipse.xtend.middleend.xpand/META-INF/MANIFEST.MF
index 6650b49b..92d4934b 100644
--- a/plugins/org.eclipse.xtend.middleend.xpand/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.xtend.middleend.xpand/META-INF/MANIFEST.MF
@@ -5,6 +5,7 @@ Bundle-SymbolicName: org.eclipse.xtend.middleend.xpand;singleton:=true
Bundle-Version: 1.0.0
Export-Package: org.eclipse.xtend.middleend.xpand,
org.eclipse.xtend.middleend.xpand.internal;x-internal:=true,
+ org.eclipse.xtend.middleend.xpand.internal.xpandlib.pr;x-internal:=true,
org.eclipse.xtend.middleend.xpand.plugin
Require-Bundle: org.eclipse.xpand,
org.eclipse.xtend,
diff --git a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/OldXpandRegistry.java b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/OldXpandRegistry.java
index 6726fd33..459c8bae 100644
--- a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/OldXpandRegistry.java
+++ b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/OldXpandRegistry.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xpand;
@@ -26,6 +27,7 @@ import org.eclipse.xtend.middleend.plugins.ImportedResource;
import org.eclipse.xtend.middleend.plugins.LanguageSpecificMiddleEnd;
import org.eclipse.xtend.middleend.plugins.ParsedResource;
import org.eclipse.xtend.middleend.xpand.internal.OldDefinitionConverter;
+import org.eclipse.xtend.middleend.xpand.internal.xpandlib.XpandLibContributor;
import org.eclipse.xtend.middleend.xpand.plugin.XpandDefinitionName;
import org.eclipse.xtend.middleend.xtend.internal.OldHelper;
import org.eclipse.xtend.middleend.xtend.internal.TypeToBackendType;
@@ -36,6 +38,7 @@ import org.eclipse.xtend.middleend.xtend.internal.xtendlib.XtendLibContributor;
* 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)
+ * @author André Arnold
*/
public final class OldXpandRegistry implements LanguageSpecificMiddleEnd {
private final XpandExecutionContext _ctx;
@@ -91,6 +94,10 @@ public final class OldXpandRegistry implements LanguageSpecificMiddleEnd {
for (NamedFunction f: new XtendLibContributor (_middleEnd).getContributedFunctions())
result.getPrivateFunctions().add (f);
+ // register the XpandLib
+ for (NamedFunction f: new XpandLibContributor (_middleEnd).getContributedFunctions())
+ result.getPrivateFunctions().add (f);
+
final Set<XpandDefinitionName> referenced = new HashSet<XpandDefinitionName> ();
for (XpandDefinition ext: file.getDefinitions ())
diff --git a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/XpandBackendFacade.java b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/XpandBackendFacade.java
index a39aa5e7..4beeaf27 100644
--- a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/XpandBackendFacade.java
+++ b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/XpandBackendFacade.java
@@ -1,3 +1,14 @@
+/*
+Copyright (c) 2008 Arno Haase, André Arnold.
+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
+ André Arnold
+ */
package org.eclipse.xtend.middleend.xpand;
@@ -24,11 +35,11 @@ import org.eclipse.xpand2.output.Outlet;
import org.eclipse.xpand2.output.Output;
import org.eclipse.xpand2.output.OutputImpl;
import org.eclipse.xpand2.output.PostProcessor;
-import org.eclipse.xtend.backend.BackendFacade;
import org.eclipse.xtend.backend.common.ExecutionContext;
import org.eclipse.xtend.backend.common.ExpressionBase;
import org.eclipse.xtend.backend.common.FunctionDefContext;
import org.eclipse.xtend.backend.common.NamedFunction;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.functions.FunctionDefContextInternal;
import org.eclipse.xtend.backend.syslib.FileIoOperations;
import org.eclipse.xtend.backend.syslib.FileOutlet;
@@ -40,6 +51,7 @@ import org.eclipse.xtend.middleend.MiddleEnd;
import org.eclipse.xtend.middleend.MiddleEndFactory;
import org.eclipse.xtend.middleend.xpand.internal.OldDefinitionConverter;
import org.eclipse.xtend.middleend.xpand.internal.OldXpandRegistryFactory;
+import org.eclipse.xtend.middleend.xpand.internal.xpandlib.pr.XpandProtectedRegionResolver;
import org.eclipse.xtend.middleend.xpand.plugin.XpandDefinitionName;
import org.eclipse.xtend.middleend.xtend.internal.OldHelper;
import org.eclipse.xtend.middleend.xtend.internal.TypeToBackendType;
@@ -50,9 +62,10 @@ import org.eclipse.xtend.typesystem.MetaModel;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class XpandBackendFacade {
- private final String _xpandFile;
+ private final String _xpandFile;
private final MiddleEnd _middleEnd;
private final String _fileEncoding;
@@ -71,8 +84,8 @@ public final class XpandBackendFacade {
*
* Both the "variables" and "outlets" parameter may be null.
*/
- public static Object executeStatement (String code, Collection<MetaModel> mms, Map<String, Object> variables, Collection <Outlet> outlets) {
- return executeStatement (code, null, mms, variables, outlets);
+ public static Object executeStatement (String code, Collection<MetaModel> mms, Map<String, Object> variables, Collection <Outlet> outlets, XpandProtectedRegionResolver resolver) {
+ return executeStatement (code, null, mms, variables, outlets, resolver);
}
/**
@@ -87,8 +100,8 @@ public final class XpandBackendFacade {
*
* Both the "variables" and "outlets" parameter may be null.
*/
- public static Object executeStatement (String code, String fileEncoding, Collection<MetaModel> mms, Map<String, Object> variables, Collection <Outlet> outlets) {
- return executeStatement (code, fileEncoding, mms, variables, outlets, null);
+ public static Object executeStatement (String code, String fileEncoding, Collection<MetaModel> mms, Map<String, Object> variables, Collection <Outlet> outlets, XpandProtectedRegionResolver resolver) {
+ return executeStatement (code, fileEncoding, mms, variables, outlets, null, resolver);
}
/**
@@ -103,12 +116,12 @@ public final class XpandBackendFacade {
*
* The "variables", "outlets" and "advice" parameter may be null.
*/
- public static Object executeStatement (String code, String fileEncoding, Collection<MetaModel> mms, Map<String, Object> variables, Collection <Outlet> outlets, List<String> advice) {
- return createForFile (null, fileEncoding, mms, outlets).executeStatement (code, variables, advice);
+ public static Object executeStatement (String code, String fileEncoding, Collection<MetaModel> mms, Map<String, Object> variables, Collection <Outlet> outlets, List<String> advice, XpandProtectedRegionResolver resolver) {
+ return createForFile (null, fileEncoding, mms, outlets).executeStatement (code, variables, advice, resolver);
}
- public Object executeStatement (String code, Map<String, Object> variables, List<String> advice) {
+ public Object executeStatement (String code, Map<String, Object> variables, List<String> advice, XpandProtectedRegionResolver resolver) {
if (variables == null)
variables = new HashMap<String, Object> ();
if (advice == null)
@@ -117,7 +130,7 @@ public final class XpandBackendFacade {
for (String adv: advice)
_middleEnd.applyAdvice (adv);
- final Template tpl = XpandParseFacade.file (new StringReader (XpandTokens.LT + "DEFINE dUmMy FOR dUmMy" + XpandTokens.RT + code + XpandTokens.RT + XpandTokens.LT + "ENDDEFINE" + XpandTokens.RT), null);
+ final Template tpl = XpandParseFacade.file (new StringReader (XpandTokens.LT + "DEFINE dUmMy FOR dUmMy" + XpandTokens.RT + code + XpandTokens.LT + "ENDDEFINE" + XpandTokens.RT), null);
final Statement[] statements = ((Definition) tpl.getDefinitions()[0]).getBody();
XpandExecutionContext ctx = createXpandExecutionContext (_fileEncoding, _mms, _outlets);
@@ -134,11 +147,13 @@ public final class XpandBackendFacade {
for (NamedFunction f: _middleEnd.getFunctions (xdn.getCanonicalTemplateFileName ()).getPublicFunctions())
fdc.register (f, false);
- final ExecutionContext backendCtx = BackendFacade.createExecutionContext (fdc, _middleEnd.getTypesystem(), true); //TODO configure isLogStacktrace
- backendCtx.getLocalVarContext().getLocalVars().putAll (variables);
- registerOutlets (backendCtx, _outlets);
-
- return converted.evaluate (backendCtx);
+ _middleEnd.getExecutionContext().setFunctionDefContext (fdc);
+ //TODO configure isLogStacktrace
+ _middleEnd.getExecutionContext().getLocalVarContext().getLocalVars().putAll (variables);
+ registerOutlets (_middleEnd.getExecutionContext(), _outlets);
+ registerProtectedRegionResolver(_middleEnd.getExecutionContext(), resolver);
+
+ return converted.evaluate (_middleEnd.getExecutionContext());
}
public static void registerOutlets (ExecutionContext ctx, Collection<Outlet> outlets) {
@@ -156,10 +171,15 @@ public final class XpandBackendFacade {
}
final String outletName = (oldOutlet.getName() != null) ? oldOutlet.getName() : FileIoOperations.DEFAULT_OUTLET_NAME;
- ctx.getFunctionDefContext ().invoke (ctx, SysLibNames.REGISTER_OUTLET, Arrays.asList (outletName, newOutlet));
+ ctx.getFunctionDefContext ().invoke (ctx, new QualifiedName (SysLibNames.REGISTER_OUTLET), Arrays.asList (outletName, newOutlet));
}
}
+ public static void registerProtectedRegionResolver (ExecutionContext ctx, XpandProtectedRegionResolver resolver) {
+ if (resolver != null)
+ ctx.getContributionStateContext ().storeState (XpandProtectedRegionResolver.XPAND_PROTECTED_REGION_RESOLVER, resolver);
+ }
+
private static class InMemoryPpAdapter implements InMemoryPostprocessor {
private final PostProcessor _oldPp;
private final Outlet _outlet;
diff --git a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/XpandComponent.java b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/XpandComponent.java
index 25b02b94..75e16f83 100644
--- a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/XpandComponent.java
+++ b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/XpandComponent.java
@@ -1,13 +1,28 @@
+/*
+Copyright (c) 2008 Arno Haase, André Arnold.
+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
+ André Arnold
+ */
package org.eclipse.xtend.middleend.xpand;
+import java.io.File;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.eclipse.emf.mwe.core.WorkflowContext;
import org.eclipse.emf.mwe.core.issues.Issues;
import org.eclipse.emf.mwe.core.monitor.ProgressMonitor;
@@ -18,11 +33,13 @@ import org.eclipse.internal.xpand2.codeassist.XpandTokens;
import org.eclipse.internal.xpand2.parser.XpandParseFacade;
import org.eclipse.internal.xtend.xtend.parser.ParseException;
import org.eclipse.xpand2.XpandExecutionContextImpl;
+import org.eclipse.xpand2.XpandUtil;
import org.eclipse.xpand2.output.Outlet;
import org.eclipse.xpand2.output.Output;
import org.eclipse.xpand2.output.OutputImpl;
import org.eclipse.xpand2.output.PostProcessor;
import org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflowComponent;
+import org.eclipse.xtend.middleend.xpand.internal.xpandlib.pr.XpandProtectedRegionResolver;
/**
@@ -30,6 +47,7 @@ import org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflowComponent;
* combines the steps of parsing and transforming the source files, and of invoking the script.
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class XpandComponent extends AbstractExpressionsUsingWorkflowComponent {
//TODO profiler
@@ -47,6 +65,9 @@ public class XpandComponent extends AbstractExpressionsUsingWorkflowComponent {
private List<PostProcessor> _postprocessors = new ArrayList <PostProcessor>();
private List<Outlet> _initializedOutlets = new ArrayList<Outlet> ();
+ private String _ignoreList;
+ private boolean _defaultExcludes;
+ private boolean _useBase64;
public List<PostProcessor> getBeautifier() {
return _postprocessors;
@@ -102,6 +123,18 @@ public class XpandComponent extends AbstractExpressionsUsingWorkflowComponent {
_srcPath = fixPath(srcPath);
}
+ public void setIgnoreList(String ignoreList) {
+ _ignoreList = ignoreList;
+ }
+
+ public void setDefaultExcludes(boolean defaultExcludes) {
+ _defaultExcludes = defaultExcludes;
+ }
+
+ public void setUseBase64(boolean useBase64) {
+ _useBase64 = useBase64;
+ }
+
private String fixPath(final String p) {
if (p.endsWith("\\"))
@@ -122,12 +155,16 @@ public class XpandComponent extends AbstractExpressionsUsingWorkflowComponent {
executionContext.setFileEncoding (_fileEncoding);
final String code = XpandTokens.LT + "EXPAND " + _expand + XpandTokens.RT;
+ final String filename = new String( _expand.substring(0, _expand.lastIndexOf(XpandUtil.NS_DELIM)));
+ XpandBackendFacade bf = XpandBackendFacade.createForFile(filename, _fileEncoding, metaModels, _outlets );
final Map<String, Object> variables = new HashMap<String, Object> ();
for (String name: wfContext.getSlotNames())
variables.put (name, wfContext.get (name));
-
- XpandBackendFacade.executeStatement (code, _fileEncoding, metaModels, variables, _outlets, _advice);
+
+ XpandProtectedRegionResolver resolver = new XpandProtectedRegionResolver(_ignoreList, _defaultExcludes, getInitializedOutlets(), _fileEncoding, _useBase64);
+ //XpandBackendFacade.executeStatement (code, _fileEncoding, metaModels, variables, _outlets, _advice);
+ bf.executeStatement (code, variables, _advice, resolver);
}
public void addOutlet (Outlet outlet) {
@@ -177,7 +214,7 @@ public class XpandComponent extends AbstractExpressionsUsingWorkflowComponent {
}
- private ExpandStatement getStatement() {
+ private ExpandStatement getStatement () {
Template tpl = XpandParseFacade.file (new StringReader(XpandTokens.LT + "DEFINE test FOR test" + XpandTokens.RT + XpandTokens.LT + "EXPAND " + _expand + XpandTokens.RT + XpandTokens.LT + "ENDDEFINE" + XpandTokens.RT), null);
ExpandStatement es = null;
try {
@@ -189,7 +226,7 @@ public class XpandComponent extends AbstractExpressionsUsingWorkflowComponent {
}
@Override
- public void checkConfiguration(final Issues issues) {
+ public void checkConfigurationInternal (final Issues issues) {
super.checkConfiguration(issues);
if (_genPath == null && getInitializedOutlets().isEmpty())
issues.addError(this, "You need to configure at least one outlet!");
diff --git a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/OldDefinitionConverter.java b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/OldDefinitionConverter.java
index 23500de3..c90a677b 100644
--- a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/OldDefinitionConverter.java
+++ b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/OldDefinitionConverter.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xpand.internal;
@@ -29,6 +30,7 @@ import org.eclipse.internal.xpand2.ast.LetStatement;
import org.eclipse.internal.xpand2.ast.ProtectStatement;
import org.eclipse.internal.xpand2.ast.Statement;
import org.eclipse.internal.xpand2.ast.TextStatement;
+import org.eclipse.internal.xpand2.model.XpandAdvice;
import org.eclipse.internal.xpand2.model.XpandDefinition;
import org.eclipse.internal.xpand2.type.IteratorType;
import org.eclipse.internal.xtend.expression.ast.DeclaredParameter;
@@ -41,6 +43,7 @@ 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.NamedFunction;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.common.SourcePos;
import org.eclipse.xtend.backend.common.SyntaxConstants;
import org.eclipse.xtend.backend.expr.ConcatExpression;
@@ -58,7 +61,9 @@ import org.eclipse.xtend.backend.syslib.SysLibNames;
import org.eclipse.xtend.backend.types.builtin.ObjectType;
import org.eclipse.xtend.expression.AnalysationIssue;
import org.eclipse.xtend.expression.ExecutionContext;
+import org.eclipse.xtend.expression.TypeSystem;
import org.eclipse.xtend.expression.Variable;
+import org.eclipse.xtend.middleend.xpand.internal.xpandlib.XpandLibNames;
import org.eclipse.xtend.middleend.xpand.plugin.XpandDefinitionName;
import org.eclipse.xtend.middleend.xtend.internal.OldExpressionConverter;
import org.eclipse.xtend.middleend.xtend.internal.OldTypeAnalyzer;
@@ -74,8 +79,12 @@ import org.eclipse.xtend.typesystem.Type;
* converts a single template
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class OldDefinitionConverter {
+
+ public static final List<String> ADVICE_LOCAL_VAR_NAMES = Arrays.asList (Advice.DEF_VAR_NAME, SyntaxConstants.THIS_JOINPOINT_STATICPART);
+
private XpandExecutionContext _ctx;
private final TypeToBackendType _typeConverter;
@@ -98,13 +107,17 @@ public final class OldDefinitionConverter {
_ctx = (XpandExecutionContext) _ctx.cloneWithoutVariables();
- final List<String> localVarNames = exprConv.getAdviceLocalVarNames();
- final List<Type> localVarTypes = exprConv.getAdviceLocalVarTypes (oldCtx);
- for (int i=0; i<localVarNames.size(); i++)
- _ctx = (XpandExecutionContext) _ctx.cloneWithVariable (new Variable (localVarNames.get(i), localVarTypes.get(i)));
-
+ final List<String> localAdviceVarNames = ADVICE_LOCAL_VAR_NAMES;
+ final List<Type> localAdviceVarTypes = getAdviceLocalVarTypes (oldCtx);
+ for (int i=0; i<localAdviceVarNames.size(); i++)
+ _ctx = (XpandExecutionContext) _ctx.cloneWithVariable (new Variable (localAdviceVarNames.get(i), localAdviceVarTypes.get(i)));
+ final List<DeclaredParameter> localVarNames = a.getParamsAsList();
+ for (DeclaredParameter declaredParameter : localVarNames) {
+ _ctx = (XpandExecutionContext) _ctx.cloneWithVariable (new Variable (declaredParameter.getName().getValue(), declaredParameter.getType()));
+ }
+
final ExpressionBase body = convertStatementSequence (a.getBody(), a, referencedDefinitions);
- return exprConv.convertAdvice (body, a.getName(), Arrays.asList (a.getParams()), a.isWildcardParams());
+ return exprConv.convertAdvice (body, a.getPointCut().getValue(), a.getType(), Arrays.asList (a.getParams()), a.isWildcardParams());
}
finally {
_ctx = oldCtx;
@@ -114,7 +127,7 @@ public final class OldDefinitionConverter {
public NamedFunction createUnregistered (XpandDefinition def, Set<XpandDefinitionName> referencedDefinitions) {
if (def instanceof Definition) {
final String canonicalName = new XpandDefinitionName (def).getCanonicalDefinitionName();
- return new NamedFunction (canonicalName, createNormalDefinition ((Definition) def, referencedDefinitions));
+ return new NamedFunction (new QualifiedName (canonicalName.replaceAll ("/", SyntaxConstants.NS_DELIM)), createNormalDefinition ((Definition) def, referencedDefinitions));
}
throw new IllegalArgumentException ("unsupported definition type " + def.getClass().getName());
@@ -140,7 +153,7 @@ public final class OldDefinitionConverter {
paramTypes.add (_typeConverter.convertToBackendType (pt));
}
- return new SourceDefinedFunction (def.getName(), paramNames, paramTypes, convertStatementSequence (def.getBody(), def, referencedDefinitions), false, null);
+ return new SourceDefinedFunction (new QualifiedName (def.getName()), paramNames, paramTypes, convertStatementSequence (def.getBody(), def, referencedDefinitions), false, null);
}
finally {
_ctx = oldCtx;
@@ -217,13 +230,13 @@ public final class OldDefinitionConverter {
referencedDefinitions.add (called);
- final ExpressionBase invocationExpression = new InvocationOnObjectExpression (called.getCanonicalDefinitionName(), params, false, getSourcePos(stmt));
+ final ExpressionBase invocationExpression = new InvocationOnObjectExpression (new QualifiedName (called.getCanonicalDefinitionName()), params, false, getSourcePos(stmt));
final ExpressionBase loopBody = new InitClosureExpression (Arrays.asList(closureParamName), Arrays.asList(ObjectType.INSTANCE), invocationExpression, getSourcePos(stmt));
if (separator == null)
- return new InvocationOnObjectExpression (XtendLibNames.FOREACH_WITHOUT_ITERATOR, Arrays.asList(target, loopBody), true, getSourcePos (stmt));
+ return new InvocationOnObjectExpression (new QualifiedName (XtendLibNames.FOREACH_WITHOUT_ITERATOR), Arrays.asList(target, loopBody), true, getSourcePos (stmt));
else
- return new InvocationOnObjectExpression (XtendLibNames.FOREACH_WITHOUT_ITERATOR, Arrays.asList(target, loopBody, separator), true, getSourcePos (stmt));
+ return new InvocationOnObjectExpression (new QualifiedName (XtendLibNames.FOREACH_WITHOUT_ITERATOR), Arrays.asList(target, loopBody, separator), true, getSourcePos (stmt));
}
else {
final List<ExpressionBase> params = new ArrayList<ExpressionBase>();
@@ -237,7 +250,7 @@ public final class OldDefinitionConverter {
final XpandDefinitionName called = new XpandDefinitionName (stmt.getDefinition().getValue(), stmt.getTarget(), stmt.getParametersAsList(), _ctx);
referencedDefinitions.add (called);
- return new InvocationOnObjectExpression (called.getCanonicalDefinitionName(), params, true, getSourcePos(stmt));
+ return new InvocationOnObjectExpression (new QualifiedName (called.getCanonicalDefinitionName().replaceAll("/", SyntaxConstants.NS_DELIM)), params, true, getSourcePos(stmt));
}
}
@@ -275,9 +288,9 @@ public final class OldDefinitionConverter {
final ExpressionBase closureCreation = new InitClosureExpression (Arrays.asList (varName), Arrays.asList (_typeConverter.convertToBackendType(eleType)), body, getSourcePos (stmt));
if (separator == null)
- return new InvocationOnObjectExpression (XtendLibNames.FOREACH_WITHOUT_ITERATOR, Arrays.asList(target, closureCreation), true, getSourcePos (stmt));
+ return new InvocationOnObjectExpression (new QualifiedName (XtendLibNames.FOREACH_WITHOUT_ITERATOR), Arrays.asList(target, closureCreation), true, getSourcePos (stmt));
else
- return new InvocationOnObjectExpression (XtendLibNames.FOREACH_WITHOUT_ITERATOR, Arrays.asList(target, closureCreation, separator), true, getSourcePos (stmt));
+ return new InvocationOnObjectExpression (new QualifiedName (XtendLibNames.FOREACH_WITHOUT_ITERATOR), Arrays.asList(target, closureCreation, separator), true, getSourcePos (stmt));
}
else {
// forEach with an iterator
@@ -296,16 +309,16 @@ public final class OldDefinitionConverter {
final ExpressionBase closureCreation = new InitClosureExpression (paramNames, paramTypes, body, getSourcePos (stmt));
if (separator == null)
- return new InvocationOnObjectExpression (XtendLibNames.FOREACH_WITH_ITERATOR, Arrays.asList(target, closureCreation), true, getSourcePos (stmt));
+ return new InvocationOnObjectExpression (new QualifiedName (XtendLibNames.FOREACH_WITH_ITERATOR), Arrays.asList(target, closureCreation), true, getSourcePos (stmt));
else
- return new InvocationOnObjectExpression (XtendLibNames.FOREACH_WITH_ITERATOR, Arrays.asList(target, closureCreation, separator), true, getSourcePos (stmt));
+ return new InvocationOnObjectExpression (new QualifiedName (XtendLibNames.FOREACH_WITH_ITERATOR), Arrays.asList(target, closureCreation, separator), true, getSourcePos (stmt));
}
}
private ExpressionBase convertIfStatement (IfStatement stmt, Set<XpandDefinitionName> referencedDefinitions) {
if (stmt.getCondition() != null) {
final ExpressionBase condExpr = convertExpression (stmt.getCondition());
- final ExpressionBase ifExpr = convertStatement (stmt.getUpperIf(), referencedDefinitions);
+ final ExpressionBase ifExpr = convertStatementSequence(stmt.getBody(), stmt, referencedDefinitions);
final ExpressionBase elseExpr = stmt.getElseIf() != null ? convertStatement (stmt.getElseIf(), referencedDefinitions) : new LiteralExpression (null, getSourcePos (stmt));
return new IfExpression (condExpr, ifExpr, elseExpr, getSourcePos (stmt));
@@ -354,22 +367,28 @@ public final class OldDefinitionConverter {
final ExpressionBase append = new LiteralExpression (outlet.isAppend(), getSourcePos(stmt));
final List<ExpressionBase> emptyParamList = Collections.emptyList();
- final ExpressionBase initIsDeleteLineExpression = new InvocationOnObjectExpression (XtendLibNames.DELETE_LINE_INIT, emptyParamList, false, getSourcePos (stmt));
+ final ExpressionBase initIsDeleteLineExpression = new InvocationOnObjectExpression (new QualifiedName (XtendLibNames.DELETE_LINE_INIT), emptyParamList, false, getSourcePos (stmt));
- final ExpressionBase postprocessIsDeleteLineExpression = new InvocationOnObjectExpression (XtendLibNames.DELETE_LINE_POSTPROCESS, Arrays.asList(body), false, getSourcePos (stmt));
- final ExpressionBase writeToFileExpression = new InvocationOnObjectExpression (SysLibNames.WRITE_TO_FILE, Arrays.asList(outletName, filename, append, postprocessIsDeleteLineExpression), false, getSourcePos (stmt));
+ final ExpressionBase postprocessIsDeleteLineExpression = new InvocationOnObjectExpression (new QualifiedName (XtendLibNames.DELETE_LINE_POSTPROCESS), Arrays.asList(body), false, getSourcePos (stmt));
+ final ExpressionBase writeToFileExpression = new InvocationOnObjectExpression (new QualifiedName (SysLibNames.WRITE_TO_FILE), Arrays.asList(outletName, filename, append, postprocessIsDeleteLineExpression), false, getSourcePos (stmt));
return new SequenceExpression (Arrays.asList (initIsDeleteLineExpression, writeToFileExpression), getSourcePos (stmt));
}
private ExpressionBase convertProtectStatement (ProtectStatement stmt, Set<XpandDefinitionName> referencedDefinitions) {
- throw new UnsupportedOperationException(); //TODO implement ProtectStatement
+ ExpressionBase body = convertStatementSequence(stmt.getBody(), stmt, referencedDefinitions);
+ final ExpressionBase id = convertExpression(stmt.getId());
+ final ExpressionBase startComment = convertExpression(stmt.getCommentStart());
+ final ExpressionBase endComment = convertExpression(stmt.getCommentEnd());
+ final ExpressionBase isDisabled = new LiteralExpression(stmt.getDisable(), getSourcePos(stmt));
+ final ExpressionBase protectExpr = new InvocationOnObjectExpression (new QualifiedName(XpandLibNames.PROTECT), Arrays.asList(id, startComment, endComment, isDisabled, body), true, getSourcePos(stmt));
+ return protectExpr; //TODO implement ProtectStatement
}
private ExpressionBase convertTextStatement (TextStatement stmt) {
if (stmt.isDeleteLine()) {
final List<ExpressionBase> emptyParamList = Collections.emptyList();
- final ExpressionBase registerExpression = new InvocationOnObjectExpression (XtendLibNames.DELETE_LINE_REGISTER, emptyParamList, false, getSourcePos(stmt));
+ final ExpressionBase registerExpression = new InvocationOnObjectExpression (new QualifiedName (XtendLibNames.DELETE_LINE_REGISTER), emptyParamList, false, getSourcePos(stmt));
final ExpressionBase markerExpression = new LiteralExpression (XpandIsDeleteLine.MARKER_FOR_IS_DELETE_LINE, getSourcePos(stmt));
final ExpressionBase contentExpression = new LiteralExpression (stmt.getValue(), getSourcePos (stmt));
@@ -390,5 +409,10 @@ public final class OldDefinitionConverter {
final OldExpressionConverter exprConverter = new OldExpressionConverter (_ctx, _typeConverter, _definitionName);
return exprConverter.convert (expr);
}
+
+ private List<Type> getAdviceLocalVarTypes (TypeSystem ts) {
+ return Arrays.asList (ts.getStringType(), ts.getStringType()); // any type other than Object will do - as a hint for the right optimizations
+ }
+
}
diff --git a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/OldXpandRegistryFactory.java b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/OldXpandRegistryFactory.java
index a8fb04f4..c04512de 100644
--- a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/OldXpandRegistryFactory.java
+++ b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/OldXpandRegistryFactory.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xpand.internal;
@@ -18,6 +19,7 @@ import org.eclipse.xtend.middleend.xpand.OldXpandRegistry;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class OldXpandRegistryFactory implements LanguageSpecificMiddleEndFactory {
diff --git a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/XpandLibContributor.java b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/XpandLibContributor.java
new file mode 100644
index 00000000..93d3bb07
--- /dev/null
+++ b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/XpandLibContributor.java
@@ -0,0 +1,43 @@
+/*
+Copyright (c) 2009 André Arnold.
+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:
+ André Arnold - initial API and implementation
+ */
+package org.eclipse.xtend.middleend.xpand.internal.xpandlib;
+
+import static org.eclipse.xtend.middleend.javaannotations.JavaFunctionClassContributor.classAsResource;
+
+import java.util.Collection;
+
+import org.eclipse.xtend.backend.common.NamedFunction;
+import org.eclipse.xtend.backend.functions.DuplicateAwareNamedFunctionCollection;
+import org.eclipse.xtend.middleend.MiddleEnd;
+
+/**
+ * This class registers functions from the XpandLib at the middleend
+ *
+ * @author André Arnold
+ *
+ */
+public class XpandLibContributor {
+ private final DuplicateAwareNamedFunctionCollection _functions = new DuplicateAwareNamedFunctionCollection ();
+
+ public XpandLibContributor (MiddleEnd middleEnd) {
+ registerExtensionClass (middleEnd, XpandProtectedRegionOperations.class);
+ }
+
+ private void registerExtensionClass (MiddleEnd middleEnd, Class<?> cls) {
+ for (NamedFunction f: middleEnd.getFunctions (classAsResource (cls)).getPublicFunctions())
+ _functions.register (f);
+ }
+
+ public Collection<NamedFunction> getContributedFunctions () {
+ return _functions.getFunctions();
+ }
+
+}
diff --git a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/XpandLibNames.java b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/XpandLibNames.java
new file mode 100644
index 00000000..7403cac2
--- /dev/null
+++ b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/XpandLibNames.java
@@ -0,0 +1,23 @@
+/*
+Copyright (c) 2008 André Arnold.
+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:
+ André Arnold - initial API and implementation
+ */
+
+package org.eclipse.xtend.middleend.xpand.internal.xpandlib;
+
+/**
+ *
+ * @author André Arnold
+ *
+ */
+public interface XpandLibNames {
+
+ String PROTECT = "XpandProtect";
+
+}
diff --git a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/XpandProtectedRegionOperations.java b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/XpandProtectedRegionOperations.java
new file mode 100644
index 00000000..bcabd036
--- /dev/null
+++ b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/XpandProtectedRegionOperations.java
@@ -0,0 +1,58 @@
+/*
+Copyright (c) 2005, 2007, 2009 committers of openArchitectureWare and others.
+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:
+ committers of openArchitectureWare - initial API and implementation
+ */
+package org.eclipse.xtend.middleend.xpand.internal.xpandlib;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.eclipse.xtend.backend.common.EfficientLazyString;
+import org.eclipse.xtend.backend.common.Function;
+import org.eclipse.xtend.middleend.javaannotations.AbstractExecutionContextAware;
+import org.eclipse.xtend.middleend.xpand.internal.xpandlib.pr.XpandProtectedRegionResolver;
+import org.eclipse.xtend.middleend.xpand.internal.xpandlib.pr.XpandProtectedRegionSyntaxException;
+import org.eclipse.xtend.middleend.xpand.internal.xpandlib.pr.XpandProtectedRegionResolver.XpandProtectedRegion;
+
+/**
+ * This class is a library of functions provided by the XpandLib
+ *
+ * @author André Arnold
+ *
+ */
+public final class XpandProtectedRegionOperations extends AbstractExecutionContextAware {
+
+ private Log log = LogFactory.getLog(XpandProtectedRegionOperations.class);
+
+ public CharSequence XpandProtect (final CharSequence id, final CharSequence startComment, final CharSequence endComment, final boolean disabled, final CharSequence body) {
+ EfficientLazyString result = new EfficientLazyString ();
+ Object o = _ctx.getContributionStateContext ().retrieveState (XpandProtectedRegionResolver.XPAND_PROTECTED_REGION_RESOLVER);
+ if (o != null && o instanceof XpandProtectedRegionResolver) {
+ XpandProtectedRegionResolver resolver = (XpandProtectedRegionResolver) o;
+ XpandProtectedRegion region = resolver.getProtectedRegion (id.toString());
+ if (region == null) {
+ region = resolver.createProtectedRegion (id.toString(), disabled);
+ result = EfficientLazyString.createAppendedString (result, region.getStartString(startComment.toString(), endComment.toString()));
+ result = EfficientLazyString.createAppendedString (result, body.toString());
+ result = EfficientLazyString.createAppendedString (result, region.getEndString(startComment.toString(), endComment.toString()));
+ } else {
+ result = EfficientLazyString.createAppendedString (result, region.getStartString(startComment.toString(), endComment.toString()));
+ try {
+ result = EfficientLazyString.createAppendedString (result, region.getBody(startComment.toString(), endComment.toString()));
+ } catch (XpandProtectedRegionSyntaxException e) {
+ log.warn (e.getMessage());
+ }
+ result = EfficientLazyString.createAppendedString (result, region.getEndString(startComment.toString(), endComment.toString()));
+ }
+ } else {
+ log.warn("No protected region resolver configured!");
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/pr/DuplicateXpandProtectedRegionException.java b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/pr/DuplicateXpandProtectedRegionException.java
new file mode 100644
index 00000000..d5f6a55c
--- /dev/null
+++ b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/pr/DuplicateXpandProtectedRegionException.java
@@ -0,0 +1,35 @@
+/*
+Copyright (c) 2005, 2007, 2009 committers of openArchitectureWare and others.
+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:
+ committers of openArchitectureWare - initial API and implementation
+*/
+
+package org.eclipse.xtend.middleend.xpand.internal.xpandlib.pr;
+
+public class DuplicateXpandProtectedRegionException extends Exception {
+
+ public DuplicateXpandProtectedRegionException() {
+ super();
+ }
+
+ public DuplicateXpandProtectedRegionException(String message,
+ Throwable cause) {
+ super(message, cause);
+ }
+
+ public DuplicateXpandProtectedRegionException(String message) {
+ super(message);
+ }
+
+ public DuplicateXpandProtectedRegionException(Throwable cause) {
+ super(cause);
+ }
+
+
+
+}
diff --git a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/pr/XpandProtectedRegionResolver.java b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/pr/XpandProtectedRegionResolver.java
new file mode 100644
index 00000000..cbf8ce9c
--- /dev/null
+++ b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/pr/XpandProtectedRegionResolver.java
@@ -0,0 +1,477 @@
+/*******************************************************************************
+ * Copyright (c) 2009 committers of openArchitectureWare and others.
+ * 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:
+ * committers of openArchitectureWare - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.xtend.middleend.xpand.internal.xpandlib.pr;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.lang.ref.SoftReference;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.eclipse.xpand2.output.Outlet;
+import org.eclipse.xtend.backend.util.Base64Codec;
+import org.eclipse.xtend.backend.util.FileHelper;
+import org.eclipse.xtend.backend.util.GenericFileFilter;
+
+public class XpandProtectedRegionResolver {
+
+ public static final String XPAND_PROTECTED_REGION_RESOLVER = "XpandProtectedRegionResolver";
+
+ private static final String PROTECT_AFTER_ID = ")";
+
+ private static final String PROTECT_B64_AFTER_ID = "]";
+
+ private static final String PROTECT_B64_BEFORE_ID = "[";
+
+ private static final String PROTECT_BEFORE_ID = "(";
+
+ private static final String PROTECT_BEGIN = "PROTECTED REGION ID";
+
+ private static final String PROTECT_END = "PROTECTED REGION END";
+
+ private static final String PROTECT_START_END = "START";
+
+ private static final String ENABLED = "ENABLED";
+
+
+ private Map<String, XpandProtectedRegion> _regions;
+
+ private String _ignoreList;
+
+ private boolean _defaultExcludes;
+
+ private File[] _srcPaths;
+
+ private HashSet<String> _usedSet;
+
+ private Log log = LogFactory.getLog(XpandProtectedRegionResolver.class);
+
+ private String _fileEncoding;
+
+ private boolean _useBase64;
+
+
+
+ public class XpandProtectedRegion {
+
+ private final String _id;
+
+ private final int _startPos;
+
+ private final int _endPos;
+
+ private final File _file;
+
+ private final String _encoding;
+
+ private final boolean _disabled;
+
+ private final boolean _isBase64;
+
+ private final SoftReference<String> _body;
+
+
+ public XpandProtectedRegion(final String id, final int startPos, final int endPos,
+ final File file, final String encoding, boolean disabled, boolean useBase64,
+ final String body) {
+ super();
+ _id = id;
+ _startPos = startPos;
+ _endPos = endPos;
+ _file = file;
+ _encoding = encoding;
+ _disabled = disabled;
+ _isBase64 = useBase64;
+ _body = new SoftReference<String> (body);
+ }
+
+ public String getBody () {
+ return _body.get();
+ }
+
+ public String getBody (final String startComment, final String endComment) throws XpandProtectedRegionSyntaxException {
+ String body = _body.get();
+
+ if (body == null) {
+ try {
+ body = FileHelper.read (_file, _encoding).substring(_startPos, _endPos);
+ } catch (final IOException e) {
+ throw new RuntimeException ("Unexpected I/O exception (source files removed?)", e);
+ }
+ }
+
+ final int endCommentPos = body.indexOf (endComment);
+
+ if ((endCommentPos < 0) || (body.substring (0, endCommentPos).trim().length() > 0))
+ throw new XpandProtectedRegionSyntaxException("Start of protected region " + _id
+ + " does not end with comment " + endComment);
+
+ final int startCommentPos = body.lastIndexOf (startComment);
+
+ if ((startCommentPos < 0)
+ || (body.substring(startCommentPos + startComment.length()).trim().length() > 0))
+ throw new XpandProtectedRegionSyntaxException("End of protected region " + _id
+ + " does not start with comment " + startComment + " \"" +body.substring(startCommentPos + startComment.length()).trim() + "\"");
+
+ return body.substring(endCommentPos + endComment.length(), startCommentPos);
+ }
+
+ public String getId() {
+ return _id;
+ }
+
+ public File getFile() {
+ return _file;
+ }
+
+ public String getStartString(final String startComment, final String endComment) {
+ if (_isBase64) {
+ try {
+ return (startComment + PROTECT_BEGIN + PROTECT_B64_BEFORE_ID + Base64Codec.toString(_id)
+ + PROTECT_B64_AFTER_ID + " " + (!_disabled ? ENABLED + " " : "") + PROTECT_START_END + endComment);
+ } catch (final IOException ie) {
+ // fallback to old style if BASE64Encoder fails
+ }
+ }
+
+ return (startComment + PROTECT_BEGIN + PROTECT_BEFORE_ID + _id + PROTECT_AFTER_ID + " "
+ + (!_disabled ? ENABLED + " " : "") + PROTECT_START_END + endComment);
+ }
+
+ public String getEndString(final String startComment, final String endComment) {
+ return startComment + PROTECT_END + endComment;
+ }
+
+ }
+
+ public XpandProtectedRegionResolver () {
+ super();
+ }
+
+ public XpandProtectedRegionResolver (String ignoreList,
+ boolean defaultExcludes, List<Outlet> outlets, String fileEncoding,
+ boolean useBase64) {
+ super();
+ _ignoreList = ignoreList;
+ _defaultExcludes = defaultExcludes;
+ _srcPaths = new File [outlets.size()];
+ for (int i = 0; i < _srcPaths.length; i++) {
+ _srcPaths[i] = new File (outlets.get(i).getPath());
+ }
+ _fileEncoding = fileEncoding;
+ _useBase64 = useBase64;
+ }
+
+ /**
+ * Initializes the XpandProtectedRegionResolver. This starts the scan over all configured paths (property 'srcPaths').
+ * <p>
+ * A second call (already initialized) to this method will return immediately. The method should be called lazily.
+ *
+ * @throws DuplicateXpandProtectedRegionException If a Protected Region Id is detected the second time, i.e. it is not unique.
+ */
+ public void init() throws DuplicateXpandProtectedRegionException {
+ // Already initialized?
+ if (_regions != null) {
+ return;
+ }
+
+ // Initialize the Protected Region map
+ _regions = new HashMap<String, XpandProtectedRegion> ();
+ _usedSet = new HashSet<String> ();
+
+ if (_srcPaths==null) {
+ log.warn ("No source paths configured for scanning.");
+ // abort
+ return;
+ }
+
+ long time = 0;
+ long fileCount = 0;
+
+ if (log.isInfoEnabled ()) {
+ log.info ("Source scan started ...");
+ time = System.currentTimeMillis();
+ }
+
+ // create the file filter
+ final GenericFileFilter filter = new GenericFileFilter(_ignoreList, _defaultExcludes);
+
+ // Scan all configured paths
+ for (int i = 0; i < _srcPaths.length; i += 1) {
+ try {
+ // retrieve (recursive) all files from a path matching the configured filter
+ final File[] files = FileHelper.getAllFiles (_srcPaths[i], filter);
+
+ fileCount += files.length;
+
+ // scan all files
+ for (int j = 0; j < files.length; j += 1) {
+ // retrieve the Protected Regions from the current file
+ final Iterator<XpandProtectedRegion> regions = retrieveProtectedRegions (files[j], _fileEncoding, _useBase64).iterator();
+
+ while (regions.hasNext()) {
+ final XpandProtectedRegion region = regions.next ();
+ register (region);
+ }
+ }
+ } catch (final IOException e) {
+ throw new RuntimeException ("Unexpected I/O exception", e);
+ } catch (final XpandProtectedRegionSyntaxException e) {
+ throw new RuntimeException (e.getMessage (), e);
+ }
+ }
+
+ if (log.isInfoEnabled()) {
+ time = System.currentTimeMillis () - time;
+
+ log.info("Source scan finished in " + (time / 1000.0) + "s");
+ log.info("Files scanned: " + fileCount);
+ log.info("Regions found: " + _regions.size());
+ }
+
+ }
+
+ public XpandProtectedRegion getProtectedRegion (final String id) {
+ try {
+ init ();
+ } catch (DuplicateXpandProtectedRegionException e) {
+ log.warn (e.getMessage (), e);
+ }
+ if (!_usedSet.add(id)) {
+ // id was not added to usedSet -> id was already queried before!
+ log.warn ("Protected region with ID '" + id + "' referenced more than once");
+ }
+ return _regions.get (id);
+ }
+
+ /**
+ * Factory method to create an XpandProtectedRegion
+ */
+ public XpandProtectedRegion createProtectedRegion(final String id, final boolean disabled) {
+ return new XpandProtectedRegion(id, 0, 0, null, null, disabled, _useBase64, null);
+ }
+
+ /**
+ * Register a protected region under it's ID
+ * @param region
+ */
+ public void register (final XpandProtectedRegion region) throws DuplicateXpandProtectedRegionException {
+ if (!isRegistered(region)) {
+ _regions.put (region.getId(), region);
+ } else {
+ final String id = region.getId();
+ throw new DuplicateXpandProtectedRegionException ("The protected region Id '" + id + "' occuring in files " + region.getFile ()
+ + " and " + _regions.get (id).getFile ()
+ + " is not unique");
+ }
+ }
+
+ public boolean isRegistered (final XpandProtectedRegion region) {
+ return _regions.containsKey (region.getId());
+ }
+
+ /**
+ * Retrieves all Protected Regions from a source file.
+ * @param file The source file to scan.
+ * @return All found Protected Regions in the specified file.
+ * @throws XpandProtectedRegionSyntaxException If one of the Protected Regions in the file is incomplete or invalid.
+ * @throws IOException On errors occuring when reading the file
+ */
+ private Collection<XpandProtectedRegion> retrieveProtectedRegions (final File file, final String encoding, final boolean useBASE64) throws XpandProtectedRegionSyntaxException, IOException {
+ final List<XpandProtectedRegion> regions = new ArrayList<XpandProtectedRegion>();
+
+ final String source = FileHelper.read(file, encoding);
+
+ final int beginLength = PROTECT_BEGIN.length();
+ final int startEndLength = PROTECT_START_END.length();
+ final int idBeginLength = PROTECT_BEFORE_ID.length();
+ final int idEndLength = PROTECT_AFTER_ID.length();
+
+ int start = source.indexOf (PROTECT_BEGIN);
+
+ while (start >= 0) {
+ final int blockStart = start + beginLength;
+
+ boolean isB64 = false;
+ int idStart = source.indexOf (PROTECT_BEFORE_ID, blockStart);
+
+ if (idStart != blockStart) {
+ idStart = source.indexOf (PROTECT_B64_BEFORE_ID, blockStart);
+ isB64 = true;
+ }
+ idStart += idBeginLength;
+
+ final int end = source.indexOf (PROTECT_END, idStart);
+ final int next = source.indexOf (PROTECT_BEGIN, idStart);
+
+ if ((end < 0) || ((next >= 0) && (next < end)))
+ throw new XpandProtectedRegionSyntaxException ("Protected region at index " + start + " in file '" + file
+ + "' is incomplete");
+
+ final int idEnd = source.indexOf (isB64 ? PROTECT_B64_AFTER_ID : PROTECT_AFTER_ID, idStart);
+
+ if ((idEnd <= idStart) || (end < idEnd))
+ throw new XpandProtectedRegionSyntaxException ("Protected region Id at index " + start + " in file '" + file
+ + "' is incomplete");
+
+ String id = new String(source.substring (idStart, idEnd));
+
+ if (isB64) {
+ try {
+ id = new String (Base64Codec.toByteArray(id));
+ } catch (final IOException ie) {
+ throw new XpandProtectedRegionSyntaxException ("Protected region Id at index " + start + " in file '"
+ + file + "' is incomplete", ie);
+ }
+ }
+
+ final int startEnd = source.indexOf (PROTECT_START_END, idEnd + idEndLength);
+
+ if (end < startEnd)
+ throw new XpandProtectedRegionSyntaxException ("Protected region start at index " + start + " in file '"
+ + file + "' is incomplete");
+
+ final String type = new String(source.substring (idEnd + idEndLength, startEnd).trim().toUpperCase());
+
+ if (!(type.equals("") || type.equals(ENABLED)))
+ throw new XpandProtectedRegionSyntaxException ("Protected region start at index " + start + " in file "
+ + file + " has illegal type '" + type+ "'");
+ if (type.equals(ENABLED)) {
+ final String body = new String (source.substring (startEnd + startEndLength, end));
+ regions.add (new XpandProtectedRegion (id, startEnd + startEndLength, end, file, encoding, false, useBASE64, body));
+ }
+ start = next;
+ }
+
+ return regions;
+ }
+
+ /**
+ * Dumps all known protected regions to files. For each protected region a file is created.
+ * @param dumpPath Directory where the dump files are created within.
+ */
+ public void reportRegions(final File dumpPath) {
+ final int unused = _regions.size() - _usedSet.size();
+
+ if (unused > 0) {
+ log.warn("There are " + unused + " unused Regions:");
+
+ if (dumpPath != null) {
+ dumpPath.mkdirs ();
+ }
+
+ for (final Iterator<XpandProtectedRegion> regions = _regions.values().iterator(); regions.hasNext();) {
+ final XpandProtectedRegion region = regions.next ();
+
+ final String id = region.getId ();
+
+ if (!_usedSet.contains (id)) {
+ log.warn ("File: " + region.getFile ());
+ log.warn ("ID: " + id);
+
+ try {
+ if (dumpPath != null) {
+ final File file = new File (dumpPath, Base64Codec.toString(id));
+
+ Writer writer;
+
+ if (_fileEncoding == null) {
+ writer = new FileWriter (file);
+ } else {
+ writer = new OutputStreamWriter (new FileOutputStream (file), _fileEncoding);
+ }
+
+ writer.write(region.getStartString("", ""));
+ writer.write(region.getBody("", ""));
+ writer.write(region.getEndString("", ""));
+
+ writer.close();
+ }
+ } catch (final IOException e) {
+ throw new RuntimeException ("Unexpected I/O exception", e);
+ } catch (final XpandProtectedRegionSyntaxException e) {
+ log.error(e.getMessage(), e);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This flag determines whether default file exclusion patterns should be used.
+ * @param defaultExcludes <code>true</code>: Use default file exclusion patterns, <code>false</code>: ignore them, just use
+ * the patterns specified by {@link #setIgnoreList(String) ignoreList}
+ * @see Xpand reference manual
+ */
+ public void setDefaultExcludes(final boolean defaultExcludes) {
+ _defaultExcludes = defaultExcludes;
+ }
+
+ /**
+ * Sets the file encoding to be used when reading files.
+ * @param encoding A valid encoding string.
+ */
+ public void setFileEncoding(final String encoding) {
+ _fileEncoding = encoding;
+ }
+
+ /**
+ * Sets a custom list of file patterns that should be filtered during scanning of source files
+ * and directories.
+ * @param ignoreList A comma separated list of file patterns to ignore during scan.
+ */
+ public void setIgnoreList(final String ignoreList) {
+ _ignoreList = ignoreList;
+ }
+
+ /**
+ * Sets the source paths that should be scanned.
+ * @param srcPathsAsString A comma separated list of directory paths.
+ * @throws IllegalArgumentException If one of the passed arguments is not a directory or does not exist
+ */
+ public void setSrcPathes(final String srcPathsAsString) throws IllegalArgumentException {
+ // Split the paths and initialize the
+ // file array 'srcPaths' from it
+ if ("".equals(srcPathsAsString)) {
+ _srcPaths = new File[0];
+ } else {
+ final String[] s = srcPathsAsString.split(",");
+ _srcPaths = new File[s.length];
+ for (int i = 0; i < _srcPaths.length; i++) {
+ _srcPaths[i] = new File(s[i].trim());
+ // The configured path must point to an existing directory
+ if (!_srcPaths[i].isDirectory()) {
+ throw new IllegalArgumentException("Source path component " + _srcPaths[i]
+ + " not found or no directory");
+ }
+ }
+
+ }
+ }
+
+ public void setUseBASE64(final boolean useBASE64) {
+ _useBase64 = useBASE64;
+ }
+
+
+}
diff --git a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/pr/XpandProtectedRegionSyntaxException.java b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/pr/XpandProtectedRegionSyntaxException.java
new file mode 100644
index 00000000..9b14c93a
--- /dev/null
+++ b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/internal/xpandlib/pr/XpandProtectedRegionSyntaxException.java
@@ -0,0 +1,26 @@
+/*
+Copyright (c) 2005, 2007, 2009 committers of openArchitectureWare and others.
+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:
+ committers of openArchitectureWare - initial API and implementation
+*/
+
+package org.eclipse.xtend.middleend.xpand.internal.xpandlib.pr;
+
+import java.io.IOException;
+
+public class XpandProtectedRegionSyntaxException extends Exception {
+
+ public XpandProtectedRegionSyntaxException(String msg) {
+ super (msg);
+ }
+
+ public XpandProtectedRegionSyntaxException(String msg, Throwable cause) {
+ super (msg, cause);
+ }
+
+}
diff --git a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/plugin/XpandDefinitionName.java b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/plugin/XpandDefinitionName.java
index c449bd89..4a8b0c8d 100644
--- a/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/plugin/XpandDefinitionName.java
+++ b/plugins/org.eclipse.xtend.middleend.xpand/src/org/eclipse/xtend/middleend/xpand/plugin/XpandDefinitionName.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xpand.plugin;
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/plugin.xml b/plugins/org.eclipse.xtend.middleend.xtend/plugin.xml
index e3aaec59..c4046efc 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/plugin.xml
+++ b/plugins/org.eclipse.xtend.middleend.xtend/plugin.xml
@@ -6,6 +6,9 @@
<element_1
class="org.eclipse.xtend.middleend.xtend.plugin.OldXtendRegistryFactory">
</element_1>
+ <element_1
+ class="org.eclipse.xtend.middleend.xtend.plugin.OldCheckRegistryFactory">
+ </element_1>
</extension>
</plugin>
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/CheckBackendFacade.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/CheckBackendFacade.java
index bb6bc9d2..3fad3afd 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/CheckBackendFacade.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/CheckBackendFacade.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,27 +7,93 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend;
+import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
import org.eclipse.emf.mwe.core.issues.Issues;
+import org.eclipse.xtend.backend.BackendFacade;
+import org.eclipse.xtend.backend.common.ExecutionContext;
+import org.eclipse.xtend.backend.common.FunctionDefContext;
+import org.eclipse.xtend.backend.common.QualifiedName;
+import org.eclipse.xtend.expression.ExecutionContextImpl;
+import org.eclipse.xtend.middleend.MiddleEnd;
+import org.eclipse.xtend.middleend.MiddleEndFactory;
+import org.eclipse.xtend.middleend.xtend.internal.OldHelper;
import org.eclipse.xtend.middleend.xtend.internal.xtend.CheckConverter;
+import org.eclipse.xtend.middleend.xtend.plugin.OldCheckRegistryFactory;
import org.eclipse.xtend.typesystem.MetaModel;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class CheckBackendFacade {
+ private final String _checkFile;
+ private final MiddleEnd _middleEnd;
+ private final Collection<MetaModel> _mms;
+
public static void checkAll (String xtendFileName, Collection<MetaModel> mms, Issues issues, Collection<?> allObjects) {
checkAll (xtendFileName, null, mms, issues, allObjects);
}
- public static void checkAll (String xtendFileName, String fileEncoding, Collection<MetaModel> mms, Issues issues, Collection<?> allObjects) {
- XtendBackendFacade.invokeXtendFunction (xtendFileName, fileEncoding, mms, CheckConverter.ALL_CHECKS_FUNCTION_NAME, issues, allObjects);
+ public static void checkAll (String checkFileName, String fileEncoding, Collection<MetaModel> mms, Issues issues, Collection<?> allObjects) {
+ CheckBackendFacade.invokeCheckFunction (checkFileName, fileEncoding, mms, CheckConverter.ALL_CHECKS_FUNCTION_NAME, issues, allObjects);
+ }
+
+ /**
+ * This function invokes a single Xtend function, returning the result. The fileEncoding may be null, in which case the platform's default file
+ * encoding is used.
+ */
+ public static Object invokeCheckFunction (String checkFileName, String fileEncoding, Collection<MetaModel> mms, QualifiedName functionName, Object... parameters) {
+ return createForFile (checkFileName, fileEncoding, mms).invokeCheckFunction (functionName, parameters);
+ }
+
+ public Object invokeCheckFunction (QualifiedName functionName, Object... parameters) {
+ final FunctionDefContext fdc = _middleEnd.getFunctions (_checkFile);
+ final ExecutionContext ctx = BackendFacade.createExecutionContext (fdc, _middleEnd.getTypesystem(), true); //TO--DO configure isLogStacktrace
+ return fdc.invoke (ctx, functionName, Arrays.asList (parameters));
}
+
+
+ public static CheckBackendFacade createForFile (String checkFileName, String fileEncoding, Collection<MetaModel> mms) {
+ return new CheckBackendFacade (checkFileName, fileEncoding, mms);
+ }
+
+ private Map<Class<?>, Object> getSpecificParameters (String fileEncoding, Collection<MetaModel> mms) {
+ fileEncoding = OldHelper.normalizedFileEncoding (fileEncoding);
+
+ final ExecutionContextImpl ctx = new ExecutionContextImpl ();
+ ctx.setFileEncoding (fileEncoding);
+ for (MetaModel mm: mms)
+ ctx.registerMetaModel (mm);
+
+ final Map<Class<?>, Object> result = new HashMap<Class<?>, Object> ();
+ result.put (OldCheckRegistryFactory.class, ctx);
+ return result;
+ }
+
+ private CheckBackendFacade (String checkFileName, String fileEncoding, Collection<MetaModel> mms) {
+ if (mms == null)
+ mms = new ArrayList<MetaModel> ();
+
+ _checkFile = OldHelper.normalizeCheckResourceName (checkFileName);
+ _mms = mms;
+ _middleEnd = MiddleEndFactory.createFromExtensions (OldHelper.guessTypesystem (mms), getSpecificParameters (fileEncoding, mms));
+ }
+
+ public FunctionDefContext getFunctionDefContext () {
+ return _middleEnd.getFunctions (_checkFile);
+ }
+
}
+
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/CheckComponent.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/CheckComponent.java
index ea8f68d4..6036b730 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/CheckComponent.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/CheckComponent.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend;
@@ -29,6 +30,7 @@ import org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflowComponent;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class CheckComponent extends AbstractExpressionsUsingWorkflowComponent {
@@ -92,7 +94,7 @@ public class CheckComponent extends AbstractExpressionsUsingWorkflowComponent {
@Override
- public void checkConfiguration (Issues issues) {
+ public void checkConfigurationInternal (Issues issues) {
super.checkConfiguration (issues);
if (_expression == null && _emfAllChildrenSlot != null)
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/OldCheckRegistry.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/OldCheckRegistry.java
new file mode 100644
index 00000000..e5122c82
--- /dev/null
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/OldCheckRegistry.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2008 committers of openArchitectureWare and others.
+ * 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:
+ * committers of openArchitectureWare - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.xtend.middleend.xtend;
+
+import org.eclipse.internal.xtend.xtend.ast.Around;
+import org.eclipse.internal.xtend.xtend.ast.Extension;
+import org.eclipse.internal.xtend.xtend.ast.ExtensionFile;
+import org.eclipse.internal.xtend.xtend.ast.ImportStatement;
+import org.eclipse.xtend.backend.common.BackendTypesystem;
+import org.eclipse.xtend.backend.common.NamedFunction;
+import org.eclipse.xtend.check.CheckUtils;
+import org.eclipse.xtend.expression.ExecutionContext;
+import org.eclipse.xtend.middleend.MiddleEnd;
+import org.eclipse.xtend.middleend.plugins.ImportedResource;
+import org.eclipse.xtend.middleend.plugins.LanguageSpecificMiddleEnd;
+import org.eclipse.xtend.middleend.plugins.ParsedResource;
+import org.eclipse.xtend.middleend.xtend.internal.OldHelper;
+import org.eclipse.xtend.middleend.xtend.internal.TypeToBackendType;
+import org.eclipse.xtend.middleend.xtend.internal.xtend.CheckConverter;
+import org.eclipse.xtend.middleend.xtend.internal.xtend.OldExtensionConverter;
+import org.eclipse.xtend.middleend.xtend.internal.xtendlib.XtendLibContributor;
+import org.eclipse.xtend.typesystem.emf.check.CheckFileWithContext;
+
+public class OldCheckRegistry implements LanguageSpecificMiddleEnd {
+
+ private final ExecutionContext _ctx;
+
+ private MiddleEnd _middleEnd;
+
+ private BackendTypesystem _ts;
+
+ public OldCheckRegistry(Object specificData) {
+ if (specificData == null)
+ throw new IllegalArgumentException(getName()
+ + " middle end is not initialized - will not contribute");
+
+ _ctx = (ExecutionContext) specificData;
+ }
+
+ public boolean canHandle(String resourceName) {
+ resourceName = OldHelper.normalizeCheckResourceName (resourceName);
+
+ try {
+ final ExtensionFile checkFile = (ExtensionFile) _ctx.getResourceManager().loadResource (resourceName,CheckUtils.FILE_EXTENSION);
+ return checkFile != null;
+ }
+ catch (Exception exc) {
+ return false;
+ }
+ }
+
+ public String getName() {
+ return "Check";
+ }
+
+ public ParsedResource parseResource(String checkFileName) {
+ ParsedResource result = new ParsedResource();
+
+ checkFileName = OldHelper.normalizeCheckResourceName(checkFileName);
+
+ ExtensionFile checkFile = (ExtensionFile) _ctx.getResourceManager()
+ .loadResource(checkFileName, CheckUtils.FILE_EXTENSION);
+ if (checkFile == null)
+ throw new IllegalArgumentException("could not find check file '"
+ + checkFile + "'");
+
+ final ExecutionContext ctx = _ctx.cloneWithResource(checkFile);
+
+ final TypeToBackendType typeConverter = new TypeToBackendType(_ts, ctx);
+ final OldExtensionConverter extensionFactory = new OldExtensionConverter(
+ ctx, typeConverter);
+
+ for (Extension ext : checkFile.getExtensions())
+ ext.init(ctx);
+
+ // register the XtendLib. Do this first so the extension can override
+ // functions
+ result.getPrivateFunctions().addAll(
+ new XtendLibContributor(_middleEnd).getContributedFunctions());
+
+ result.getPrivateFunctions().add(
+ new CheckConverter(ctx, typeConverter).createCheckFunction(_ts,
+ checkFile));
+
+ for (Extension ext : checkFile.getExtensions()) {
+ final NamedFunction f = extensionFactory.createUnregistered(ext);
+ if (ext.isPrivate())
+ result.getPrivateFunctions().add(f);
+ else
+ result.getPublicFunctions().add(f);
+ }
+
+ for (ImportStatement imp : checkFile.getExtImports())
+ result.getImports().add(
+ new ImportedResource(OldHelper
+ .normalizeXtendResourceName(imp.getImportedId()
+ .getValue()), imp.isExported()));
+
+ for (Around a : checkFile.getArounds())
+ result.getAdvice().add(extensionFactory.create(a));
+
+ return result;
+ }
+
+ public void setMiddleEnd(MiddleEnd middleEnd) {
+ _middleEnd = middleEnd;
+ _ts = middleEnd.getTypesystem();
+ }
+
+}
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/OldXtendRegistry.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/OldXtendRegistry.java
index ae2dab77..a14c95a3 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/OldXtendRegistry.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/OldXtendRegistry.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend;
@@ -33,6 +34,7 @@ import org.eclipse.xtend.middleend.xtend.internal.xtendlib.XtendLibContributor;
* This class manages the interdependent graph of parsed and converted files, allowing access to them by "compilation unit".
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class OldXtendRegistry implements LanguageSpecificMiddleEnd {
private final ExecutionContext _ctx;
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/XtendBackendFacade.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/XtendBackendFacade.java
index 06f0440b..48fc759f 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/XtendBackendFacade.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/XtendBackendFacade.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend;
@@ -24,6 +25,7 @@ import org.eclipse.xtend.backend.common.ExecutionContext;
import org.eclipse.xtend.backend.common.ExpressionBase;
import org.eclipse.xtend.backend.common.FunctionDefContext;
import org.eclipse.xtend.backend.common.NamedFunction;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.functions.FunctionDefContextInternal;
import org.eclipse.xtend.expression.ExecutionContextImpl;
import org.eclipse.xtend.expression.Variable;
@@ -41,6 +43,7 @@ import org.eclipse.xtend.typesystem.MetaModel;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class XtendBackendFacade {
private final String _xtendFile;
@@ -125,11 +128,11 @@ public final class XtendBackendFacade {
* This function invokes a single Xtend function, returning the result. The fileEncoding may be null, in which case the platform's default file
* encoding is used.
*/
- public static Object invokeXtendFunction (String xtendFileName, String fileEncoding, Collection<MetaModel> mms, String functionName, Object... parameters) {
+ public static Object invokeXtendFunction (String xtendFileName, String fileEncoding, Collection<MetaModel> mms, QualifiedName functionName, Object... parameters) {
return createForFile (xtendFileName, fileEncoding, mms).invokeXtendFunction (functionName, parameters);
}
- public Object invokeXtendFunction (String functionName, Object... parameters) {
+ public Object invokeXtendFunction (QualifiedName functionName, Object... parameters) {
final FunctionDefContext fdc = _middleEnd.getFunctions (_xtendFile);
final ExecutionContext ctx = BackendFacade.createExecutionContext (fdc, _middleEnd.getTypesystem(), true); //TODO configure isLogStacktrace
return fdc.invoke (ctx, functionName, Arrays.asList (parameters));
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/XtendComponent.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/XtendComponent.java
index a53de4d0..d7405902 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/XtendComponent.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/XtendComponent.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend;
@@ -26,6 +27,7 @@ import org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflowComponent;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class XtendComponent extends AbstractExpressionsUsingWorkflowComponent {
@@ -98,7 +100,7 @@ public class XtendComponent extends AbstractExpressionsUsingWorkflowComponent {
}
@Override
- public void checkConfiguration (Issues issues) {
+ public void checkConfigurationInternal (Issues issues) {
super.checkConfiguration (issues);
// Try to create detailed error message (see Bug#172567)
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/OldExpressionConverter.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/OldExpressionConverter.java
index 35893d3c..cff4a73d 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/OldExpressionConverter.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/OldExpressionConverter.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend.internal;
@@ -24,6 +25,7 @@ import org.eclipse.internal.xtend.expression.ast.DeclaredParameter;
import org.eclipse.internal.xtend.expression.ast.Expression;
import org.eclipse.internal.xtend.expression.ast.FeatureCall;
import org.eclipse.internal.xtend.expression.ast.GlobalVarExpression;
+import org.eclipse.internal.xtend.expression.ast.Identifier;
import org.eclipse.internal.xtend.expression.ast.IfExpression;
import org.eclipse.internal.xtend.expression.ast.IntegerLiteral;
import org.eclipse.internal.xtend.expression.ast.LetExpression;
@@ -40,12 +42,14 @@ import org.eclipse.internal.xtend.type.baseimpl.types.CollectionTypeImpl;
import org.eclipse.internal.xtend.type.baseimpl.types.ListTypeImpl;
import org.eclipse.internal.xtend.type.baseimpl.types.ObjectTypeImpl;
import org.eclipse.internal.xtend.type.baseimpl.types.SetTypeImpl;
+import org.eclipse.internal.xtend.xtend.ast.Around;
import org.eclipse.xtend.backend.aop.AdviceParamType;
import org.eclipse.xtend.backend.aop.AroundAdvice;
import org.eclipse.xtend.backend.aop.ExecutionPointcut;
import org.eclipse.xtend.backend.aop.Pointcut;
import org.eclipse.xtend.backend.common.BackendType;
import org.eclipse.xtend.backend.common.ExpressionBase;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.common.SourcePos;
import org.eclipse.xtend.backend.common.SyntaxConstants;
import org.eclipse.xtend.backend.expr.AndExpression;
@@ -78,9 +82,13 @@ import org.eclipse.xtend.typesystem.Type;
* converts a single expression or advice
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class OldExpressionConverter {
- private final TypeToBackendType _typeConverter;
+ private static final String AROUND_PROCEED = "proceed";
+ private static final String XPAND_AROUND_DEF = "targetDef";
+
+ private final TypeToBackendType _typeConverter;
private ExecutionContext _ctx;
private final String _extensionName;
@@ -90,7 +98,7 @@ public final class OldExpressionConverter {
_extensionName = extensionName;
}
- private static final List<String> _adviceLocalVarNames = Arrays.asList (SyntaxConstants.THIS_JOINPOINT, SyntaxConstants.THIS_JOINPOINT_STATICPART);
+ private static final List<String> _adviceLocalVarNames = Arrays.asList (Around.CONTEXT_PARAM_NAME, SyntaxConstants.THIS_JOINPOINT_STATICPART);
public List<String> getAdviceLocalVarNames () {
return _adviceLocalVarNames;
@@ -111,6 +119,18 @@ public final class OldExpressionConverter {
return new AroundAdvice (body, pointcut, false);
}
+
+ public AroundAdvice convertAdvice (ExpressionBase body, String namePattern, Identifier targetType, List<DeclaredParameter> params, boolean hasVarArgs) {
+ final List <Pair <String, AdviceParamType>> paramTypes = new ArrayList <Pair <String, AdviceParamType>> ();
+ if (targetType != null)
+ paramTypes.add (new Pair<String, AdviceParamType> (ExecutionContext.IMPLICIT_VARIABLE, new AdviceParamType (_typeConverter.convertToBackendType (_ctx.getTypeForName (targetType.getValue())), true)));
+ for (DeclaredParameter dp: params)
+ paramTypes.add (new Pair <String, AdviceParamType> (dp.getName().getValue(), new AdviceParamType (_typeConverter.convertToBackendType (dp.getType()), true)));
+
+ final Pointcut pointcut = new ExecutionPointcut (namePattern, paramTypes, hasVarArgs, _wildCardParamType);
+
+ return new AroundAdvice (body, pointcut, false);
+ }
public ExpressionBase convert (Expression expr) {
if (expr instanceof BooleanLiteral)
@@ -175,7 +195,7 @@ public final class OldExpressionConverter {
// if a function matches directly (i.e. without implicitly passing 'this' as a first parameter), that
// has precedence in matching
if (hasMatchingOperationCall (functionName, paramTypes.toArray (new Type[0])))
- return new InvocationOnObjectExpression (functionName, params, false, sourcePos);
+ return new InvocationOnObjectExpression (new QualifiedName (functionName), params, false, sourcePos);
else {
final ExpressionBase thisExpression = new LocalVarEvalExpression (org.eclipse.xtend.backend.common.SyntaxConstants.THIS, sourcePos);
final Type thisType = (Type) _ctx.getVariable (ExecutionContext.IMPLICIT_VARIABLE).getValue();
@@ -183,11 +203,20 @@ public final class OldExpressionConverter {
}
}
else
- return new InvocationOnObjectExpression (functionName, params, false, sourcePos);
+ return new InvocationOnObjectExpression (new QualifiedName (functionName), params, false, sourcePos);
}
- else
- return createInvocationOnTargetExpression(functionName, convert (expr.getTarget()), new OldTypeAnalyzer ().analyze (_ctx, expr.getTarget ()), params, paramTypes, true, sourcePos);
+ else if (isAdviceProceedCall(expr)) {
+ return new InvocationOnObjectExpression (new QualifiedName (AROUND_PROCEED), Arrays.asList (new LocalVarEvalExpression (SyntaxConstants.THIS_JOINPOINT, sourcePos)), true, sourcePos);
+ } else
+ return createInvocationOnTargetExpression (functionName, convert (expr.getTarget()), new OldTypeAnalyzer ().analyze (_ctx, expr.getTarget ()), params, paramTypes, true, sourcePos);
}
+
+ private boolean isAdviceProceedCall(OperationCall expr) {
+ return expr.getName ().getValue ().equals (AROUND_PROCEED) &&
+ expr.getTarget () instanceof FeatureCall &&
+ (((FeatureCall) expr.getTarget ()).getName ().getValue ().equals(Around.CONTEXT_PARAM_NAME) ||
+ ((FeatureCall) expr.getTarget ()).getName ().getValue ().equals(XPAND_AROUND_DEF));
+ }
private boolean hasMatchingOperationCall (String functionName, Type[] paramTypes) {
if (_ctx.getExtensionForTypes (functionName, paramTypes) != null)
@@ -252,18 +281,18 @@ public final class OldExpressionConverter {
if (hasMatchingOperationCall (functionName, paramTypeArray))
// check if there is a function that directly matches the collection
- return new InvocationOnObjectExpression (functionName, allParams, true, sourcePos);
+ return new InvocationOnObjectExpression (new QualifiedName (functionName), allParams, true, sourcePos);
else
// otherwise, do a 'collect' and call the function on all elements of the collection
- return new InvocationOnCollectionExpression (targetExpression, functionName, paramsWithoutFirst, sourcePos);
+ return new InvocationOnCollectionExpression (targetExpression, new QualifiedName (functionName), paramsWithoutFirst, sourcePos);
}
if (isObjectType (targetType))
// if the static type is "Object", we do not know if it is a collection, so we do the logic at runtime
- return new InvocationOnWhateverExpression (functionName, allParams, isMethodStyle, sourcePos);
+ return new InvocationOnWhateverExpression (new QualifiedName (functionName), allParams, isMethodStyle, sourcePos);
// otherwise we know that it is not a collection and can avoid repeating this logic at runtime
- return new InvocationOnObjectExpression (functionName, allParams, true, sourcePos);
+ return new InvocationOnObjectExpression (new QualifiedName (functionName), allParams, isNullIfNullParam(functionName), sourcePos);
}
private ExpressionBase convertTypeSelectExpression (TypeSelectExpression expr) {
@@ -277,10 +306,10 @@ public final class OldExpressionConverter {
throw new IllegalStateException ("typeSelect with neither a target nor an implicit 'this'");
final ExpressionBase thisExpr = new LocalVarEvalExpression (org.eclipse.xtend.backend.common.SyntaxConstants.THIS, sourcePos);
- return new InvocationOnObjectExpression (SysLibNames.TYPE_SELECT, Arrays.asList (thisExpr, typeExpr), true, sourcePos);
+ return new InvocationOnObjectExpression (new QualifiedName (SysLibNames.TYPE_SELECT), Arrays.asList (thisExpr, typeExpr), true, sourcePos);
}
else
- return new InvocationOnObjectExpression (SysLibNames.TYPE_SELECT, Arrays.asList(convert (expr.getTarget()), typeExpr), false, sourcePos);
+ return new InvocationOnObjectExpression (new QualifiedName (SysLibNames.TYPE_SELECT), Arrays.asList(convert (expr.getTarget()), typeExpr), false, sourcePos);
}
private ExpressionBase convertSwitchExpression (SwitchExpression expr) {
@@ -398,10 +427,10 @@ public final class OldExpressionConverter {
throw new IllegalStateException (functionName + " with neither a target nor an implicit 'this'");
final ExpressionBase thisExpr = new LocalVarEvalExpression (org.eclipse.xtend.backend.common.SyntaxConstants.THIS, sourcePos);
- return new InvocationOnObjectExpression (functionName, Arrays.asList (thisExpr, closureExpr), true, sourcePos);
+ return new InvocationOnObjectExpression (new QualifiedName (functionName), Arrays.asList (thisExpr, closureExpr), true, sourcePos);
}
else
- return new InvocationOnObjectExpression (functionName, Arrays.asList(convert (expr.getTarget()), closureExpr), true, sourcePos);
+ return new InvocationOnObjectExpression (new QualifiedName (functionName), Arrays.asList(convert (expr.getTarget()), closureExpr), true, sourcePos);
}
private ExpressionBase convertChainExpression (ChainExpression expr) {
@@ -429,7 +458,7 @@ public final class OldExpressionConverter {
}
private ExpressionBase convertGlobalVarExpression (GlobalVarExpression expr) {
- return new InvocationOnObjectExpression (XtendLibNames.GLOBAL_VAR_VALUE, Arrays.asList (new LiteralExpression (expr.getVarName(), getSourcePos(expr))), true, getSourcePos (expr));
+ return new InvocationOnObjectExpression (new QualifiedName (XtendLibNames.GLOBAL_VAR_VALUE), Arrays.asList (new LiteralExpression (expr.getVarName(), getSourcePos(expr))), true, getSourcePos (expr));
}
private ExpressionBase convertBooleanOperation (BooleanOperation expr) {
@@ -441,7 +470,7 @@ public final class OldExpressionConverter {
if ("||".equals (expr.getOperator().getValue()))
return new OrExpression (left, right, getSourcePos(expr));
if ("implies".equals (expr.getOperator().getValue()))
- return new InvocationOnObjectExpression (SysLibNames.IMPLIES, Arrays.asList(left, right), true, getSourcePos(expr));
+ return new InvocationOnObjectExpression (new QualifiedName (SysLibNames.IMPLIES), Arrays.asList(left, right), true, getSourcePos(expr));
throw new IllegalArgumentException ("unknown boolean operator " + expr.getOperator().getValue());
}
@@ -464,8 +493,26 @@ public final class OldExpressionConverter {
t instanceof SetTypeImpl;
}
- private boolean hasThis () {
+ //TODO should this become private again?
+ public boolean hasThis () {
return _ctx.getVisibleVariables().containsKey (ExecutionContext.IMPLICIT_VARIABLE);
}
+
+ private boolean hasThisJoinPoint() {
+ return _ctx.getVisibleVariables().containsKey(Around.CONTEXT_PARAM_NAME);
+ }
+
+ private boolean isNullIfNullParam(String functionName) {
+ return !(functionName.equals(SysLibNames.OPERATOR_EQUALS) ||
+ functionName.equals(SysLibNames.OPERATOR_NOT_EQUALS));
+ }
+
+ public ExecutionContext getExecutionContext() {
+ return _ctx;
+ }
+
+ public void setExecutionContext(ExecutionContext ctx) {
+ _ctx = ctx;
+ }
}
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/OldHelper.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/OldHelper.java
index 85ec9c88..1eaf94e1 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/OldHelper.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/OldHelper.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend.internal;
@@ -18,6 +19,7 @@ import org.eclipse.xpand2.XpandUtil;
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.check.CheckUtils;
import org.eclipse.xtend.typesystem.MetaModel;
import org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel;
@@ -25,6 +27,7 @@ import org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class OldHelper {
public static BackendTypesystem guessTypesystem (Collection<MetaModel> mms) {
@@ -79,6 +82,19 @@ public final class OldHelper {
return xpandName;
}
+ public static String normalizeCheckResourceName (String checkName) {
+ if (checkName == null)
+ return null;
+
+ checkName = checkName.replace (SyntaxConstants.NS_DELIM, "/");
+ if (checkName.endsWith ("." + XtendFile.FILE_EXTENSION))
+ checkName = checkName.substring (0, checkName.length() - (CheckUtils.FILE_EXTENSION.length() + 1));
+ if (checkName.startsWith("/"))
+ checkName = checkName.substring (1);
+
+ return checkName;
+ }
+
public static String xpandFileAsOldResourceName (String xpandName) {
if (xpandName == null)
return null;
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/OldTypeAnalyzer.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/OldTypeAnalyzer.java
index e3cbffce..547c3ce6 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/OldTypeAnalyzer.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/OldTypeAnalyzer.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend.internal;
@@ -61,6 +62,7 @@ import org.eclipse.xtend.typesystem.Type;
* expression. This class on the other hand returns the type "Collection[Object]".
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class OldTypeAnalyzer {
public Type analyze (ExecutionContext ctx, Extension ext, Type[] paramTypes) {
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/TypeToBackendType.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/TypeToBackendType.java
index 0af60e53..2cb656c4 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/TypeToBackendType.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/TypeToBackendType.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend.internal;
@@ -60,6 +61,7 @@ import org.eclipse.xtend.typesystem.emf.EObjectType;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class TypeToBackendType {
private final BackendTypesystem _backendTypes;
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtend/CheckConverter.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtend/CheckConverter.java
index 097eb42f..edba3c2d 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtend/CheckConverter.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtend/CheckConverter.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend.internal.xtend;
@@ -21,6 +22,7 @@ import org.eclipse.xtend.backend.common.BackendType;
import org.eclipse.xtend.backend.common.BackendTypesystem;
import org.eclipse.xtend.backend.common.ExpressionBase;
import org.eclipse.xtend.backend.common.NamedFunction;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.common.SourcePos;
import org.eclipse.xtend.backend.common.SyntaxConstants;
import org.eclipse.xtend.backend.expr.AndExpression;
@@ -29,12 +31,14 @@ import org.eclipse.xtend.backend.expr.InitClosureExpression;
import org.eclipse.xtend.backend.expr.InvocationOnObjectExpression;
import org.eclipse.xtend.backend.expr.LiteralExpression;
import org.eclipse.xtend.backend.expr.LocalVarEvalExpression;
+import org.eclipse.xtend.backend.expr.OrExpression;
import org.eclipse.xtend.backend.expr.SequenceExpression;
import org.eclipse.xtend.backend.functions.SourceDefinedFunction;
import org.eclipse.xtend.backend.syslib.SysLibNames;
import org.eclipse.xtend.backend.types.builtin.CollectionType;
import org.eclipse.xtend.backend.types.builtin.ObjectType;
import org.eclipse.xtend.expression.ExecutionContext;
+import org.eclipse.xtend.expression.Variable;
import org.eclipse.xtend.middleend.xtend.internal.OldExpressionConverter;
import org.eclipse.xtend.middleend.xtend.internal.OldHelper;
import org.eclipse.xtend.middleend.xtend.internal.TypeToBackendType;
@@ -43,9 +47,10 @@ import org.eclipse.xtend.middleend.xtend.internal.TypeToBackendType;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class CheckConverter {
- public static final String ALL_CHECKS_FUNCTION_NAME = "CheckAllChecks";
+ public static final QualifiedName ALL_CHECKS_FUNCTION_NAME = new QualifiedName ("CheckAllChecks");
/**
* name of the parameter in which the Issues are passed to the check function. This is not intended to
@@ -69,8 +74,14 @@ public final class CheckConverter {
final List<BackendType> paramTypes = Arrays.asList (ts.findType (Issues.class), CollectionType.INSTANCE);
final List<ExpressionBase> allChecks = new ArrayList<ExpressionBase> ();
- for (Check chk: extensionFile.getChecks())
- allChecks.add (convertCheck (chk, exprConv));
+ for (Check chk: extensionFile.getChecks()) {
+ if (!exprConv.hasThis() ) {
+ ExecutionContext oldCtx = exprConv.getExecutionContext();
+ exprConv.setExecutionContext(oldCtx.cloneWithVariable(new Variable(ExecutionContext.IMPLICIT_VARIABLE, oldCtx.getTypeForName(chk.getType().getValue()))));
+ allChecks.add (convertCheck (chk, exprConv));
+ exprConv.setExecutionContext(oldCtx);
+ }
+ }
final ExpressionBase body = new SequenceExpression (allChecks, exprConv.getSourcePos (extensionFile));
@@ -83,7 +94,10 @@ public final class CheckConverter {
final ExpressionBase preCondExpression = (chk.getGuard() == null) ?
exprConv.convert (chk.getConstraint()) :
- new AndExpression (exprConv.convert (chk.getGuard()), exprConv.convert (chk.getConstraint()), sourcePos);
+ new OrExpression(
+ new InvocationOnObjectExpression (new QualifiedName (SysLibNames.OPERATOR_NOT), Arrays.asList (exprConv.convert (chk.getGuard())), true, sourcePos),
+ new AndExpression (exprConv.convert (chk.getGuard()), exprConv.convert (chk.getConstraint()), sourcePos),
+ sourcePos);
final String addIssueMethodName = chk.isErrorCheck() ? "addError" : "addWarning";
@@ -92,18 +106,18 @@ public final class CheckConverter {
failureParams.add (exprConv.convert(chk.getMsg()));
failureParams.add (new LocalVarEvalExpression (SyntaxConstants.THIS, sourcePos));
- final ExpressionBase failureExpression = new InvocationOnObjectExpression (addIssueMethodName, failureParams, true, sourcePos);
+ final ExpressionBase failureExpression = new InvocationOnObjectExpression (new QualifiedName (addIssueMethodName), failureParams, true, sourcePos);
- final ExpressionBase onEachExpression = new IfExpression (preCondExpression, failureExpression, new LiteralExpression (null, sourcePos), sourcePos);
+ final ExpressionBase onEachExpression = new IfExpression (preCondExpression, new LiteralExpression (null, sourcePos), failureExpression, sourcePos);
final List<ExpressionBase> typeSelectParams = new ArrayList<ExpressionBase> ();
typeSelectParams.add (new LocalVarEvalExpression (ALL_OBJECTS_PARAM_NAME, sourcePos));
typeSelectParams.add (new LiteralExpression (_typeConverter.convertToBackendType (chk.getType()), sourcePos));
- final ExpressionBase typeSelectExpression = new InvocationOnObjectExpression (SysLibNames.TYPE_SELECT, typeSelectParams, true, sourcePos);
+ final ExpressionBase typeSelectExpression = new InvocationOnObjectExpression (new QualifiedName (SysLibNames.TYPE_SELECT), typeSelectParams, true, sourcePos);
final List<ExpressionBase> collectParams = new ArrayList<ExpressionBase> ();
collectParams.add (typeSelectExpression);
collectParams.add (new InitClosureExpression (Arrays.asList(SyntaxConstants.THIS), Arrays.asList(ObjectType.INSTANCE), onEachExpression, sourcePos));
- return new InvocationOnObjectExpression (SysLibNames.COLLECT, collectParams, true, sourcePos);
+ return new InvocationOnObjectExpression (new QualifiedName (SysLibNames.COLLECT), collectParams, true, sourcePos);
}
}
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtend/JavaExtensionFunction.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtend/JavaExtensionFunction.java
index 6601f76f..0a75662f 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtend/JavaExtensionFunction.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtend/JavaExtensionFunction.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend.internal.xtend;
@@ -22,6 +23,7 @@ import org.eclipse.xtend.backend.util.ErrorHandler;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
final class JavaExtensionFunction extends AbstractFunction {
private final Method _mtd;
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtend/OldExtensionConverter.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtend/OldExtensionConverter.java
index 0b770456..8892ba38 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtend/OldExtensionConverter.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtend/OldExtensionConverter.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend.internal.xtend;
@@ -15,6 +16,7 @@ import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
+import org.eclipse.internal.xtend.expression.ast.DeclaredParameter;
import org.eclipse.internal.xtend.expression.ast.Expression;
import org.eclipse.internal.xtend.xtend.ast.Around;
import org.eclipse.internal.xtend.xtend.ast.CreateExtensionStatement;
@@ -26,10 +28,12 @@ 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.NamedFunction;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.common.SyntaxConstants;
import org.eclipse.xtend.backend.expr.CreateCachedExpression;
import org.eclipse.xtend.backend.expr.LocalVarEvalExpression;
import org.eclipse.xtend.backend.expr.NewLocalVarDefExpression;
+import org.eclipse.xtend.backend.expr.SequenceExpression;
import org.eclipse.xtend.backend.functions.SourceDefinedFunction;
import org.eclipse.xtend.expression.AnalysationIssue;
import org.eclipse.xtend.expression.ExecutionContext;
@@ -43,6 +47,7 @@ import org.eclipse.xtend.typesystem.Type;
* converts a single extension function
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class OldExtensionConverter {
private final ExecutionContext _ctx;
@@ -56,19 +61,31 @@ public final class OldExtensionConverter {
public AroundAdvice create (Around around) {
final OldExpressionConverter exprConv = new OldExpressionConverter (_ctx, _typeConverter, "<around>");
- final ExpressionBase body = convertExpression (around.getExpression(), exprConv.getAdviceLocalVarNames(), exprConv.getAdviceLocalVarTypes(_ctx), "<around>");
+
+ final List<DeclaredParameter> parameters = around.getParams();
+ final List<String> localVarNames = new ArrayList<String> ();
+ localVarNames.addAll(exprConv.getAdviceLocalVarNames());
+ final List<Type> localVarTypes = new ArrayList<Type> ();
+ localVarTypes.addAll(exprConv.getAdviceLocalVarTypes(_ctx));
+ for (DeclaredParameter declaredParameter : parameters) {
+ localVarNames.add(declaredParameter.getName().getValue());
+ localVarTypes.add(_ctx.getTypeForName(declaredParameter.getType().getValue()));
+ }
+
+ final ExpressionBase body = convertExpression (around.getExpression(), localVarNames, localVarTypes, "<around>");
return exprConv.convertAdvice (body, around.getPointCut().getValue(), around.getParams(), around.isWildparams());
}
public NamedFunction createUnregistered (Extension extension) {
if (extension instanceof JavaExtensionStatement)
- return new NamedFunction (extension.getName(), createJavaExtension ((JavaExtensionStatement) extension));
+ //TODO check extension.getQualifiedName() was extension.getName()
+ return new NamedFunction (new QualifiedName (extension.getQualifiedName().replaceAll("/", SyntaxConstants.NS_DELIM)), createJavaExtension ((JavaExtensionStatement) extension));
if (extension instanceof ExpressionExtensionStatement)
- return new NamedFunction (extension.getName(), createExpressionExtension ((ExpressionExtensionStatement) extension));
+ return new NamedFunction (new QualifiedName (extension.getQualifiedName().replaceAll("/", SyntaxConstants.NS_DELIM)), createExpressionExtension ((ExpressionExtensionStatement) extension));
if (extension instanceof CreateExtensionStatement)
- return new NamedFunction (extension.getName(), createCreateExtension ((CreateExtensionStatement) extension));
+ return new NamedFunction (new QualifiedName (extension.getQualifiedName().replaceAll("/", SyntaxConstants.NS_DELIM)), createCreateExtension ((CreateExtensionStatement) extension));
throw new IllegalArgumentException ("unsupported extension type " + extension.getClass().getName());
}
@@ -94,21 +111,34 @@ public final class OldExtensionConverter {
}
private Function createExpressionExtension (ExpressionExtensionStatement extension) {
- return new SourceDefinedFunction (extension.getName(), extension.getParameterNames(), getParameterTypes (extension), //
+ return new SourceDefinedFunction (new QualifiedName (extension.getQualifiedName().replaceAll("/", SyntaxConstants.NS_DELIM)), extension.getParameterNames(), getParameterTypes (extension), //
convertExpression (extension.getExpression(), extension.getParameterNames(), extension.getParameterTypes(), extension.getName ()), extension.isCached(), null);
}
private Function createCreateExtension (CreateExtensionStatement extension) {
final Type createdType = _ctx.getTypeForName (extension.getReturnTypeIdentifier().getValue());
+ //TODO suggest getter for returnVarName on CreateExtensionStatement
+ final String createdVarName = !extension.getReturnVarName().equals(ExecutionContext.IMPLICIT_VARIABLE) ? extension.getReturnVarName() : SyntaxConstants.THIS;
final List<ExpressionBase> paramExprs = new ArrayList<ExpressionBase> ();
for (String varName: extension.getParameterNames())
paramExprs.add (new LocalVarEvalExpression (varName, OldExpressionConverter.getSourcePos (extension, extension.getName())));
- final ExpressionBase body = convertExpression (extension.getExpression(), extension.getParameterNames(), extension.getParameterTypes(), extension.getName ());
+ final List<String> innerParamNames = new ArrayList<String>();
+ innerParamNames.add(createdVarName);
+ innerParamNames.addAll(extension.getParameterNames());
+ final List<Type> innerParamTypes = new ArrayList<Type>();
+ innerParamTypes.add(createdType);
+ innerParamTypes.addAll(extension.getParameterTypes());
+
+ final ExpressionBase inner = convertExpression (extension.getExpression(), innerParamNames, innerParamTypes/*extension.getParameterNames(), extension.getParameterTypes()*/, extension.getName ());
+ final List<ExpressionBase> innerSeq= new ArrayList<ExpressionBase> ();
+ innerSeq.add (inner);
+ innerSeq.add (new LocalVarEvalExpression(createdVarName, inner.getPos()));
+ final ExpressionBase body = new SequenceExpression (innerSeq, inner.getPos());
final ExpressionBase createExpr = new CreateCachedExpression (_typeConverter.convertToBackendType(createdType), paramExprs, OldExpressionConverter.getSourcePos (extension, extension.getName()));
- final ExpressionBase createWrapper = new NewLocalVarDefExpression (SyntaxConstants.THIS, createExpr, body, OldExpressionConverter.getSourcePos (extension, extension.getName ()));
+ final ExpressionBase createWrapper = new NewLocalVarDefExpression (createdVarName, createExpr, body, OldExpressionConverter.getSourcePos (extension, extension.getName ()));
- return new SourceDefinedFunction (extension.getName(), extension.getParameterNames(), getParameterTypes(extension), createWrapper, true, null);
+ return new SourceDefinedFunction (new QualifiedName (extension.getQualifiedName()), extension.getParameterNames(), getParameterTypes(extension), createWrapper, true, null);
}
private Function createJavaExtension (JavaExtensionStatement extension) {
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XpandIsDeleteLine.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XpandIsDeleteLine.java
index b221acc8..1398cc93 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XpandIsDeleteLine.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XpandIsDeleteLine.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend.internal.xtendlib;
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendCollectionOperations.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendCollectionOperations.java
index d5637907..d10da2ab 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendCollectionOperations.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendCollectionOperations.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend.internal.xtendlib;
@@ -21,6 +22,7 @@ import org.eclipse.xtend.middleend.javaannotations.AbstractExecutionContextAware
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class XtendCollectionOperations extends AbstractExecutionContextAware {
@@ -48,7 +50,8 @@ public final class XtendCollectionOperations extends AbstractExecutionContextAwa
final Object part = f.invoke (_ctx, new Object[] {o});
if (part != null)
- result = EfficientLazyString.createAppendedString (result, StringOperations.overridableToString (_ctx, o));
+ // TODO verify fix
+ result = EfficientLazyString.createAppendedString (result, StringOperations.overridableToString (_ctx, /*o*/part));
}
return result;
@@ -64,7 +67,7 @@ public final class XtendCollectionOperations extends AbstractExecutionContextAwa
/**
* invokes the function for each element of the collection, concatenating the results and
- * adding the separator between themn. The function is passed an "XtendIterator" instance
+ * adding the separator between them. The function is passed an "XtendIterator" instance
* as a second parameter.
*/
public CharSequence XpandForEachWithIterator (Collection<?> c, Function f, CharSequence separator) {
@@ -81,7 +84,7 @@ public final class XtendCollectionOperations extends AbstractExecutionContextAwa
final Object part = f.invoke (_ctx, new Object[] {o, iter});
if (part != null)
- result = EfficientLazyString.createAppendedString (result, StringOperations.overridableToString (_ctx, o));
+ result = EfficientLazyString.createAppendedString (result, StringOperations.overridableToString (_ctx, part));
iter.increment();
}
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendGlobalVarOperations.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendGlobalVarOperations.java
index b0bb2c21..3f44c6b7 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendGlobalVarOperations.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendGlobalVarOperations.java
@@ -1,3 +1,14 @@
+/*
+Copyright (c) 2008 Arno Haase, André Arnold.
+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
+ André Arnold
+ */
package org.eclipse.xtend.middleend.xtend.internal.xtendlib;
import java.util.Map;
@@ -6,7 +17,12 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.eclipse.xtend.middleend.javaannotations.AbstractExecutionContextAware;
-
+/**
+ *
+ * @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
+ *
+ */
public class XtendGlobalVarOperations extends AbstractExecutionContextAware {
public static final Class<?> GLOBAL_VAR_VALUES_KEY = new Object(){}.getClass ();
final Log _log = LogFactory.getLog(getClass());
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendIterator.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendIterator.java
index b90db71d..7abf0b44 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendIterator.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendIterator.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend.internal.xtendlib;
@@ -14,6 +15,7 @@ package org.eclipse.xtend.middleend.xtend.internal.xtendlib;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public final class XtendIterator {
private long _counter = 0L;
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendLibContributor.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendLibContributor.java
index a4dcf03c..7af4d436 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendLibContributor.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendLibContributor.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend.internal.xtendlib;
@@ -22,6 +23,7 @@ import org.eclipse.xtend.middleend.MiddleEnd;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class XtendLibContributor {
private final DuplicateAwareNamedFunctionCollection _functions = new DuplicateAwareNamedFunctionCollection ();
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendLibNames.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendLibNames.java
index e4e1a21e..8e339cb1 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendLibNames.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/internal/xtendlib/XtendLibNames.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend.internal.xtendlib;
@@ -14,6 +15,7 @@ package org.eclipse.xtend.middleend.xtend.internal.xtendlib;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public interface XtendLibNames {
String FOREACH_WITHOUT_ITERATOR = "XpandForEach";
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/plugin/OldCheckRegistryFactory.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/plugin/OldCheckRegistryFactory.java
new file mode 100644
index 00000000..13d51bbe
--- /dev/null
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/plugin/OldCheckRegistryFactory.java
@@ -0,0 +1,39 @@
+/*
+Copyright (c) 2008 Arno Haase, André Arnold.
+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
+ André Arnold
+ */
+package org.eclipse.xtend.middleend.xtend.plugin;
+
+import org.eclipse.xtend.middleend.plugins.LanguageSpecificMiddleEnd;
+import org.eclipse.xtend.middleend.plugins.LanguageSpecificMiddleEndFactory;
+import org.eclipse.xtend.middleend.xtend.OldCheckRegistry;
+
+/**
+ *
+ * @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
+ *
+ */
+public class OldCheckRegistryFactory implements
+ LanguageSpecificMiddleEndFactory {
+
+ public LanguageSpecificMiddleEnd create(Object specificData) {
+ return new OldCheckRegistry(specificData);
+ }
+
+ public String getName() {
+ return "Check";
+ }
+
+ public int getPriority() {
+ return 0;
+ }
+
+}
diff --git a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/plugin/OldXtendRegistryFactory.java b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/plugin/OldXtendRegistryFactory.java
index d7c3d456..bd3c034a 100644
--- a/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/plugin/OldXtendRegistryFactory.java
+++ b/plugins/org.eclipse.xtend.middleend.xtend/src/org/eclipse/xtend/middleend/xtend/plugin/OldXtendRegistryFactory.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.middleend.xtend.plugin;
@@ -18,6 +19,7 @@ import org.eclipse.xtend.middleend.xtend.OldXtendRegistry;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class OldXtendRegistryFactory implements LanguageSpecificMiddleEndFactory {
diff --git a/plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/ast/CreateExtensionStatement.java b/plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/ast/CreateExtensionStatement.java
index 5e89b383..f17cbd1a 100644
--- a/plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/ast/CreateExtensionStatement.java
+++ b/plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/xtend/ast/CreateExtensionStatement.java
@@ -91,5 +91,9 @@ public class CreateExtensionStatement extends AbstractExtension {
protected Object evaluateInternal(final Object[] parameters, final ExecutionContext ctx) {
throw new UnsupportedOperationException();
}
+
+ public String getReturnVarName() {
+ return returnVarName;
+ }
}
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/aop/AopTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/aop/AopTest.java
index 6fc2773a..98d0518b 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/aop/AopTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/aop/AopTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,11 +7,13 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.aop;
import static org.eclipse.xtend.backend.testhelpers.BackendTestHelper.createEmptyExecutionContext;
-import static org.eclipse.xtend.backend.testhelpers.BackendTestHelper.*;
+import static org.eclipse.xtend.backend.testhelpers.BackendTestHelper.createEmptyFdc;
+import static org.eclipse.xtend.backend.testhelpers.BackendTestHelper.createFdc;
import static org.junit.Assert.assertEquals;
import java.util.ArrayList;
@@ -25,6 +27,7 @@ import org.eclipse.xtend.backend.common.BackendType;
import org.eclipse.xtend.backend.common.ExecutionContext;
import org.eclipse.xtend.backend.common.ExpressionBase;
import org.eclipse.xtend.backend.common.NamedFunction;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.expr.ConcatExpression;
import org.eclipse.xtend.backend.expr.InvocationOnObjectExpression;
import org.eclipse.xtend.backend.expr.LiteralExpression;
@@ -41,6 +44,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class AopTest {
@Test
@@ -54,24 +58,24 @@ public class AopTest {
final Pointcut pointCut = new ExecutionPointcut ("*", Collections.EMPTY_LIST, true, new AdviceParamType (ObjectType.INSTANCE, true));
registerAdvice (ctx, "pre-1", "post-1", true, pointCut, true);
- assertEquals ("pre-10post-1", ctx.getFunctionDefContext().invoke (ctx, "nextCounterValue", Collections.emptyList()).toString());
- assertEquals ("pre-11post-1", ctx.getFunctionDefContext().invoke (ctx, "nextCounterValue", Collections.emptyList()).toString());
+ assertEquals ("pre-10post-1", ctx.getFunctionDefContext().invoke (ctx, new QualifiedName ("nextCounterValue"), Collections.emptyList()).toString());
+ assertEquals ("pre-11post-1", ctx.getFunctionDefContext().invoke (ctx, new QualifiedName ("nextCounterValue"), Collections.emptyList()).toString());
// test wrapped advice, particularly the application order
final AdviceContext advCtx1 = ctx.getAdviceContext();
registerAdvice (ctx, "pre-2", "post-2", true, pointCut, true);
- assertEquals ("pre-1pre-22post-2post-1", ctx.getFunctionDefContext().invoke (ctx, "nextCounterValue", Collections.emptyList()).toString());
+ assertEquals ("pre-1pre-22post-2post-1", ctx.getFunctionDefContext().invoke (ctx, new QualifiedName ("nextCounterValue"), Collections.emptyList()).toString());
// test without calling proceed, and at the same time reverting to an earlier AdviceContext
ctx.setAdviceContext (advCtx1);
registerAdvice (ctx, "pre-3", "post-3", false, pointCut, true);
- assertEquals ("pre-1pre-3post-3post-1", ctx.getFunctionDefContext().invoke (ctx, "nextCounterValue", Collections.emptyList()).toString());
- assertEquals ("pre-1pre-3post-3post-1", ctx.getFunctionDefContext().invoke (ctx, "nextCounterValue", Collections.emptyList()).toString());
- assertEquals ("pre-1pre-3post-3post-1", ctx.getFunctionDefContext().invoke (ctx, "nextCounterValue", Collections.emptyList()).toString());
+ assertEquals ("pre-1pre-3post-3post-1", ctx.getFunctionDefContext().invoke (ctx, new QualifiedName ("nextCounterValue"), Collections.emptyList()).toString());
+ assertEquals ("pre-1pre-3post-3post-1", ctx.getFunctionDefContext().invoke (ctx, new QualifiedName ("nextCounterValue"), Collections.emptyList()).toString());
+ assertEquals ("pre-1pre-3post-3post-1", ctx.getFunctionDefContext().invoke (ctx, new QualifiedName ("nextCounterValue"), Collections.emptyList()).toString());
// test that the previous invocations did not reach the actual function implementation
ctx.setAdviceContext (advCtx1);
- assertEquals ("pre-13post-1", ctx.getFunctionDefContext().invoke (ctx, "nextCounterValue", Collections.emptyList()).toString());
+ assertEquals ("pre-13post-1", ctx.getFunctionDefContext().invoke (ctx, new QualifiedName ("nextCounterValue"), Collections.emptyList()).toString());
}
private void registerAdvice (ExecutionContext ctx, String prefix, String postfix, boolean proceed, Pointcut pointCut, boolean cached) {
@@ -99,10 +103,10 @@ public class AopTest {
registerAdvice (ctx, "collection ", "", true, pointCutCollection, false);
registerAdvice (ctx, "collection+ ", "", true, pointCutCollectionPlus, false);
- assertEquals ("object object+ f(Object)", ctx.getFunctionDefContext().invoke(ctx, "f", Arrays.asList (new Object ())).toString());
- assertEquals ("object object+ f(Object)", ctx.getFunctionDefContext().invoke(ctx, "f", Arrays.asList ("")).toString());
- assertEquals ("object+ collection collection+ f(Collection)", ctx.getFunctionDefContext().invoke(ctx, "f", Arrays.asList (new HashSet<Object> ())).toString());
- assertEquals ("object+ collection+ f(List)", ctx.getFunctionDefContext().invoke(ctx, "f", Arrays.asList (new ArrayList<Object> ())).toString());
+ assertEquals ("object object+ f(Object)", ctx.getFunctionDefContext().invoke(ctx, new QualifiedName ("f"), Arrays.asList (new Object ())).toString());
+ assertEquals ("object object+ f(Object)", ctx.getFunctionDefContext().invoke(ctx, new QualifiedName ("f"), Arrays.asList ("")).toString());
+ assertEquals ("object+ collection collection+ f(Collection)", ctx.getFunctionDefContext().invoke(ctx, new QualifiedName ("f"), Arrays.asList (new HashSet<Object> ())).toString());
+ assertEquals ("object+ collection+ f(List)", ctx.getFunctionDefContext().invoke(ctx, new QualifiedName ("f"), Arrays.asList (new ArrayList<Object> ())).toString());
}
@SuppressWarnings("unchecked")
@@ -123,10 +127,10 @@ public class AopTest {
registerAdvice (ctx, "collection ", "", true, pointCutCollection, false);
registerAdvice (ctx, "collection+ ", "", true, pointCutCollectionPlus, false);
- assertEquals ("object object+ f(Object)", ctx.getFunctionDefContext().invoke(ctx, "f", Arrays.asList (new Object ())).toString());
- assertEquals ("object object+ f(Object)", ctx.getFunctionDefContext().invoke(ctx, "f", Arrays.asList ("")).toString());
- assertEquals ("object+ collection collection+ f(Collection)", ctx.getFunctionDefContext().invoke(ctx, "f", Arrays.asList (new HashSet<Object> ())).toString());
- assertEquals ("object+ collection+ f(List)", ctx.getFunctionDefContext().invoke(ctx, "f", Arrays.asList (new ArrayList<Object> ())).toString());
+ assertEquals ("object object+ f(Object)", ctx.getFunctionDefContext().invoke(ctx, new QualifiedName ("f"), Arrays.asList (new Object ())).toString());
+ assertEquals ("object object+ f(Object)", ctx.getFunctionDefContext().invoke(ctx, new QualifiedName ("f"), Arrays.asList ("")).toString());
+ assertEquals ("object+ collection collection+ f(Collection)", ctx.getFunctionDefContext().invoke(ctx, new QualifiedName ("f"), Arrays.asList (new HashSet<Object> ())).toString());
+ assertEquals ("object+ collection+ f(List)", ctx.getFunctionDefContext().invoke(ctx, new QualifiedName ("f"), Arrays.asList (new ArrayList<Object> ())).toString());
}
@SuppressWarnings("unchecked")
@@ -159,8 +163,8 @@ public class AopTest {
registerAdvice (ctx, "bothIn ", "", true, pointCutBothIn, false);
- assertEquals ("firstPre firstPost firstIn firstIn2 bothIn first", ctx.getFunctionDefContext().invoke (ctx, "firstFunction", Collections.emptyList()).toString());
- assertEquals ("secondPre secondPost secondIn secondIn2 bothIn second", ctx.getFunctionDefContext().invoke (ctx, "secondFunction", Collections.emptyList()).toString());
+ assertEquals ("firstPre firstPost firstIn firstIn2 bothIn first", ctx.getFunctionDefContext().invoke (ctx, new QualifiedName ("firstFunction"), Collections.emptyList()).toString());
+ assertEquals ("secondPre secondPost secondIn secondIn2 bothIn second", ctx.getFunctionDefContext().invoke (ctx, new QualifiedName ("secondFunction"), Collections.emptyList()).toString());
}
private long _counter = 0;
@@ -175,7 +179,7 @@ public class AopTest {
final FunctionDefContextInternal fdc = createFdc (ctx.getTypesystem(), CounterFunction.class);
ctx.setFunctionDefContext (fdc);
- fdc.register (new NamedFunction ("f", new AbstractFunction (null, new ArrayList<BackendType> (), true) {
+ fdc.register (new NamedFunction (new QualifiedName ("f"), new AbstractFunction (null, new ArrayList<BackendType> (), true) {
public Object invoke (ExecutionContext localCtx, Object[] params) {
return _counter++;
}
@@ -187,9 +191,9 @@ public class AopTest {
registerSideEffectAdvice (ctx, "second ", pointCut, false);
registerSideEffectAdvice (ctx, "third ", pointCut, true);
- assertEquals ("first 0 second 1 third 2 0", ctx.getFunctionDefContext().invoke (ctx, "f", Collections.EMPTY_LIST).toString());
- assertEquals ("first 3 second 4 third 2 0", ctx.getFunctionDefContext().invoke (ctx, "f", Collections.EMPTY_LIST).toString());
- assertEquals ("first 5 second 6 third 2 0", ctx.getFunctionDefContext().invoke (ctx, "f", Collections.EMPTY_LIST).toString());
+ assertEquals ("first 0 second 1 third 2 0", ctx.getFunctionDefContext().invoke (ctx, new QualifiedName ("f"), Collections.EMPTY_LIST).toString());
+ assertEquals ("first 3 second 4 third 2 0", ctx.getFunctionDefContext().invoke (ctx, new QualifiedName ("f"), Collections.EMPTY_LIST).toString());
+ assertEquals ("first 5 second 6 third 2 0", ctx.getFunctionDefContext().invoke (ctx, new QualifiedName ("f"), Collections.EMPTY_LIST).toString());
}
@SuppressWarnings("unchecked")
@@ -197,7 +201,7 @@ public class AopTest {
final List<ExpressionBase> toBeConcatenated = new ArrayList<ExpressionBase> ();
toBeConcatenated.add (new LiteralExpression (marker, null));
- toBeConcatenated.add (new InvocationOnObjectExpression ("nextCounterValue", Collections.EMPTY_LIST, true, null));
+ toBeConcatenated.add (new InvocationOnObjectExpression (new QualifiedName ("nextCounterValue"), Collections.EMPTY_LIST, true, null));
toBeConcatenated.add (new LiteralExpression (" ", null));
toBeConcatenated.add (ConcatAdviceFactory.createProceedExpression());
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/aop/ConcatAdviceFactory.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/aop/ConcatAdviceFactory.java
index 3e053151..21bd13b7 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/aop/ConcatAdviceFactory.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/aop/ConcatAdviceFactory.java
@@ -1,3 +1,14 @@
+/*
+Copyright (c) 2008 Arno Haase, André Arnold.
+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
+ André Arnold
+ */
package org.eclipse.xtend.backend.aop;
import java.util.ArrayList;
@@ -5,6 +16,7 @@ import java.util.Arrays;
import java.util.List;
import org.eclipse.xtend.backend.common.ExpressionBase;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.common.SyntaxConstants;
import org.eclipse.xtend.backend.expr.ConcatExpression;
import org.eclipse.xtend.backend.expr.InvocationOnObjectExpression;
@@ -24,6 +36,6 @@ class ConcatAdviceFactory {
}
public static ExpressionBase createProceedExpression () {
- return new InvocationOnObjectExpression ("proceed", Arrays.asList (new LocalVarEvalExpression (SyntaxConstants.THIS_JOINPOINT, null)), true, null);
+ return new InvocationOnObjectExpression (new QualifiedName ("proceed"), Arrays.asList (new LocalVarEvalExpression (SyntaxConstants.THIS_JOINPOINT, null)), true, null);
}
}
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/common/ExpressionBaseTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/common/ExpressionBaseTest.java
index 1b3390dc..4db809be 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/common/ExpressionBaseTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/common/ExpressionBaseTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.common;
@@ -24,6 +25,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class ExpressionBaseTest {
private final List<String> _log = new ArrayList<String> ();
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/common/QualifiedNameTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/common/QualifiedNameTest.java
new file mode 100644
index 00000000..fbadac02
--- /dev/null
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/common/QualifiedNameTest.java
@@ -0,0 +1,45 @@
+/*
+Copyright (c) 2008 André Arnold.
+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:
+ André Arnold - initial API and implementation
+ */
+package org.eclipse.xtend.backend.common;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+/**
+ *
+ * @author André Arnold
+ *
+ */
+public class QualifiedNameTest {
+
+ private final String _fqn = "org::eclipse::xtend::backend::test::someName";
+ private final String _simpleName = "someName";
+
+ @Test
+ public void testFqn() {
+ QualifiedName name = new QualifiedName(_fqn);
+
+ assertEquals("someName", name.getSimpleName());
+ assertEquals("org::eclipse::xtend::backend::test", name.getNameSpace());
+ assertEquals(_fqn, name.getFullQualifiedName());
+
+ }
+
+ @Test
+ public void testSimpleName() {
+ QualifiedName name = new QualifiedName(_simpleName);
+
+ assertEquals("someName", name.getSimpleName());
+ assertNull(name.getNameSpace());
+ assertEquals(_simpleName, name.getFullQualifiedName());
+
+ }
+}
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/AndExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/AndExpressionTest.java
index 424cb266..3cba41a4 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/AndExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/AndExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -20,6 +21,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class AndExpressionTest {
@Test public void testLogic () {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/ConcatExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/ConcatExpressionTest.java
index 5d9f4ffe..225a6b87 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/ConcatExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/ConcatExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -29,6 +30,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class ConcatExpressionTest {
@Test public void testLogic () {
@@ -46,7 +48,7 @@ public class ConcatExpressionTest {
}
@Test public void testUsesToStringExtension () {
- final NamedFunction myToString = new NamedFunctionFactory (Helpers.TO_STRING_METHOD_NAME, ObjectType.INSTANCE) {
+ final NamedFunction myToString = new NamedFunctionFactory (Helpers.TO_STRING_METHOD_NAME.getSimpleName(), ObjectType.INSTANCE) {
public Object invoke (ExecutionContext ctx, Object[] params) {
return "#" + params[0] + "!";
}
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/CreateCachedExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/CreateCachedExpressionTest.java
index d3dff233..8b4e33bd 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/CreateCachedExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/CreateCachedExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -30,6 +31,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class CreateCachedExpressionTest {
private ExecutionContext _ctx = null;
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/CreateUncachedExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/CreateUncachedExpressionTest.java
index bd4bfa72..5b62861c 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/CreateUncachedExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/CreateUncachedExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -25,6 +26,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class CreateUncachedExpressionTest {
private ExecutionContext _ctx = null;
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/HidingLocalVarDefExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/HidingLocalVarDefExpressionTest.java
index 9ff08bb3..c3203eeb 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/HidingLocalVarDefExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/HidingLocalVarDefExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -23,6 +24,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class HidingLocalVarDefExpressionTest {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/IfExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/IfExpressionTest.java
index 9da8784a..61e40cfc 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/IfExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/IfExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -23,6 +24,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class IfExpressionTest {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InitClosureExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InitClosureExpressionTest.java
index 2691efc5..05c018cb 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InitClosureExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InitClosureExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,10 +7,13 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
-import static org.eclipse.xtend.backend.testhelpers.BackendTestHelper.*;
+import static org.eclipse.xtend.backend.testhelpers.BackendTestHelper.SOURCE_POS;
+import static org.eclipse.xtend.backend.testhelpers.BackendTestHelper.createEmptyExecutionContext;
+import static org.eclipse.xtend.backend.testhelpers.BackendTestHelper.createEmptyFdc;
import static org.junit.Assert.assertEquals;
import java.util.ArrayList;
@@ -24,6 +27,7 @@ import org.eclipse.xtend.backend.common.ExecutionContext;
import org.eclipse.xtend.backend.common.ExpressionBase;
import org.eclipse.xtend.backend.common.Function;
import org.eclipse.xtend.backend.common.NamedFunction;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.functions.AbstractFunction;
import org.eclipse.xtend.backend.functions.FunctionDefContextInternal;
import org.eclipse.xtend.backend.types.CompositeTypesystem;
@@ -34,6 +38,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class InitClosureExpressionTest {
@@ -78,14 +83,14 @@ public class InitClosureExpressionTest {
final BackendTypesystem ts = new CompositeTypesystem ();
final FunctionDefContextInternal fdc = createEmptyFdc (ts);
- fdc.register (new NamedFunction ("myFunction", new AbstractFunction (null, new ArrayList<BackendType> (), false) {
+ fdc.register (new NamedFunction (new QualifiedName ("myFunction"), new AbstractFunction (null, new ArrayList<BackendType> (), false) {
public Object invoke (ExecutionContext ctx, Object[] params) {
return "myResult";
}
}), true);
final ExecutionContext initCtx = BackendFacade.createExecutionContext (fdc, ts, true);
- final ExpressionBase body = new InvocationOnObjectExpression ("myFunction", new ArrayList<ExpressionBase> (), false, SOURCE_POS);
+ final ExpressionBase body = new InvocationOnObjectExpression (new QualifiedName ("myFunction"), new ArrayList<ExpressionBase> (), false, SOURCE_POS);
final Function closure = (Function) new InitClosureExpression (new ArrayList<String>(), new ArrayList<BackendType>(), body, SOURCE_POS).evaluate (initCtx);
assertEquals ("myResult", closure.invoke(createEmptyExecutionContext(), new Object[]{}));
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InvocationOnCollectionExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InvocationOnCollectionExpressionTest.java
index 7cbd285f..529d4fbe 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InvocationOnCollectionExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InvocationOnCollectionExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -17,20 +18,22 @@ import static org.junit.Assert.assertEquals;
import java.util.Arrays;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class InvocationOnCollectionExpressionTest {
@Test public void testInvocation () {
- assertEquals (Arrays.asList (3L, 4L, 5L), new InvocationOnCollectionExpression (createLiteral (Arrays.asList(1L, 2L, 3L)), "operatorPlus", Arrays.asList (createLiteral (2L)), SOURCE_POS).evaluate (createEmptyExecutionContext ()));
- assertEquals (null, new InvocationOnCollectionExpression (createLiteral (null), "operatorPlus", Arrays.asList (createLiteral (2L)), SOURCE_POS).evaluate (createEmptyExecutionContext ()));
+ assertEquals (Arrays.asList (3L, 4L, 5L), new InvocationOnCollectionExpression (createLiteral (Arrays.asList(1L, 2L, 3L)), new QualifiedName ("operatorPlus"), Arrays.asList (createLiteral (2L)), SOURCE_POS).evaluate (createEmptyExecutionContext ()));
+ assertEquals (null, new InvocationOnCollectionExpression (createLiteral (null), new QualifiedName ("operatorPlus"), Arrays.asList (createLiteral (2L)), SOURCE_POS).evaluate (createEmptyExecutionContext ()));
}
@Test public void testFlatten () {
- assertEquals (Arrays.asList("a","b","b","c","d"), new InvocationOnCollectionExpression (createLiteral (Arrays.asList ("a,b", "b,c,d")), "split", Arrays.asList (createLiteral (",")), SOURCE_POS).evaluate (createEmptyExecutionContext()));
+ assertEquals (Arrays.asList("a","b","b","c","d"), new InvocationOnCollectionExpression (createLiteral (Arrays.asList ("a,b", "b,c,d")), new QualifiedName ("split"), Arrays.asList (createLiteral (",")), SOURCE_POS).evaluate (createEmptyExecutionContext()));
}
}
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InvocationOnObjectExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InvocationOnObjectExpressionTest.java
index 6ca97baf..4f32476c 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InvocationOnObjectExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InvocationOnObjectExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,33 +7,39 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
-import static org.eclipse.xtend.backend.testhelpers.BackendTestHelper.*;
-import static org.junit.Assert.*;
+import static org.eclipse.xtend.backend.testhelpers.BackendTestHelper.SOURCE_POS;
+import static org.eclipse.xtend.backend.testhelpers.BackendTestHelper.createEmptyExecutionContext;
+import static org.eclipse.xtend.backend.testhelpers.BackendTestHelper.createLiteral;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
import java.util.Arrays;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class InvocationOnObjectExpressionTest {
@Test public void testInvocation () {
- assertEquals (3L, new InvocationOnObjectExpression ("operatorPlus", Arrays.asList (createLiteral (1L), createLiteral (2L)), false, SOURCE_POS).evaluate (createEmptyExecutionContext ()));
- assertEquals (3L, new InvocationOnObjectExpression ("operatorPlus", Arrays.asList (createLiteral (1L), createLiteral (2L)), true, SOURCE_POS).evaluate (createEmptyExecutionContext ()));
- assertEquals (Arrays.asList (1L), new InvocationOnObjectExpression ("toList", Arrays.asList (createLiteral (Arrays.asList(1L))), false, SOURCE_POS).evaluate (createEmptyExecutionContext()));
- assertEquals (Arrays.asList (1L), new InvocationOnObjectExpression ("toList", Arrays.asList (createLiteral (Arrays.asList(1L))), true, SOURCE_POS).evaluate (createEmptyExecutionContext()));
+ assertEquals (3L, new InvocationOnObjectExpression (new QualifiedName ("operatorPlus"), Arrays.asList (createLiteral (1L), createLiteral (2L)), false, SOURCE_POS).evaluate (createEmptyExecutionContext ()));
+ assertEquals (3L, new InvocationOnObjectExpression (new QualifiedName ("operatorPlus"), Arrays.asList (createLiteral (1L), createLiteral (2L)), true, SOURCE_POS).evaluate (createEmptyExecutionContext ()));
+ assertEquals (Arrays.asList (1L), new InvocationOnObjectExpression (new QualifiedName ("toList"), Arrays.asList (createLiteral (Arrays.asList(1L))), false, SOURCE_POS).evaluate (createEmptyExecutionContext()));
+ assertEquals (Arrays.asList (1L), new InvocationOnObjectExpression (new QualifiedName ("toList"), Arrays.asList (createLiteral (Arrays.asList(1L))), true, SOURCE_POS).evaluate (createEmptyExecutionContext()));
- assertEquals (null, new InvocationOnObjectExpression ("toList", Arrays.asList (createLiteral (null)), true, SOURCE_POS).evaluate (createEmptyExecutionContext()));
- assertEquals (null, new InvocationOnObjectExpression ("operatorPlus", Arrays.asList (createLiteral (null), createLiteral (2L)), true, SOURCE_POS).evaluate (createEmptyExecutionContext()));
+ assertEquals (null, new InvocationOnObjectExpression (new QualifiedName ("toList"), Arrays.asList (createLiteral (null)), true, SOURCE_POS).evaluate (createEmptyExecutionContext()));
+ assertEquals (null, new InvocationOnObjectExpression (new QualifiedName ("operatorPlus"), Arrays.asList (createLiteral (null), createLiteral (2L)), true, SOURCE_POS).evaluate (createEmptyExecutionContext()));
try {
- new InvocationOnObjectExpression ("operatorPlus", Arrays.asList (createLiteral (null), createLiteral (2L)), false, SOURCE_POS).evaluate (createEmptyExecutionContext());
+ new InvocationOnObjectExpression (new QualifiedName ("operatorPlus"), Arrays.asList (createLiteral (null), createLiteral (2L)), false, SOURCE_POS).evaluate (createEmptyExecutionContext());
fail ("exception expected");
}
catch (Exception exc) {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InvocationOnWhateverExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InvocationOnWhateverExpressionTest.java
index 903ddf64..1c879908 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InvocationOnWhateverExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/InvocationOnWhateverExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -19,6 +20,7 @@ import static org.junit.Assert.fail;
import java.util.Arrays;
import java.util.Collections;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.junit.Test;
@@ -26,23 +28,24 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class InvocationOnWhateverExpressionTest {
@SuppressWarnings("unchecked")
@Test public void testInvocationOnObject () {
- assertEquals (3L, new InvocationOnWhateverExpression ("operatorPlus", Arrays.asList (createLiteral (1L), createLiteral (2L)), false, SOURCE_POS).evaluate (createEmptyExecutionContext ()));
- assertEquals (3L, new InvocationOnWhateverExpression ("operatorPlus", Arrays.asList (createLiteral (1L), createLiteral (2L)), true, SOURCE_POS).evaluate (createEmptyExecutionContext ()));
- assertEquals (Arrays.asList (1L), new InvocationOnWhateverExpression ("toList", Arrays.asList (createLiteral (Arrays.asList(1L))), false, SOURCE_POS).evaluate (createEmptyExecutionContext()));
- assertEquals (Arrays.asList (1L), new InvocationOnWhateverExpression ("toList", Arrays.asList (createLiteral (Arrays.asList(1L))), true, SOURCE_POS).evaluate (createEmptyExecutionContext()));
+ assertEquals (3L, new InvocationOnWhateverExpression (new QualifiedName ("operatorPlus"), Arrays.asList (createLiteral (1L), createLiteral (2L)), false, SOURCE_POS).evaluate (createEmptyExecutionContext ()));
+ assertEquals (3L, new InvocationOnWhateverExpression (new QualifiedName ("operatorPlus"), Arrays.asList (createLiteral (1L), createLiteral (2L)), true, SOURCE_POS).evaluate (createEmptyExecutionContext ()));
+ assertEquals (Arrays.asList (1L), new InvocationOnWhateverExpression (new QualifiedName ("toList"), Arrays.asList (createLiteral (Arrays.asList(1L))), false, SOURCE_POS).evaluate (createEmptyExecutionContext()));
+ assertEquals (Arrays.asList (1L), new InvocationOnWhateverExpression (new QualifiedName ("toList"), Arrays.asList (createLiteral (Arrays.asList(1L))), true, SOURCE_POS).evaluate (createEmptyExecutionContext()));
- assertEquals (Arrays.asList (Collections.singleton (1L)), new InvocationOnWhateverExpression ("toList", Arrays.asList (createLiteral (Collections.singleton (Collections.singleton (1L)))), false, SOURCE_POS).evaluate (createEmptyExecutionContext()));
- assertEquals (Arrays.asList (Collections.singleton (1L)), new InvocationOnWhateverExpression ("toList", Arrays.asList (createLiteral (Collections.singleton (Collections.singleton (1L)))), true, SOURCE_POS).evaluate (createEmptyExecutionContext()));
+ assertEquals (Arrays.asList (Collections.singleton (1L)), new InvocationOnWhateverExpression (new QualifiedName ("toList"), Arrays.asList (createLiteral (Collections.singleton (Collections.singleton (1L)))), false, SOURCE_POS).evaluate (createEmptyExecutionContext()));
+ assertEquals (Arrays.asList (Collections.singleton (1L)), new InvocationOnWhateverExpression (new QualifiedName ("toList"), Arrays.asList (createLiteral (Collections.singleton (Collections.singleton (1L)))), true, SOURCE_POS).evaluate (createEmptyExecutionContext()));
- assertEquals (null, new InvocationOnWhateverExpression ("toList", Arrays.asList (createLiteral (null)), true, SOURCE_POS).evaluate (createEmptyExecutionContext()));
- assertEquals (null, new InvocationOnWhateverExpression ("operatorPlus", Arrays.asList (createLiteral (null), createLiteral (2L)), true, SOURCE_POS).evaluate (createEmptyExecutionContext()));
+ assertEquals (null, new InvocationOnWhateverExpression (new QualifiedName ("toList"), Arrays.asList (createLiteral (null)), true, SOURCE_POS).evaluate (createEmptyExecutionContext()));
+ assertEquals (null, new InvocationOnWhateverExpression (new QualifiedName ("operatorPlus"), Arrays.asList (createLiteral (null), createLiteral (2L)), true, SOURCE_POS).evaluate (createEmptyExecutionContext()));
try {
- new InvocationOnWhateverExpression ("operatorPlus", Arrays.asList (createLiteral (null), createLiteral (2L)), false, SOURCE_POS).evaluate (createEmptyExecutionContext());
+ new InvocationOnWhateverExpression (new QualifiedName ("operatorPlus"), Arrays.asList (createLiteral (null), createLiteral (2L)), false, SOURCE_POS).evaluate (createEmptyExecutionContext());
fail ("exception expected");
}
catch (Exception exc) {
@@ -50,16 +53,16 @@ public class InvocationOnWhateverExpressionTest {
}
@Test public void testPrecedenceOfCollectionOperation () {
- assertEquals ("[1, 2, 3]4", new InvocationOnWhateverExpression ("operatorPlus", Arrays.asList (createLiteral (Arrays.asList (1L, 2L, 3L)), createLiteral (4L)), true, SOURCE_POS).evaluate (createEmptyExecutionContext ()).toString());
- assertEquals ("[1, 2, 3]4", new InvocationOnWhateverExpression ("operatorPlus", Arrays.asList (createLiteral (Arrays.asList (1L, 2L, 3L)), createLiteral (4L)), false, SOURCE_POS).evaluate (createEmptyExecutionContext ()).toString());
+ assertEquals ("[1, 2, 3]4", new InvocationOnWhateverExpression (new QualifiedName ("operatorPlus"), Arrays.asList (createLiteral (Arrays.asList (1L, 2L, 3L)), createLiteral (4L)), true, SOURCE_POS).evaluate (createEmptyExecutionContext ()).toString());
+ assertEquals ("[1, 2, 3]4", new InvocationOnWhateverExpression (new QualifiedName ("operatorPlus"), Arrays.asList (createLiteral (Arrays.asList (1L, 2L, 3L)), createLiteral (4L)), false, SOURCE_POS).evaluate (createEmptyExecutionContext ()).toString());
}
@Test public void testInvocationOnCollection () {
- assertEquals (Arrays.asList (1L, 2L, 3L), new InvocationOnWhateverExpression ("operatorMinus", Arrays.asList (createLiteral (Arrays.asList (3L, 4L, 5L)), createLiteral (2L)), true, SOURCE_POS).evaluate (createEmptyExecutionContext ()));
- assertEquals (Arrays.asList (1L, 2L, 3L), new InvocationOnWhateverExpression ("operatorMinus", Arrays.asList (createLiteral (Arrays.asList (3L, 4L, 5L)), createLiteral (2L)), false, SOURCE_POS).evaluate (createEmptyExecutionContext ()));
+ assertEquals (Arrays.asList (1L, 2L, 3L), new InvocationOnWhateverExpression (new QualifiedName ("operatorMinus"), Arrays.asList (createLiteral (Arrays.asList (3L, 4L, 5L)), createLiteral (2L)), true, SOURCE_POS).evaluate (createEmptyExecutionContext ()));
+ assertEquals (Arrays.asList (1L, 2L, 3L), new InvocationOnWhateverExpression (new QualifiedName ("operatorMinus"), Arrays.asList (createLiteral (Arrays.asList (3L, 4L, 5L)), createLiteral (2L)), false, SOURCE_POS).evaluate (createEmptyExecutionContext ()));
}
@Test public void testFlatten () {
- assertEquals (Arrays.asList("a","b","b","c","d"), new InvocationOnWhateverExpression ("split", Arrays.asList (createLiteral (Arrays.asList ("a,b", "b,c,d")), createLiteral (",")), false, SOURCE_POS).evaluate (createEmptyExecutionContext()));
+ assertEquals (Arrays.asList("a","b","b","c","d"), new InvocationOnWhateverExpression (new QualifiedName ("split"), Arrays.asList (createLiteral (Arrays.asList ("a,b", "b,c,d")), createLiteral (",")), false, SOURCE_POS).evaluate (createEmptyExecutionContext()));
}
}
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/ListLiteralExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/ListLiteralExpressionTest.java
index 2e99bd8d..47b645dc 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/ListLiteralExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/ListLiteralExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -25,6 +26,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class ListLiteralExpressionTest {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/LiteralExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/LiteralExpressionTest.java
index cb0c626d..8f6d1478 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/LiteralExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/LiteralExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -20,6 +21,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class LiteralExpressionTest {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/LocalVarEvalExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/LocalVarEvalExpressionTest.java
index e72268d6..66c6524a 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/LocalVarEvalExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/LocalVarEvalExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -20,6 +21,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class LocalVarEvalExpressionTest {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/NewLocalVarDefExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/NewLocalVarDefExpressionTest.java
index 1858a5b9..0f57269b 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/NewLocalVarDefExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/NewLocalVarDefExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -23,6 +24,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class NewLocalVarDefExpressionTest {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/OrExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/OrExpressionTest.java
index 5969a487..d94be8db 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/OrExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/OrExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -20,6 +21,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class OrExpressionTest {
@Test public void testLogic () {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/PropertyOnCollectionExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/PropertyOnCollectionExpressionTest.java
index df2ada8b..f26ae6ae 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/PropertyOnCollectionExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/PropertyOnCollectionExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -24,6 +25,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class PropertyOnCollectionExpressionTest {
@Test public void testLogic () {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/PropertyOnObjectExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/PropertyOnObjectExpressionTest.java
index 07ff8c9b..0e168ac3 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/PropertyOnObjectExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/PropertyOnObjectExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -24,6 +25,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class PropertyOnObjectExpressionTest {
@Test public void testLogic () {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/PropertyOnWhateverExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/PropertyOnWhateverExpressionTest.java
index cc196c7f..2ec094c3 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/PropertyOnWhateverExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/PropertyOnWhateverExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -24,6 +25,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class PropertyOnWhateverExpressionTest {
@Test public void testLogic () {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/SequenceExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/SequenceExpressionTest.java
index 10287121..09fad7ee 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/SequenceExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/SequenceExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -23,6 +24,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class SequenceExpressionTest {
@Test public void testLogic () {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/SetPropertyExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/SetPropertyExpressionTest.java
index a001f9c7..cd12b341 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/SetPropertyExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/SetPropertyExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -25,6 +26,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class SetPropertyExpressionTest {
@Test public void testReadWrite () {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/SwitchExpressionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/SwitchExpressionTest.java
index a9997387..f9f5eb9f 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/SwitchExpressionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/expr/SwitchExpressionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.expr;
@@ -31,6 +32,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class SwitchExpressionTest {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/functions/FunctionTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/functions/FunctionTest.java
index e60bd87e..9078ebd0 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/functions/FunctionTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/functions/FunctionTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.functions;
@@ -19,6 +20,7 @@ import java.util.ArrayList;
import org.eclipse.xtend.backend.common.EfficientLazyString;
import org.eclipse.xtend.backend.common.ExecutionContext;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.testhelpers.CounterFunction;
import org.eclipse.xtend.backend.testhelpers.NamedFunctionFactory;
import org.junit.Test;
@@ -27,6 +29,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class FunctionTest {
@Test public void testCachedAndSingleInstance () {
@@ -37,23 +40,23 @@ public class FunctionTest {
fdc.register (new NamedFunctionFactory ("myCached", true, fdc) {
public Object invoke (ExecutionContext innerCtx, Object[] params) {
- return innerCtx.getFunctionDefContext().invoke (innerCtx, "nextCounterValue", new ArrayList<Object> ());
+ return innerCtx.getFunctionDefContext().invoke (innerCtx, new QualifiedName ("nextCounterValue"), new ArrayList<Object> ());
}
}.create(), true);
fdc.register (new NamedFunctionFactory ("myUncached", false, fdc) {
public Object invoke (ExecutionContext innerCtx, Object[] params) {
- return innerCtx.getFunctionDefContext().invoke (innerCtx, "nextCounterValue", new ArrayList<Object> ());
+ return innerCtx.getFunctionDefContext().invoke (innerCtx, new QualifiedName ("nextCounterValue"), new ArrayList<Object> ());
}
}.create(), true);
- assertEquals (0L, fdc.invoke (ctx, "myUncached", new ArrayList<Object> ()));
- assertEquals (1L, fdc.invoke (ctx, "myUncached", new ArrayList<Object> ()));
- assertEquals (2L, fdc.invoke (ctx, "myCached", new ArrayList<Object> ()));
- assertEquals (2L, fdc.invoke (ctx, "myCached", new ArrayList<Object> ()));
- assertEquals (3L, fdc.invoke (ctx, "myUncached", new ArrayList<Object> ()));
- assertEquals (2L, fdc.invoke (ctx, "myCached", new ArrayList<Object> ()));
- assertEquals (4L, fdc.invoke (ctx, "myUncached", new ArrayList<Object> ()));
- assertEquals (2L, fdc.invoke (ctx, "myCached", new ArrayList<Object> ()));
+ assertEquals (0L, fdc.invoke (ctx, new QualifiedName ("myUncached"), new ArrayList<Object> ()));
+ assertEquals (1L, fdc.invoke (ctx, new QualifiedName ("myUncached"), new ArrayList<Object> ()));
+ assertEquals (2L, fdc.invoke (ctx, new QualifiedName ("myCached"), new ArrayList<Object> ()));
+ assertEquals (2L, fdc.invoke (ctx, new QualifiedName ("myCached"), new ArrayList<Object> ()));
+ assertEquals (3L, fdc.invoke (ctx, new QualifiedName ("myUncached"), new ArrayList<Object> ()));
+ assertEquals (2L, fdc.invoke (ctx, new QualifiedName ("myCached"), new ArrayList<Object> ()));
+ assertEquals (4L, fdc.invoke (ctx, new QualifiedName ("myUncached"), new ArrayList<Object> ()));
+ assertEquals (2L, fdc.invoke (ctx, new QualifiedName ("myCached"), new ArrayList<Object> ()));
}
@Test public void testImmutableCachedStringResult () {
@@ -69,8 +72,8 @@ public class FunctionTest {
}
}.create(), true);
- assertEquals ("Hi Arno", fdc.invoke (ctx, "myCached", new ArrayList<Object> ()).toString());
- EfficientLazyString.createAppendedString ((EfficientLazyString) fdc.invoke (ctx, "myCached", new ArrayList<Object> ()), "... and something else");
- assertEquals ("Hi Arno", fdc.invoke (ctx, "myCached", new ArrayList<Object> ()).toString());
+ assertEquals ("Hi Arno", fdc.invoke (ctx, new QualifiedName ("myCached"), new ArrayList<Object> ()).toString());
+ EfficientLazyString.createAppendedString ((EfficientLazyString) fdc.invoke (ctx, new QualifiedName ("myCached"), new ArrayList<Object> ()), "... and something else");
+ assertEquals ("Hi Arno", fdc.invoke (ctx, new QualifiedName ("myCached"), new ArrayList<Object> ()).toString());
}
}
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/functions/PolymorphicResolverTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/functions/PolymorphicResolverTest.java
index bc5431f6..a1aa2ffa 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/functions/PolymorphicResolverTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/functions/PolymorphicResolverTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,16 +7,19 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.functions;
-import static org.eclipse.xtend.backend.testhelpers.BackendTestHelper.*;
+import static org.eclipse.xtend.backend.testhelpers.BackendTestHelper.createEmptyExecutionContext;
+import static org.eclipse.xtend.backend.testhelpers.BackendTestHelper.createEmptyFdc;
import static org.junit.Assert.assertEquals;
import java.util.Arrays;
import java.util.Collection;
import org.eclipse.xtend.backend.common.Function;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.functions.internal.FunctionDefContextImpl;
import org.eclipse.xtend.backend.functions.internal.PolymorphicResolver;
import org.eclipse.xtend.backend.types.CompositeTypesystem;
@@ -25,6 +28,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class PolymorphicResolverTest {
@Test public void testWithoutGuards () {
@@ -47,7 +51,7 @@ public class PolymorphicResolverTest {
private Collection<Function> getCandidates (Object... params) {
final FunctionDefContextImpl fdc = (FunctionDefContextImpl) createEmptyFdc (new CompositeTypesystem ());
- return new PolymorphicResolver ("operatorPlus").getBestFitCandidates (fdc.findFunctionCandidates ("operatorPlus", fdc.typesForParameters(createEmptyExecutionContext().getTypesystem(), Arrays.asList (params))));
+ return new PolymorphicResolver (new QualifiedName ("operatorPlus")).getBestFitCandidates (fdc.findFunctionCandidates (new QualifiedName ("operatorPlus"), fdc.typesForParameters(createEmptyExecutionContext().getTypesystem(), Arrays.asList (params))));
}
//TODO test resolution with guards
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/syslib/OverrideTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/syslib/OverrideTest.java
index 15026e32..0c8e47e2 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/syslib/OverrideTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/syslib/OverrideTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.syslib;
@@ -30,6 +31,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class OverrideTest {
/**
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/BackendTestHelper.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/BackendTestHelper.java
index a56f0195..6f8fdd1d 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/BackendTestHelper.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/BackendTestHelper.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.testhelpers;
@@ -25,6 +26,7 @@ import org.eclipse.xtend.middleend.javaannotations.JavaFunctionClassContributor;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class BackendTestHelper {
public static final SourcePos SOURCE_POS = createSourcePos();
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/CheckEvaluationExpression.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/CheckEvaluationExpression.java
index 94ba6dec..0eb7773f 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/CheckEvaluationExpression.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/CheckEvaluationExpression.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.testhelpers;
@@ -21,6 +22,7 @@ import org.eclipse.xtend.backend.common.ExpressionBase;
* expression was actually evaluated.
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class CheckEvaluationExpression extends ExpressionBase{
public Object _value;
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/ExceptionThrowingExpression.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/ExceptionThrowingExpression.java
index 4d8c6c4c..d2186b47 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/ExceptionThrowingExpression.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/ExceptionThrowingExpression.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.testhelpers;
@@ -17,6 +18,7 @@ import org.eclipse.xtend.backend.common.ExpressionBase;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class ExceptionThrowingExpression extends ExpressionBase {
public ExceptionThrowingExpression () {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/MutableLiteralExpression.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/MutableLiteralExpression.java
index a1945dc5..67d7ce27 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/MutableLiteralExpression.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/MutableLiteralExpression.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.testhelpers;
@@ -17,6 +18,7 @@ import org.eclipse.xtend.backend.common.ExpressionBase;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class MutableLiteralExpression extends ExpressionBase {
private Object _value;
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/NamedFunctionFactory.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/NamedFunctionFactory.java
index 2344f159..36e2bc70 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/NamedFunctionFactory.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/testhelpers/NamedFunctionFactory.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.testhelpers;
@@ -17,6 +18,7 @@ import java.util.Arrays;
import org.eclipse.xtend.backend.common.BackendType;
import org.eclipse.xtend.backend.common.FunctionDefContext;
import org.eclipse.xtend.backend.common.NamedFunction;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.functions.AbstractFunction;
import org.eclipse.xtend.backend.types.CompositeTypesystem;
@@ -24,6 +26,7 @@ import org.eclipse.xtend.backend.types.CompositeTypesystem;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public abstract class NamedFunctionFactory extends AbstractFunction {
private final String _name;
@@ -43,6 +46,6 @@ public abstract class NamedFunctionFactory extends AbstractFunction {
}
public NamedFunction create () {
- return new NamedFunction (_name, this);
+ return new NamedFunction (new QualifiedName (_name), this);
}
}
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/types/AbstractTypeTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/types/AbstractTypeTest.java
index c0758401..51d555fa 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/types/AbstractTypeTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/types/AbstractTypeTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.types;
@@ -22,6 +23,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class AbstractTypeTest {
@Test public void testInheritedProperties () {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/types/BuiltinTypesTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/types/BuiltinTypesTest.java
index 0643fa70..4bbf2688 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/types/BuiltinTypesTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/types/BuiltinTypesTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.types;
@@ -33,6 +34,7 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class BuiltinTypesTest {
@Test public void testUniqueIdentifier () {
diff --git a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/types/JavaBeansTypeTest.java b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/types/JavaBeansTypeTest.java
index 6a62d1f4..3d319cef 100644
--- a/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/types/JavaBeansTypeTest.java
+++ b/tests/org.eclipse.xtend.backend.test/src/org/eclipse/xtend/backend/types/JavaBeansTypeTest.java
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008 Arno Haase.
+Copyright (c) 2008 Arno Haase, André Arnold.
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
@@ -7,6 +7,7 @@ http://www.eclipse.org/legal/epl-v10.html
Contributors:
Arno Haase - initial API and implementation
+ André Arnold
*/
package org.eclipse.xtend.backend.types;
@@ -23,6 +24,7 @@ import org.eclipse.xtend.backend.common.BackendTypesystem;
import org.eclipse.xtend.backend.common.ExecutionContext;
import org.eclipse.xtend.backend.common.NamedFunction;
import org.eclipse.xtend.backend.common.Property;
+import org.eclipse.xtend.backend.common.QualifiedName;
import org.eclipse.xtend.backend.functions.AbstractFunction;
import org.eclipse.xtend.backend.functions.FunctionDefContextInternal;
import org.eclipse.xtend.backend.testhelpers.BeanWithSizeProperty;
@@ -33,12 +35,13 @@ import org.junit.Test;
/**
*
* @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
*/
public class JavaBeansTypeTest {
@Test public void testInvokeWithConversion () {
final ExecutionContext ctx = createEmptyExecutionContext();
- assertEquals ("asdfabc7 - 2", ctx.getFunctionDefContext().invoke (ctx, "myFunction", Arrays.asList(new BeanWithSizeProperty(7), "abc", 5L)));
+ assertEquals ("asdfabc7 - 2", ctx.getFunctionDefContext().invoke (ctx, new QualifiedName ("myFunction"), Arrays.asList(new BeanWithSizeProperty(7), "abc", 5L)));
}
@Test public void testUniqueIdentifier () {
@@ -91,17 +94,17 @@ public class JavaBeansTypeTest {
checkProp (props.get ("r"), "r", type, false, true);
final ExecutionContext ctx = createEmptyExecutionContext();
- ((FunctionDefContextInternal) ctx.getFunctionDefContext()).register (new NamedFunction ("getZoom", new AbstractFunction (null, Arrays.asList(type), false) {
+ ((FunctionDefContextInternal) ctx.getFunctionDefContext()).register (new NamedFunction (new QualifiedName ("getZoom"), new AbstractFunction (null, Arrays.asList(type), false) {
public Object invoke (ExecutionContext pCtx, Object[] params) {
return "zoom";
}
}), true);
- ((FunctionDefContextInternal) ctx.getFunctionDefContext()).register (new NamedFunction ("getWithGuard", new AbstractFunction (createLiteral(Boolean.TRUE), Arrays.asList(type), false) {
+ ((FunctionDefContextInternal) ctx.getFunctionDefContext()).register (new NamedFunction (new QualifiedName ("getWithGuard"), new AbstractFunction (createLiteral(Boolean.TRUE), Arrays.asList(type), false) {
public Object invoke (ExecutionContext pCtx, Object[] params) {
return "yxy";
}
}), true);
- ((FunctionDefContextInternal) ctx.getFunctionDefContext()).register (new NamedFunction ("getPrivate", new AbstractFunction (null, Arrays.asList(type), false) {
+ ((FunctionDefContextInternal) ctx.getFunctionDefContext()).register (new NamedFunction (new QualifiedName ("getPrivate"), new AbstractFunction (null, Arrays.asList(type), false) {
public Object invoke (ExecutionContext pCtx, Object[] params) {
return "asdf";
}
@@ -109,7 +112,7 @@ public class JavaBeansTypeTest {
assertEquals (10, type.getProperties (ctx).size());
- assertEquals ("zoom", ctx.getFunctionDefContext().invoke (ctx, "getZoom", Arrays.asList (o)));
+ assertEquals ("zoom", ctx.getFunctionDefContext().invoke (ctx, new QualifiedName ("getZoom"), Arrays.asList (o)));
final Property zoomProperty = type.getProperties (ctx).get ("zoom");
checkProp (zoomProperty, "zoom", type, true, false);
assertEquals ("zoom", zoomProperty.get (ctx, o));
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/.classpath b/tests/org.eclipse.xtend.middleend.xpand.test/.classpath
new file mode 100644
index 00000000..64c5e31b
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/.project b/tests/org.eclipse.xtend.middleend.xpand.test/.project
new file mode 100644
index 00000000..3ff4265a
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.xtend.middleend.xpand.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.openarchitectureware.base.oawBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.openarchitectureware.base.oawNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/.settings/org.eclipse.core.resources.prefs b/tests/org.eclipse.xtend.middleend.xpand.test/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 00000000..ec558373
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,5 @@
+#Fri Jan 23 09:17:26 CET 2009
+eclipse.preferences.version=1
+encoding//src/org/eclipse/xtend/middleend/xpand/test/XpandProtectedRegions.xpt=iso-8859-1
+encoding//src/org/eclipse/xtend/middleend/xpand/test/XpandStatements.xpt=iso-8859-1
+encoding//src/org/eclipse/xtend/middleend/xpand/test/advices.xpt=iso-8859-1
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.xtend.middleend.xpand.test/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..a6e69db0
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Thu Oct 23 23:51:15 CEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/.settings/org.openarchitectureware.base.prefs b/tests/org.eclipse.xtend.middleend.xpand.test/.settings/org.openarchitectureware.base.prefs
new file mode 100644
index 00000000..56f92e8f
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/.settings/org.openarchitectureware.base.prefs
@@ -0,0 +1,4 @@
+#Fri Oct 24 00:05:08 CEST 2008
+eclipse.preferences.version=1
+metamodelContributor=org.openarchitectureware.EmfMetamodelContributor,org.openarchitectureware.core.metamodel.jdt.javabean.JavaBeanMetamodelContributor
+project.specific.metamodel=true
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/META-INF/MANIFEST.MF b/tests/org.eclipse.xtend.middleend.xpand.test/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..d7ccc7e3
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Xpand Middleend Test Plug-in
+Bundle-SymbolicName: org.eclipse.xtend.middleend.xpand.test
+Bundle-Version: 1.0.0
+Require-Bundle: org.eclipse.xtend.backend,
+ org.eclipse.xtend,
+ org.eclipse.xpand,
+ org.eclipse.emf.mwe.core,
+ org.apache.commons.logging,
+ org.junit4,
+ org.eclipse.xtend.middleend.xpand,
+ org.eclipse.xtend.middleend.xtend,
+ org.eclipse.emf.common;bundle-version="2.5.0"
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/build.properties b/tests/org.eclipse.xtend.middleend.xpand.test/build.properties
new file mode 100644
index 00000000..34d2e4d2
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/out/dummy.txt b/tests/org.eclipse.xtend.middleend.xpand.test/out/dummy.txt
new file mode 100644
index 00000000..c31c34b9
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/out/dummy.txt
@@ -0,0 +1,3 @@
+
+ Hello world: 5!
+ \ No newline at end of file
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/out2/org/eclipse/xtend/middleend/xpand/test/ProtectedRegionImportTest.java b/tests/org.eclipse.xtend.middleend.xpand.test/out2/org/eclipse/xtend/middleend/xpand/test/ProtectedRegionImportTest.java
new file mode 100644
index 00000000..4120f86a
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/out2/org/eclipse/xtend/middleend/xpand/test/ProtectedRegionImportTest.java
@@ -0,0 +1,17 @@
+package org.eclipse.xtend.middleend.xpand.test;
+
+public class ProtectedRegionImportTest {
+
+ public String firstProtectedOperation () {
+/*PROTECTED REGION ID(ImportTestPerson1) ENABLED START*/
+return "firstProtectedOperation";
+/*PROTECTED REGION END*/
+ }
+
+ public String secondProtectedOperation () {
+/*PROTECTED REGION ID(ImportTestPerson2) ENABLED START*/
+return "secondProtectedOperation";
+/*PROTECTED REGION END*/
+ }
+
+}
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/out3/Person.java b/tests/org.eclipse.xtend.middleend.xpand.test/out3/Person.java
new file mode 100644
index 00000000..82d0a094
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/out3/Person.java
@@ -0,0 +1,22 @@
+
+package org.eclipse.xtend.middleend.xpand.test;
+
+public class Person {
+
+public void someOperation {
+/*PROTECTED REGION ID(Person_Tester_1) ENABLED START*/
+/* TODO Protected Region 1: Implement this method */
+String value1 = "value1"
+/*PROTECTED REGION END*/
+}
+
+
+public void someOtherFunction {
+/*PROTECTED REGION ID(Person_Tester_2) ENABLED START*/
+/* TODO Protected Region 2: Implement this method */
+String value2 = "value2"
+/*PROTECTED REGION END*/
+}
+
+}
+
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/out4/Person.java b/tests/org.eclipse.xtend.middleend.xpand.test/out4/Person.java
new file mode 100644
index 00000000..256ad662
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/out4/Person.java
@@ -0,0 +1,20 @@
+
+package org.eclipse.xtend.middleend.xpand.test;
+
+public class Person {
+
+public void someOperation {
+/*PROTECTED REGION ID(Person_Tester_1) ENABLED START*/
+/* TODO Protected Region 1: Implement this method */
+/*PROTECTED REGION END*/
+}
+
+
+public void someOtherFunction {
+/*PROTECTED REGION ID(Person_Tester_2) ENABLED START*/
+/* TODO Protected Region 2: Implement this method */
+/*PROTECTED REGION END*/
+}
+
+}
+
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/AbstractXpandTest.java b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/AbstractXpandTest.java
new file mode 100644
index 00000000..1f8208aa
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/AbstractXpandTest.java
@@ -0,0 +1,50 @@
+/*
+Copyright (c) 2008 André Arnold.
+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:
+ André Arnold - initial API and implementation
+ */
+package org.eclipse.xtend.middleend.xpand.test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.internal.xtend.type.impl.java.JavaBeansMetaModel;
+import org.eclipse.xtend.backend.types.CompositeTypesystem;
+import org.eclipse.xtend.middleend.xpand.XpandBackendFacade;
+import org.eclipse.xtend.typesystem.MetaModel;
+import org.junit.Before;
+
+/**
+ *
+ * @author André Arnold
+ *
+ */
+public class AbstractXpandTest {
+
+ protected List<MetaModel> _mms;
+ protected CompositeTypesystem _ts;
+ protected XpandBackendFacade _bc;
+ protected Person _person;
+ protected Person _testPerson2;
+ protected Person _otherPerson;
+
+ @Before
+ public void setUp() throws Exception {
+ _mms = new ArrayList<MetaModel> ();
+ _mms.add (new JavaBeansMetaModel ());
+ _ts = new CompositeTypesystem ();
+ _person = new Person();
+ _person.setFirstName("Tester");
+ _person.setName("Testerossa");
+ _testPerson2 = new Person();
+ _otherPerson = new Person();
+ _otherPerson.setFirstName("Alice");
+ _otherPerson.setName("Dowell");
+ }
+
+}
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/AllXpandTests.java b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/AllXpandTests.java
new file mode 100644
index 00000000..5d08215b
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/AllXpandTests.java
@@ -0,0 +1,27 @@
+/*
+Copyright (c) 2008 André Arnold.
+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:
+ André Arnold - initial API and implementation
+ */
+package org.eclipse.xtend.middleend.xpand.test;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(Suite.class)
+@SuiteClasses( { GeneralXpandTest.class, XpandStatementTest.class, XpandAopTest.class, XpandProtectedRegionResolverTest.class })
+public class AllXpandTests {
+
+ public static junit.framework.Test suite() {
+ return new JUnit4TestAdapter (AllXpandTests.class);
+ }
+
+}
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/GeneralXpandTest.java b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/GeneralXpandTest.java
new file mode 100644
index 00000000..ddf1a7bf
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/GeneralXpandTest.java
@@ -0,0 +1,202 @@
+/*
+Copyright (c) 2008 Arno Haase, André Arnold.
+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
+ André Arnold
+ */
+package org.eclipse.xtend.middleend.xpand.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.mwe.core.WorkflowContext;
+import org.eclipse.emf.mwe.core.WorkflowInterruptedException;
+import org.eclipse.emf.mwe.core.issues.Issues;
+import org.eclipse.emf.mwe.core.issues.IssuesImpl;
+import org.eclipse.emf.mwe.core.monitor.NullProgressMonitor;
+import org.eclipse.emf.mwe.internal.core.WorkflowContextDefaultImpl;
+import org.eclipse.internal.xpand2.codeassist.XpandTokens;
+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.common.QualifiedName;
+import org.eclipse.xtend.backend.types.CompositeTypesystem;
+import org.eclipse.xtend.backend.util.FileHelper;
+import org.eclipse.xtend.middleend.xpand.XpandBackendFacade;
+import org.eclipse.xtend.middleend.xpand.XpandComponent;
+import org.eclipse.xtend.middleend.xtend.XtendBackendFacade;
+import org.eclipse.xtend.typesystem.MetaModel;
+import org.junit.Test;
+
+
+/**
+ *
+ * @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
+ *
+ */
+@SuppressWarnings("restriction")
+public class GeneralXpandTest extends AbstractXpandTest {
+
+ @Test
+ @SuppressWarnings("unchecked")
+ public void testXtendFacade() throws Exception {
+ final List<MetaModel> mms = new ArrayList<MetaModel> ();
+ mms.add (new JavaBeansMetaModel ());
+
+ final CompositeTypesystem ts = new CompositeTypesystem ();
+
+ final XtendBackendFacade bc = XtendBackendFacade.createForFile ("org::eclipse::xtend::middleend::xpand::test::first", "iso-8859-1", mms);
+ final ExecutionContext ctx = BackendFacade.createExecutionContext (bc.getFunctionDefContext(), ts, true);
+
+ assertEquals ("Hallo, Arno: 27 - imported 99!", BackendFacade.invoke (ctx, new QualifiedName ("test"), Arrays.asList ("Arno")).toString());
+ assertEquals ("[a Hallo b]", BackendFacade.invoke (ctx, new QualifiedName ("testColl"), Arrays.asList (Arrays.asList (1L, "Hallo"))).toString());
+ assertEquals (10L, BackendFacade.invoke (ctx, new QualifiedName ("reexp"), Arrays.asList (2L)));
+
+ final Person p = new Person ();
+ p.setFirstName ("Testa");
+ p.setName ("Testarossa");
+
+ assertEquals ("[Testa Testarossa] - Testa Testarossa - Testa Testarossa - Testa", BackendFacade.invoke (ctx, new QualifiedName ("testPerson"), Arrays.asList(p)).toString());
+ }
+
+ @Test
+ public void testEvaluateExpression() throws Exception {
+ final List<MetaModel> mms = new ArrayList<MetaModel> ();
+ mms.add (new JavaBeansMetaModel ());
+
+ assertEquals ("Hallo, Arno: 27 - imported 99!", XtendBackendFacade.invokeXtendFunction ("org::eclipse::xtend::middleend::xpand::test::first", null, mms, new QualifiedName ("test"), "Arno").toString());
+ assertEquals (7L, XtendBackendFacade.evaluateExpression ("1 + 2 + \"asdf\".length", null, null));
+ assertEquals (33L, XtendBackendFacade.evaluateExpression ("1 + 2 + test(\"Arno\").length", "org::eclipse::xtend::middleend::xpand::test::first", null, mms, null));
+ }
+
+ @Test
+ public void testTemplate() throws Exception {
+ final List<MetaModel> mms = new ArrayList<MetaModel> ();
+ mms.add (new JavaBeansMetaModel ());
+
+ XpandBackendFacade bf = XpandBackendFacade.createForFile("org::eclipse::xtend::middleend::xpand::test::aTemplate", "iso-8859-1", mms, null );
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("element", "world");
+ Object o = bf.executeStatement(XpandTokens.LT + "EXPAND org::eclipse::xtend::middleend::xpand::test::aTemplate::greeting FOR element" + XpandTokens.RT, variables , null, null);
+
+ assertEquals("\nHello, world: Hallo, world: 27 - imported 99!\n" +
+ "\n Name: world \n" +
+ "\n" +
+ "\n\n ... output from otherTemplate.xpt...\n" +
+ "\n\n This is a message from another package!\n" +
+ "\n\n This is a message from another package!\n" +
+ "\n\n This is a message from another package!\n" +
+ "\n\n", o.toString());
+ }
+
+ @Test
+ public void testXpandComponent () throws Exception {
+// List model = Arrays.asList("someText");
+ WorkflowContext ctx = new WorkflowContextDefaultImpl();
+ ctx.set("MODEL_SLOT", "world");
+ Issues issues = new IssuesImpl();
+ Outlet out = new Outlet("out");
+ Collection<Outlet> outlets = new ArrayList<Outlet>();
+ outlets.add(out);
+
+ XpandComponent xp = new XpandComponent();
+ xp.addMetaModel(_mms.get(0));
+ xp.setExpand("org::eclipse::xtend::middleend::xpand::test::WithFileOutput::WithFileOutput FOR MODEL_SLOT");
+ xp.addOutlet(out);
+ try {
+ xp.invoke(ctx, new NullProgressMonitor(), issues);
+ File outFile = new File("out", "dummy.txt");
+ assertTrue(outFile.exists());
+ BufferedReader r = new BufferedReader(new FileReader(outFile));
+ String line = null;
+ StringBuffer buf = new StringBuffer();
+ while ((line = r.readLine()) != null) {
+ buf.append(line+"\n");
+ }
+ assertEquals("\n Hello world: 5!\n \n", buf.toString());
+ r.close();
+ outFile.delete();
+ } catch (WorkflowInterruptedException e) {
+ fail(e.getMessage());
+ }
+
+ }
+
+ @Test
+ public void testXpandComponentWithProtectedRegions () throws Exception {
+// List model = Arrays.asList("someText");
+ WorkflowContext ctx = new WorkflowContextDefaultImpl();
+ Person p = new Person();
+ p.setName("Tester");
+ p.setFirstName("Testerossa");
+
+ ctx.set("MODEL_SLOT", p);
+ Issues issues = new IssuesImpl();
+ Outlet out = new Outlet("out4");
+ Collection<Outlet> outlets = new ArrayList<Outlet>();
+ outlets.add(out);
+
+ File generatedFile = new File (out.getPath() + "/Person.java");
+ if (generatedFile.exists ())
+ generatedFile.delete ();
+
+ XpandComponent xp = new XpandComponent();
+ xp.addMetaModel(_mms.get(0));
+ xp.setExpand("org::eclipse::xtend::middleend::xpand::test::XpandProtectedRegions::testProtect FOR MODEL_SLOT");
+ xp.addOutlet(out);
+ xp.setFileEncoding("ISO-8859-1");
+ try {
+ xp.invoke(ctx, new NullProgressMonitor(), issues);
+ final String initalExpected = "\npackage org.eclipse.xtend.middleend.xpand.test;\n\npublic class Person {\n\npublic void someOperation {\n/*PROTECTED REGION ID(Person_Tester_1) ENABLED START*/\n/* TODO Protected Region 1: Implement this method */\n/*PROTECTED REGION END*/\n}\n\n\npublic void someOtherFunction {\n/*PROTECTED REGION ID(Person_Tester_2) ENABLED START*/\n/* TODO Protected Region 2: Implement this method */\n/*PROTECTED REGION END*/\n}\n\n}\n\n";
+ String content = FileHelper.read (out.getPath() + "/Person.java");
+ assertEquals (initalExpected, content);
+ } catch (WorkflowInterruptedException e) {
+ fail(e.getMessage());
+ }
+
+ }
+
+ @Test
+ public void testWithFileOutput() throws Exception {
+ final List<MetaModel> mms = new ArrayList<MetaModel> ();
+ mms.add (new JavaBeansMetaModel ());
+ Outlet out = new Outlet("out");
+ Collection<Outlet> outlets = new ArrayList<Outlet>();
+ outlets.add(out);
+
+ XpandBackendFacade bf = XpandBackendFacade.createForFile("org::eclipse::xtend::middleend::xpand::test::WithFileOutput", "iso-8859-1", mms, outlets );
+ Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("element", "world");
+ bf.executeStatement(XpandTokens.LT + "EXPAND org::eclipse::xtend::middleend::xpand::test::WithFileOutput::WithFileOutput FOR element" + XpandTokens.RT, variables , null, null);
+
+ File outFile = new File("out", "dummy.txt");
+ assertTrue(outFile.exists());
+ BufferedReader r = new BufferedReader(new FileReader(outFile));
+ String line = null;
+ StringBuffer buf = new StringBuffer();
+ while ((line = r.readLine()) != null) {
+ buf.append(line+"\n");
+ }
+ assertEquals("\n Hello world: 5!\n \n", buf.toString());
+ r.close();
+ }
+
+}
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/Person.java b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/Person.java
new file mode 100644
index 00000000..3da550f2
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/Person.java
@@ -0,0 +1,38 @@
+/*
+Copyright (c) 2008 André Arnold.
+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:
+ André Arnold - initial API and implementation
+ */
+package org.eclipse.xtend.middleend.xpand.test;
+
+
+public class Person {
+ private String _name;
+ private String _firstName;
+
+ public String getName () {
+ return _name;
+ }
+ public void setName (String name) {
+ _name = name;
+ }
+ public String getFirstName () {
+ return _firstName;
+ }
+ public void setFirstName (String firstName) {
+ _firstName = firstName;
+ }
+
+ public String retrieveTheFullName () {
+ return _firstName + " " + _name;
+ }
+
+ public Person getMother () { // to test for endless recursion during type initialization
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/WithFileOutput.xpt b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/WithFileOutput.xpt
new file mode 100644
index 00000000..c9b45145
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/WithFileOutput.xpt
@@ -0,0 +1,6 @@
+
+«DEFINE WithFileOutput FOR String»
+ «FILE "dummy.txt"»
+ Hello «this»: «this.length»!
+ «ENDFILE»
+«ENDDEFINE»
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandAopTest.java b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandAopTest.java
new file mode 100644
index 00000000..55c969ed
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandAopTest.java
@@ -0,0 +1,174 @@
+/*
+Copyright (c) 2008 André Arnold.
+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:
+ André Arnold - initial API and implementation
+ */
+package org.eclipse.xtend.middleend.xpand.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.mwe.core.WorkflowContext;
+import org.eclipse.emf.mwe.core.WorkflowInterruptedException;
+import org.eclipse.emf.mwe.core.issues.Issues;
+import org.eclipse.emf.mwe.core.issues.IssuesImpl;
+import org.eclipse.emf.mwe.core.monitor.NullProgressMonitor;
+import org.eclipse.emf.mwe.internal.core.WorkflowContextDefaultImpl;
+import org.eclipse.xpand2.output.Outlet;
+import org.eclipse.xtend.middleend.xpand.XpandComponent;
+import org.junit.Test;
+
+/**
+ *
+ * @author André Arnold
+ *
+ */
+@SuppressWarnings("restriction")
+public class XpandAopTest extends AbstractXpandTest {
+
+ @Test
+ public void testSomeAdvicedFunction () throws Exception {
+ WorkflowContext ctx = new WorkflowContextDefaultImpl();
+ ctx.set("MODEL_SLOT", "world");
+ Issues issues = new IssuesImpl();
+ Outlet out = new Outlet("out");
+ Collection<Outlet> outlets = new ArrayList<Outlet>();
+ outlets.add(out);
+
+ XpandComponent xp = new XpandComponent();
+ xp.addMetaModel(_mms.get(0));
+ xp.addAdvice("org::eclipse::xtend::middleend::xpand::test::advices");
+ xp.setExpand("org::eclipse::xtend::middleend::xpand::test::XpandStatements::testAop FOR MODEL_SLOT");
+ xp.addOutlet(out);
+ try {
+ xp.invoke(ctx, new NullProgressMonitor(), issues);
+ File outFile = new File("out", "aopoutput1.txt");
+ assertTrue(outFile.exists());
+ BufferedReader r = new BufferedReader(new FileReader(outFile));
+ String line = null;
+ StringBuffer buf = new StringBuffer();
+ while ((line = r.readLine()) != null) {
+ buf.append(line+"\n");
+ }
+ assertEquals("pre1: *SomeAdviced* (pre3: *SomeAdviced* (*) (world) post3\n) post1\n", buf.toString());
+ r.close();
+ outFile.delete();
+ } catch (WorkflowInterruptedException e) {
+ fail(e.getMessage());
+ }
+
+ }
+
+ @Test
+ public void testAopNameNotMatched () throws Exception {
+ WorkflowContext ctx = new WorkflowContextDefaultImpl();
+ ctx.set("MODEL_SLOT", "world");
+ Issues issues = new IssuesImpl();
+ Outlet out = new Outlet("out");
+ Collection<Outlet> outlets = new ArrayList<Outlet>();
+ outlets.add(out);
+
+ XpandComponent xp = new XpandComponent();
+ xp.addMetaModel(_mms.get(0));
+ xp.addAdvice("org::eclipse::xtend::middleend::xpand::test::advices");
+ xp.setExpand("org::eclipse::xtend::middleend::xpand::test::XpandStatements::testAopNameNotMatched FOR MODEL_SLOT");
+ xp.addOutlet(out);
+ try {
+ xp.invoke(ctx, new NullProgressMonitor(), issues);
+ File outFile = new File("out", "aopoutput2.txt");
+ assertTrue(outFile.exists());
+ BufferedReader r = new BufferedReader(new FileReader(outFile));
+ String line = null;
+ StringBuffer buf = new StringBuffer();
+ while ((line = r.readLine()) != null) {
+ buf.append(line+"\n");
+ }
+ assertEquals("world\n", buf.toString());
+ r.close();
+ outFile.delete();
+ } catch (WorkflowInterruptedException e) {
+ fail(e.getMessage());
+ }
+
+ }
+
+ @Test
+ public void testAopParamsMatched () throws Exception {
+ WorkflowContext ctx = new WorkflowContextDefaultImpl();
+ ctx.set("MODEL_SLOT", "world");
+ ctx.set("param", "param");
+ Issues issues = new IssuesImpl();
+ Outlet out = new Outlet("out");
+ Collection<Outlet> outlets = new ArrayList<Outlet>();
+ outlets.add(out);
+
+ XpandComponent xp = new XpandComponent();
+ xp.addMetaModel(_mms.get(0));
+ xp.addAdvice("org::eclipse::xtend::middleend::xpand::test::advices");
+ xp.setExpand("org::eclipse::xtend::middleend::xpand::test::XpandStatements::testAopParamsMatched(param) FOR MODEL_SLOT");
+ xp.addOutlet(out);
+ try {
+ xp.invoke(ctx, new NullProgressMonitor(), issues);
+ File outFile = new File("out", "aopoutput3.txt");
+ assertTrue(outFile.exists());
+ BufferedReader r = new BufferedReader(new FileReader(outFile));
+ String line = null;
+ StringBuffer buf = new StringBuffer();
+ while ((line = r.readLine()) != null) {
+ buf.append(line+"\n");
+ }
+ assertEquals("pre2: *SomeAdviced* (String param1, *) param (pre3: *SomeAdviced* (*) (world param) post3\n) post2\n", buf.toString());
+ r.close();
+ outFile.delete();
+ } catch (WorkflowInterruptedException e) {
+ fail(e.getMessage());
+ }
+ }
+
+
+ @Test
+ public void testAopWildcardParamsMatched () throws Exception {
+ WorkflowContext ctx = new WorkflowContextDefaultImpl();
+ ctx.set("MODEL_SLOT", "world");
+ ctx.set("param", "param");
+ ctx.set("person", _person);
+ Issues issues = new IssuesImpl();
+ Outlet out = new Outlet("out");
+ Collection<Outlet> outlets = new ArrayList<Outlet>();
+ outlets.add(out);
+
+ XpandComponent xp = new XpandComponent();
+ xp.addMetaModel(_mms.get(0));
+ xp.addAdvice("org::eclipse::xtend::middleend::xpand::test::advices");
+ xp.setExpand("org::eclipse::xtend::middleend::xpand::test::XpandStatements::testAopWildcardParamsMatched(param, person) FOR MODEL_SLOT");
+ xp.addOutlet(out);
+ try {
+ xp.invoke(ctx, new NullProgressMonitor(), issues);
+ File outFile = new File("out", "aopoutput4.txt");
+ assertTrue(outFile.exists());
+ BufferedReader r = new BufferedReader(new FileReader(outFile));
+ String line = null;
+ StringBuffer buf = new StringBuffer();
+ while ((line = r.readLine()) != null) {
+ buf.append(line+"\n");
+ }
+ assertEquals("pre2: *SomeAdviced* (String param1, *) param (pre3: *SomeAdviced* (*) (world param Testerossa) post3\n) post2\n", buf.toString());
+ r.close();
+ outFile.delete();
+ } catch (WorkflowInterruptedException e) {
+ fail(e.getMessage());
+ }
+ }
+}
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandProtectedRegionResolverTest.java b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandProtectedRegionResolverTest.java
new file mode 100644
index 00000000..3b16d429
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandProtectedRegionResolverTest.java
@@ -0,0 +1,132 @@
+/*
+Copyright (c) 2009 André Arnold.
+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:
+ André Arnold - initial API and implementation
+ */
+package org.eclipse.xtend.middleend.xpand.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.internal.xpand2.pr.ProtectedRegion;
+import org.eclipse.internal.xpand2.pr.ProtectedRegionResolverImpl;
+import org.eclipse.internal.xpand2.pr.ProtectedRegionSyntaxException;
+import org.eclipse.xtend.backend.util.Base64Codec;
+import org.eclipse.xtend.backend.util.FileHelper;
+import org.eclipse.xtend.middleend.xpand.internal.xpandlib.pr.DuplicateXpandProtectedRegionException;
+import org.eclipse.xtend.middleend.xpand.internal.xpandlib.pr.XpandProtectedRegionResolver;
+import org.eclipse.xtend.middleend.xpand.internal.xpandlib.pr.XpandProtectedRegionResolver.XpandProtectedRegion;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ *
+ * @author André Arnold
+ *
+ */
+@SuppressWarnings("restriction")
+public class XpandProtectedRegionResolverTest extends AbstractXpandTest {
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @Test
+ public void testOldGetProtectedRegion() {
+ ProtectedRegionResolverImpl res = new ProtectedRegionResolverImpl();
+ res.setDefaultExcludes(true);
+ res.setFileEncoding("ISO-8859-1");
+ res.setSrcPathes("out2");
+ res.init();
+ ProtectedRegion region = res.getProtectedRegion("ImportTestPerson1");
+ try {
+ assertEquals("\nreturn \"firstProtectedOperation\";\n", region.getBody("/*", "*/"));
+ } catch (ProtectedRegionSyntaxException e) {
+ fail(e.getMessage());
+ }
+ }
+
+ @Test
+ public void testGetProtectedRegion() {
+ XpandProtectedRegionResolver resolver = new XpandProtectedRegionResolver();
+ resolver.setDefaultExcludes(true);
+ resolver.setFileEncoding("ISO-8859-1");
+ resolver.setSrcPathes("out2");
+ try {
+ resolver.init();
+ } catch (DuplicateXpandProtectedRegionException e) {
+ fail("Duplicate protected region detected");
+ }
+ XpandProtectedRegion region = resolver.getProtectedRegion("ImportTestPerson1");
+ try {
+ assertEquals("\nreturn \"firstProtectedOperation\";\n", region.getBody("/*", "*/"));
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ assertEquals("ProtectedRegionImportTest.java", region.getFile().getName());
+ }
+
+ @Test
+ public void testRegister() {
+ XpandProtectedRegionResolver resolver = new XpandProtectedRegionResolver();
+ resolver.setDefaultExcludes(true);
+ resolver.setFileEncoding("ISO-8859-1");
+ resolver.setSrcPathes("out2");
+ try {
+ resolver.init();
+ } catch (DuplicateXpandProtectedRegionException e) {
+ fail("Duplicate protected region detected");
+ }
+ XpandProtectedRegion region = resolver.createProtectedRegion("TestRegion1", false);
+ try {
+ resolver.register(region);
+ } catch (DuplicateXpandProtectedRegionException e) {
+ fail("Duplicate protected region detected");
+ }
+ XpandProtectedRegion region2 = resolver.createProtectedRegion("TestRegion1", false);
+ try {
+ resolver.register(region2);
+ fail("No duplicate protected region detected");
+ } catch (DuplicateXpandProtectedRegionException e) {
+ //success
+ }
+ }
+
+ @Test
+ public void testReportRegions() {
+ XpandProtectedRegionResolver resolver = new XpandProtectedRegionResolver();
+ resolver.setDefaultExcludes(true);
+ resolver.setFileEncoding("ISO-8859-1");
+ resolver.setSrcPathes("out2");
+ try {
+ resolver.init();
+ } catch (DuplicateXpandProtectedRegionException e) {
+ fail("Duplicate protected region detected");
+ }
+ XpandProtectedRegion region = resolver.getProtectedRegion("ImportTestPerson1");
+ File dumpPath = new File("dump");
+ File dumpFile = null;
+ try {
+ dumpFile = new File("dump", Base64Codec.toString("ImportTestPerson2"));
+ resolver.reportRegions(dumpPath);
+ assertTrue(dumpFile.exists());
+ String dumpedRegion = FileHelper.read(dumpFile, "ISO-8859-1");
+ assertEquals("PROTECTED REGION ID(ImportTestPerson2) ENABLED START*/\nreturn \"secondProtectedOperation\";\n/*PROTECTED REGION END", dumpedRegion);
+ dumpFile.delete();
+ assertFalse(dumpFile.exists());
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandProtectedRegions.xpt b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandProtectedRegions.xpt
new file mode 100644
index 00000000..afe5671c
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandProtectedRegions.xpt
@@ -0,0 +1,27 @@
+«IMPORT org::eclipse::xtend::middleend::xpand::test»
+
+«DEFINE testProtect FOR Person»
+«FILE "Person.java"»
+package org.eclipse.xtend.middleend.xpand.test;
+
+public class Person {
+
+public void someOperation {
+«PROTECT CSTART '/*' CEND '*/' ID "Person_" + name + "_1"»
+/* TODO Protected Region 1: Implement this method */
+«ENDPROTECT»
+}
+
+«EXPAND SomeOtherFunction FOR this»
+}
+
+«ENDFILE»
+«ENDDEFINE»
+
+«DEFINE SomeOtherFunction FOR Person»
+public void someOtherFunction {
+«PROTECT CSTART '/*' CEND '*/' ID "Person_" + name + "_2"»
+/* TODO Protected Region 2: Implement this method */
+«ENDPROTECT»
+}
+«ENDDEFINE» \ No newline at end of file
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandStatementTest.java b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandStatementTest.java
new file mode 100644
index 00000000..4d2ac152
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandStatementTest.java
@@ -0,0 +1,216 @@
+/*
+Copyright (c) 2008 Arno Haase, André Arnold.
+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
+ André Arnold
+ */
+package org.eclipse.xtend.middleend.xpand.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.internal.xpand2.codeassist.XpandTokens;
+import org.eclipse.internal.xtend.type.impl.java.JavaBeansMetaModel;
+import org.eclipse.xpand2.output.Outlet;
+import org.eclipse.xtend.backend.util.FileHelper;
+import org.eclipse.xtend.middleend.xpand.XpandBackendFacade;
+import org.eclipse.xtend.middleend.xpand.internal.xpandlib.pr.XpandProtectedRegionResolver;
+import org.eclipse.xtend.typesystem.MetaModel;
+import org.junit.Test;
+
+/**
+ *
+ * @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
+ *
+ */
+@SuppressWarnings("restriction")
+public class XpandStatementTest {
+
+
+ @Test
+ public void testIf() throws Exception {
+ final List<MetaModel> mms = new ArrayList<MetaModel> ();
+ mms.add (new JavaBeansMetaModel ());
+ Outlet out = new Outlet("out");
+ Collection<Outlet> outlets = new ArrayList<Outlet>();
+ outlets.add(out);
+
+ XpandBackendFacade bf = XpandBackendFacade.createForFile("org::eclipse::xtend::middleend::xpand::test::XpandStatements", "iso-8859-1", mms, outlets );
+ final Map<String, Object> variables = new HashMap<String, Object>();
+
+ variables.put("element", "one");
+ Object res1 = bf.executeStatement(XpandTokens.LT + "EXPAND org::eclipse::xtend::middleend::xpand::test::XpandStatements::testIf FOR element" + XpandTokens.RT, variables , null, null);
+ assertEquals("\n\nfirst: one\n\n", res1.toString());
+
+ variables.put("element", "two");
+ Object res2 = bf.executeStatement(XpandTokens.LT + "EXPAND org::eclipse::xtend::middleend::xpand::test::XpandStatements::testIf FOR element" + XpandTokens.RT, variables , null, null);
+ assertEquals("\n\ntwo\n\n", res2.toString());
+
+ variables.put("element", "three");
+ Object res3 = bf.executeStatement(XpandTokens.LT + "EXPAND org::eclipse::xtend::middleend::xpand::test::XpandStatements::testIf FOR element" + XpandTokens.RT, variables , null, null);
+ assertEquals("\n\nlast: three\n\n", res3.toString());
+ }
+
+ @Test
+ public void testForeach() throws Exception {
+ final List<MetaModel> mms = new ArrayList<MetaModel> ();
+ mms.add (new JavaBeansMetaModel ());
+ Outlet out = new Outlet("out");
+ Collection<Outlet> outlets = new ArrayList<Outlet>();
+ outlets.add(out);
+
+ XpandBackendFacade bf = XpandBackendFacade.createForFile("org::eclipse::xtend::middleend::xpand::test::XpandStatements", "iso-8859-1", mms, outlets );
+ final Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("elements", Arrays.asList("one", "two" , "three"));
+ Object o = bf.executeStatement(XpandTokens.LT + "EXPAND org::eclipse::xtend::middleend::xpand::test::XpandStatements::testForeach FOR elements" + XpandTokens.RT, variables , null, null);
+
+ assertEquals("\n\nelement: one\n\nelement: two\n\nelement: three\n\n", o.toString());
+ }
+
+ @Test
+ public void testForeachWithSeparator() throws Exception {
+ final List<MetaModel> mms = new ArrayList<MetaModel> ();
+ mms.add (new JavaBeansMetaModel ());
+ Outlet out = new Outlet("out");
+ Collection<Outlet> outlets = new ArrayList<Outlet>();
+ outlets.add(out);
+
+ XpandBackendFacade bf = XpandBackendFacade.createForFile("org::eclipse::xtend::middleend::xpand::test::XpandStatements", "iso-8859-1", mms, outlets );
+ final Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("elements", Arrays.asList("one", "two" , "three"));
+ Object o = bf.executeStatement(XpandTokens.LT + "EXPAND org::eclipse::xtend::middleend::xpand::test::XpandStatements::testForeachWithSeparator FOR elements" + XpandTokens.RT, variables , null, null);
+
+ assertEquals("\n\nelement: one\n,\nelement: two\n,\nelement: three\n\n", o.toString());
+ }
+
+ @Test
+ public void testForeachWithSeparatorAndDelLine() throws Exception {
+ final List<MetaModel> mms = new ArrayList<MetaModel> ();
+ mms.add (new JavaBeansMetaModel ());
+ Outlet out = new Outlet("out");
+ Collection<Outlet> outlets = new ArrayList<Outlet>();
+ outlets.add(out);
+
+ XpandBackendFacade bf = XpandBackendFacade.createForFile("org::eclipse::xtend::middleend::xpand::test::XpandStatements", "iso-8859-1", mms, outlets );
+ final Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("elements", Arrays.asList("one", "two" , "three"));
+ bf.executeStatement(XpandTokens.LT + "EXPAND org::eclipse::xtend::middleend::xpand::test::XpandStatements::testForeachWithSeparatorAndDelLine FOR elements" + XpandTokens.RT, variables , null, null);
+
+ File outFile = new File("out", "output.txt");
+ assertTrue(outFile.exists());
+ BufferedReader r = new BufferedReader(new FileReader(outFile));
+ String line = null;
+ StringBuffer buf = new StringBuffer();
+ while ((line = r.readLine()) != null) {
+ buf.append(line+"\n");
+ }
+ assertEquals("element: one,element: two,element: three\n", buf.toString());
+ r.close();
+ outFile.delete();
+ }
+
+ @Test
+ public void testForeachWithIterator() throws Exception {
+ final List<MetaModel> mms = new ArrayList<MetaModel> ();
+ mms.add (new JavaBeansMetaModel ());
+ Outlet out = new Outlet("out");
+ Collection<Outlet> outlets = new ArrayList<Outlet>();
+ outlets.add(out);
+
+ XpandBackendFacade bf = XpandBackendFacade.createForFile("org::eclipse::xtend::middleend::xpand::test::XpandStatements", "iso-8859-1", mms, outlets );
+ final Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("elements", Arrays.asList("one", "two" , "three"));
+ Object o = bf.executeStatement(XpandTokens.LT + "EXPAND org::eclipse::xtend::middleend::xpand::test::XpandStatements::testForeachWithIterator FOR elements" + XpandTokens.RT, variables , null, null);
+
+ assertEquals("\n\n\nfirst: one\n\n,\n\ntwo\n\n,\n\nlast: three\n\n\n", o.toString());
+ }
+
+ @Test
+ public void testLet() throws Exception {
+ final List<MetaModel> mms = new ArrayList<MetaModel> ();
+ mms.add (new JavaBeansMetaModel ());
+ Outlet out = new Outlet("out");
+ Collection<Outlet> outlets = new ArrayList<Outlet>();
+ outlets.add(out);
+ Person p = new Person();
+ p.setName("Tester");
+ p.setFirstName("Testerossa");
+
+ XpandBackendFacade bf = XpandBackendFacade.createForFile("org::eclipse::xtend::middleend::xpand::test::XpandStatements", "iso-8859-1", mms, outlets );
+ final Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("element", p);
+ Object o = bf.executeStatement(XpandTokens.LT + "EXPAND org::eclipse::xtend::middleend::xpand::test::XpandStatements::testLet FOR element" + XpandTokens.RT, variables , null, null);
+
+ assertEquals("\n\nTester\n\n", o.toString());
+ }
+
+ @Test
+ public void testRem() throws Exception {
+ final List<MetaModel> mms = new ArrayList<MetaModel> ();
+ mms.add (new JavaBeansMetaModel ());
+ Outlet out = new Outlet("out");
+ Collection<Outlet> outlets = new ArrayList<Outlet>();
+ outlets.add(out);
+
+ XpandBackendFacade bf = XpandBackendFacade.createForFile("org::eclipse::xtend::middleend::xpand::test::XpandStatements", "iso-8859-1", mms, outlets );
+ final Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("element", "one");
+ Object o = bf.executeStatement(XpandTokens.LT + "EXPAND org::eclipse::xtend::middleend::xpand::test::XpandStatements::testRem FOR element" + XpandTokens.RT, variables , null, null);
+
+ assertEquals("\n\none\n", o.toString());
+ }
+
+ @Test
+ public void testProtect() throws Exception {
+ final List<MetaModel> mms = new ArrayList<MetaModel> ();
+ mms.add (new JavaBeansMetaModel ());
+ Outlet out = new Outlet("out3");
+ List<Outlet> outlets = new ArrayList<Outlet>();
+ outlets.add(out);
+ Person p = new Person();
+ p.setName("Tester");
+ p.setFirstName("Testerossa");
+
+
+ File generatedFile = new File (out.getPath() + "/Person.java");
+ if (generatedFile.exists ())
+ generatedFile.delete ();
+
+ XpandBackendFacade bf = XpandBackendFacade.createForFile("org::eclipse::xtend::middleend::xpand::test::XpandStatements", "iso-8859-1", mms, outlets );
+ final Map<String, Object> variables = new HashMap<String, Object>();
+ variables.put("element", p);
+ XpandProtectedRegionResolver resolver1 = new XpandProtectedRegionResolver(null, true, outlets, "ISO-8859-1", false);
+
+ bf.executeStatement (XpandTokens.LT + "EXPAND org::eclipse::xtend::middleend::xpand::test::XpandProtectedRegions::testProtect FOR element" + XpandTokens.RT, variables , null, resolver1);
+
+ final String initalExpected = "\npackage org.eclipse.xtend.middleend.xpand.test;\n\npublic class Person {\n\npublic void someOperation {\n/*PROTECTED REGION ID(Person_Tester_1) ENABLED START*/\n/* TODO Protected Region 1: Implement this method */\n/*PROTECTED REGION END*/\n}\n\n\npublic void someOtherFunction {\n/*PROTECTED REGION ID(Person_Tester_2) ENABLED START*/\n/* TODO Protected Region 2: Implement this method */\n/*PROTECTED REGION END*/\n}\n\n}\n\n";
+ final String modifiedExpected = "\npackage org.eclipse.xtend.middleend.xpand.test;\n\npublic class Person {\n\npublic void someOperation {\n/*PROTECTED REGION ID(Person_Tester_1) ENABLED START*/\n/* TODO Protected Region 1: Implement this method */\nString value1 = \"value1\"\n/*PROTECTED REGION END*/\n}\n\n\npublic void someOtherFunction {\n/*PROTECTED REGION ID(Person_Tester_2) ENABLED START*/\n/* TODO Protected Region 2: Implement this method */\nString value2 = \"value2\"\n/*PROTECTED REGION END*/\n}\n\n}\n\n";
+ String content = FileHelper.read (out.getPath() + "/Person.java");
+ assertEquals (initalExpected, content);
+
+ FileHelper.write (out.getPath() + "/Person.java", modifiedExpected);
+ assertEquals (modifiedExpected, FileHelper.read (out.getPath() + "/Person.java"));
+
+ XpandProtectedRegionResolver resolver2 = new XpandProtectedRegionResolver(null, true, outlets, "ISO-8859-1", false);
+ bf.executeStatement (XpandTokens.LT + "EXPAND org::eclipse::xtend::middleend::xpand::test::XpandProtectedRegions::testProtect FOR element" + XpandTokens.RT, variables , null, resolver2);
+ String modifiedContent = FileHelper.read (out.getPath() + "/Person.java");
+ assertEquals(modifiedExpected, modifiedContent);
+ }
+
+}
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandStatements.xpt b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandStatements.xpt
new file mode 100644
index 00000000..21822a35
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/XpandStatements.xpt
@@ -0,0 +1,100 @@
+«IMPORT org::eclipse::xtend::middleend::xpand::test»
+
+«DEFINE testIf FOR String»
+«IF this == "one"»
+first: «this»
+«ELSEIF this == "three"»
+last: «this»
+«ELSE»
+«this»
+«ENDIF»
+«ENDDEFINE»
+
+«DEFINE testForeach FOR List[String]»
+«FOREACH this AS e»
+element: «e»
+«ENDFOREACH»
+«ENDDEFINE»
+
+«DEFINE testForeachWithSeparator FOR List[String]»
+«FOREACH this AS e SEPARATOR ","»
+element: «e»
+«ENDFOREACH»
+«ENDDEFINE»
+
+«DEFINE testForeachWithSeparatorAndDelLine FOR List[String] -»
+«FILE "output.txt"-»
+«FOREACH this AS e SEPARATOR "," -»element: «e»«ENDFOREACH-»
+«ENDFILE»
+«ENDDEFINE»
+
+«DEFINE testForeachWithIterator FOR List[String]»
+«FOREACH this AS e ITERATOR it SEPARATOR ","»
+«IF it.firstIteration»
+first: «e»
+«ELSEIF it.lastIteration»
+last: «e»
+«ELSE»
+«e»
+«ENDIF»
+«ENDFOREACH»
+«ENDDEFINE»
+
+«DEFINE testLet FOR Person»
+«LET name AS e»
+«e»
+«ENDLET»
+«ENDDEFINE»
+
+«DEFINE testRem FOR String»
+«REM»
+This
+is
+my
+comment.
+«ENDREM»
+«this»
+«ENDDEFINE»
+
+«DEFINE testAop FOR String»
+«FILE "aopoutput1.txt"-»
+«EXPAND testSomeAdvicedDefinition FOR this-»
+«ENDFILE»
+«ENDDEFINE»
+
+«DEFINE testAopNameNotMatched FOR String»
+«FILE "aopoutput2.txt"-»
+«EXPAND testSomeOtherDefinition FOR this-»
+«ENDFILE»
+«ENDDEFINE»
+
+«DEFINE testAopParamsMatched(String param) FOR String»
+«FILE "aopoutput3.txt"-»
+«EXPAND testSomeAdvicedDefinition(param) FOR this-»
+«ENDFILE»
+«ENDDEFINE»
+
+«DEFINE testAopWildcardParamsMatched(String param, Person person) FOR String»
+«FILE "aopoutput4.txt"-»
+«EXPAND testSomeAdvicedDefinition(param, person) FOR this-»
+«ENDFILE»
+«ENDDEFINE»
+
+
+«DEFINE testSomeAdvicedDefinition FOR String-»
+«this-»
+«ENDDEFINE»
+
+«DEFINE testSomeAdvicedDefinition(String param1) FOR String-»
+«this» «param1-»
+«ENDDEFINE»
+
+«DEFINE testSomeAdvicedDefinition(String param1, Person param2) FOR String-»
+«this» «param1» «param2.name-»
+«ENDDEFINE»
+
+«DEFINE testSomeOtherDefinition FOR String-»
+«this-»
+«ENDDEFINE»
+
+
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/aTemplate.xpt b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/aTemplate.xpt
new file mode 100644
index 00000000..8b403adf
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/aTemplate.xpt
@@ -0,0 +1,17 @@
+«EXTENSION org::eclipse::xtend::middleend::xpand::test::first»
+
+«DEFINE greeting FOR String»
+Hello, «this»: «test(this)»
+«EXPAND name FOR this»
+
+«EXPAND otherTemplate::ot FOR this»
+«EXPAND sub::templateInOtherPackage::other FOR this»
+«EXPAND sub::templateInOtherPackage::other»
+«EXPAND org::eclipse::xtend::middleend::xpand::test::sub::templateInOtherPackage::other»
+
+«ENDDEFINE»
+
+«DEFINE name FOR String»
+ Name: «this»
+«ENDDEFINE»
+
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/advices.xpt b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/advices.xpt
new file mode 100644
index 00000000..f01b9980
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/advices.xpt
@@ -0,0 +1,11 @@
+«AROUND *SomeAdviced* FOR String-»
+pre1: *SomeAdviced* («targetDef.proceed()-») post1
+«ENDAROUND»
+
+«AROUND *SomeAdviced* (String param1, *) FOR String-»
+pre2: *SomeAdviced* (String param1, *) «param1» («targetDef.proceed()-») post2
+«ENDAROUND»
+
+«AROUND *SomeAdviced* (*) FOR String-»
+pre3: *SomeAdviced* (*) («targetDef.proceed()-») post3
+«ENDAROUND»
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/first.ext b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/first.ext
new file mode 100644
index 00000000..110748c5
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/first.ext
@@ -0,0 +1,14 @@
+import org::eclipse::xtend::middleend::xpand::test;
+
+extension org::eclipse::xtend::middleend::xpand::test::imported reexport;
+
+test (Object s): test2 (s);
+test2 (Object s): "Hallo, " + s + ": " + 3*(4+5) + " - " + other (99);
+
+testColl (Collection c): c.typeSelect (String).collect (e|"a " + e + " b");
+
+testPerson (Person p): p + " - " + p.firstName + " " + p.name + " - " + p.retrieveTheFullName() + " - " + p.getFirstName();
+
+toString (Person p): "[" + p.firstName + " " + p.name + "]";
+
+
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/imported.ext b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/imported.ext
new file mode 100644
index 00000000..1fcb295f
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/imported.ext
@@ -0,0 +1,4 @@
+
+extension org::eclipse::xtend::middleend::xpand::test::reexported reexport;
+
+other(Object o): "imported " + o + "!";
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/otherTemplate.xpt b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/otherTemplate.xpt
new file mode 100644
index 00000000..10404632
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/otherTemplate.xpt
@@ -0,0 +1,3 @@
+«DEFINE ot FOR String»
+ ... output from otherTemplate.xpt...
+«ENDDEFINE» \ No newline at end of file
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/reexported.ext b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/reexported.ext
new file mode 100644
index 00000000..2e17eee7
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/reexported.ext
@@ -0,0 +1,5 @@
+
+extension org::eclipse::xtend::middleend::xpand::test::imported reexport;
+extension org::eclipse::xtend::middleend::xpand::test::first reexport;
+
+reexp(Integer i): 3*i+4; \ No newline at end of file
diff --git a/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/sub/templateInOtherPackage.xpt b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/sub/templateInOtherPackage.xpt
new file mode 100644
index 00000000..3e7ae2c5
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xpand.test/src/org/eclipse/xtend/middleend/xpand/test/sub/templateInOtherPackage.xpt
@@ -0,0 +1,4 @@
+«DEFINE other FOR String»
+ This is a message from another package!
+«ENDDEFINE»
+
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/.classpath b/tests/org.eclipse.xtend.middleend.xtend.test/.classpath
new file mode 100644
index 00000000..1fa3e680
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/.project b/tests/org.eclipse.xtend.middleend.xtend.test/.project
new file mode 100644
index 00000000..14b71a63
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.xtend.middleend.xtend.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.openarchitectureware.base.oawBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.openarchitectureware.base.oawNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/.settings/org.openarchitectureware.base.prefs b/tests/org.eclipse.xtend.middleend.xtend.test/.settings/org.openarchitectureware.base.prefs
new file mode 100644
index 00000000..63b9a447
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/.settings/org.openarchitectureware.base.prefs
@@ -0,0 +1,4 @@
+#Fri Oct 24 09:43:07 CEST 2008
+eclipse.preferences.version=1
+metamodelContributor=org.openarchitectureware.EmfMetamodelContributor,org.openarchitectureware.core.metamodel.jdt.javabean.JavaBeanMetamodelContributor
+project.specific.metamodel=true
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/META-INF/MANIFEST.MF b/tests/org.eclipse.xtend.middleend.xtend.test/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..4059ddbf
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Xtend Middleend Test Plug-in
+Bundle-SymbolicName: org.eclipse.xtend.middleend.xtend.test
+Bundle-Version: 1.0.0
+Require-Bundle: org.eclipse.xtend.backend,
+ org.eclipse.xtend,
+ org.eclipse.xpand,
+ org.eclipse.emf.mwe.core,
+ org.apache.commons.logging,
+ org.junit4,
+ org.eclipse.xtend.middleend.xpand,
+ org.eclipse.xtend.middleend.xtend,
+ org.eclipse.emf.common;bundle-version="2.5.0"
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/build.properties b/tests/org.eclipse.xtend.middleend.xtend.test/build.properties
new file mode 100644
index 00000000..34d2e4d2
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/Address.java b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/Address.java
new file mode 100644
index 00000000..b804112c
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/Address.java
@@ -0,0 +1,15 @@
+/*******************************************************************************
+ * Copyright (c) 2008 committers of openArchitectureWare and others.
+ * 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:
+ * committers of openArchitectureWare - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.xtend.middleend.xtend.test;
+
+public class Address {
+
+}
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/AllTests.java b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/AllTests.java
new file mode 100644
index 00000000..dcb876fb
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/AllTests.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2008 committers of openArchitectureWare and others.
+ * 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:
+ * committers of openArchitectureWare - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.xtend.middleend.xtend.test;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+import junit.framework.JUnit4TestAdapter;
+
+@RunWith(Suite.class)
+@SuiteClasses( { GeneralXtendTest.class, ExpressionTest.class,
+ OperatorExpressionTest.class, AopTest.class, CheckTest.class })
+public class AllTests {
+
+ public static junit.framework.Test suite() {
+ return new JUnit4TestAdapter(AllTests.class);
+ }
+
+}
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/AopTest.java b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/AopTest.java
new file mode 100644
index 00000000..9a75bcf2
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/AopTest.java
@@ -0,0 +1,92 @@
+/*
+Copyright (c) 2008 André Arnold.
+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:
+ André Arnold - initial API and implementation
+ */
+package org.eclipse.xtend.middleend.xtend.test;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import static junit.framework.Assert.assertEquals;
+
+import org.eclipse.internal.xtend.type.impl.java.JavaMetaModel;
+import org.eclipse.xtend.middleend.xtend.XtendBackendFacade;
+import org.eclipse.xtend.typesystem.MetaModel;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ *
+ * @author André Arnold
+ *
+ */
+public class AopTest extends JavaXtendTest {
+
+ private Collection<MetaModel> mms = new ArrayList<MetaModel> ();
+
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ mms.add(new JavaMetaModel());
+ }
+
+ @Test
+ public void testAdvicedFunction() {
+ Map<String, Object> vars = new HashMap<String, Object> ();
+ vars.put("param", "TestParam");
+ Object result = XtendBackendFacade.evaluateExpression ("testSomeAdvicedFunction(param)", "org::eclipse::xtend::middleend::xtend::test::expressions", "iso-8859-1", mms, vars, new HashMap<String, Object>(), Arrays.asList("org::eclipse::xtend::middleend::xtend::test::advices"));
+
+ assertEquals ("before1 TestParam TestParam body after1", result.toString());
+ }
+
+ @Test
+ public void testSomeAdvicedFunction() {
+ Map<String, Object> vars = new HashMap<String, Object> ();
+ vars.put("param", "TestParam");
+ vars.put("p", _person);
+ Object result = XtendBackendFacade.evaluateExpression ("testSomeAdvicedFunction(param, p)", "org::eclipse::xtend::middleend::xtend::test::expressions", "iso-8859-1", mms, vars, new HashMap<String, Object>(), Arrays.asList("org::eclipse::xtend::middleend::xtend::test::advices"));
+
+ assertEquals ("before1 TestParam Testerossa TestParam after1", result.toString());
+ }
+
+ @Test
+ public void testSomeSubPackageFunction() {
+ Map<String, Object> vars = new HashMap<String, Object> ();
+ vars.put("param1", "TestParam");
+ vars.put("param2", 7L);
+ Object result = XtendBackendFacade.evaluateExpression ("testSomeFunction(param1, param2)", "org::eclipse::xtend::middleend::xtend::test::sub::subpackage", "iso-8859-1", mms, vars, new HashMap<String, Object>(), Arrays.asList("org::eclipse::xtend::middleend::xtend::test::advices"));
+
+ assertEquals ("before2 TestParam7 after2", result.toString());
+ }
+
+ @Test
+ public void testAdviceSubPackageFunction() {
+ Map<String, Object> vars = new HashMap<String, Object> ();
+ vars.put("param1", "TestParam");
+ vars.put("param2", 7L);
+ Object result = XtendBackendFacade.evaluateExpression ("testAdviceSubPackageFunction(param1, param2)", "org::eclipse::xtend::middleend::xtend::test::expressions", "iso-8859-1", mms, vars, new HashMap<String, Object>(), Arrays.asList("org::eclipse::xtend::middleend::xtend::test::advices"));
+
+ assertEquals ("before2 TestParam7 after2", result.toString());
+ }
+
+ @Test
+ public void testOtherAdviceSubPackageFunction() {
+ Map<String, Object> vars = new HashMap<String, Object> ();
+ vars.put("param1", "TestParam");
+ vars.put("param2", 7L);
+ Object result = XtendBackendFacade.evaluateExpression ("testOtherAdviceSubPackageFunction(param1, param2)", "org::eclipse::xtend::middleend::xtend::test::expressions", "iso-8859-1", mms, vars, new HashMap<String, Object>(), Arrays.asList("org::eclipse::xtend::middleend::xtend::test::advices"));
+
+ assertEquals ("before1 TestParam before2 TestParam7 after2 after1", result.toString());
+ }
+
+}
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/CheckTest.java b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/CheckTest.java
new file mode 100644
index 00000000..8a228af4
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/CheckTest.java
@@ -0,0 +1,113 @@
+/*
+Copyright (c) 2008 André Arnold.
+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:
+ André Arnold - initial API and implementation
+ */
+package org.eclipse.xtend.middleend.xtend.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.mwe.core.WorkflowContext;
+import org.eclipse.emf.mwe.core.WorkflowInterruptedException;
+import org.eclipse.emf.mwe.core.issues.Issues;
+import org.eclipse.emf.mwe.core.issues.IssuesImpl;
+import org.eclipse.emf.mwe.core.monitor.NullProgressMonitor;
+import org.eclipse.emf.mwe.internal.core.WorkflowContextDefaultImpl;
+import org.eclipse.xtend.middleend.xtend.CheckBackendFacade;
+import org.eclipse.xtend.middleend.xtend.CheckComponent;
+import org.eclipse.xtend.middleend.xtend.XtendBackendFacade;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ *
+ * @author André Arnold
+ *
+ */
+@SuppressWarnings("restriction")
+public class CheckTest extends JavaXtendTest {
+
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ _person.setName("xy");
+ _employee.setCompany(null);
+ }
+
+ @Test
+ public void testCheckAll() {
+ Issues issues = new IssuesImpl();
+ List<?> model = Arrays.asList(_person, _employee);
+
+ CheckBackendFacade.checkAll(
+ "org::eclipse::xtend::middleend::xtend::test::Checks",
+ _mms, issues, model);
+
+ assertEquals(1, issues.getErrors().length);
+ assertEquals("Company not defined", issues.getErrors()[0].getMessage());
+ assertEquals(1, issues.getWarnings().length);
+ assertEquals("Name too short: " + _person.getName(), issues.getWarnings()[0].getMessage());
+ }
+
+ @Test
+ public void testCheckFacade() {
+ Issues issues = new IssuesImpl();
+ List<?> model = Arrays.asList(_person, _employee);
+ final Map<String, Object> localVars = new HashMap<String, Object>();
+ localVars.put("MODEL_SLOT", model);
+
+ Object o = XtendBackendFacade.evaluateExpression("MODEL_SLOT", _mms,
+ localVars);
+ Collection<?> result = null;
+ if (o instanceof Collection) {
+ result = (Collection<?>) o;
+ } else if (o == null) {
+ result = Collections.EMPTY_SET;
+ } else {
+ result = Collections.singleton(result);
+ }
+ CheckBackendFacade.checkAll(
+ "org::eclipse::xtend::middleend::xtend::test::Checks",
+ _mms, issues, result);
+
+ assertEquals(1, issues.getErrors().length);
+ assertEquals(1, issues.getWarnings().length);
+ }
+
+ @Test
+ public void testCheckComponent() {
+ List<?> model = Arrays.asList(_person, _employee);
+ WorkflowContext ctx = new WorkflowContextDefaultImpl();
+ ctx.set("MODEL_SLOT", model);
+ Issues issues = new IssuesImpl();
+
+ CheckComponent chk = new CheckComponent();
+ chk.addMetaModel(_mms.get(0));
+ chk.setFileEncoding("ISO-8859-1");
+ chk
+ .addCheckFile("org::eclipse::xtend::middleend::xtend::test::Checks");
+ chk.setExpression("MODEL_SLOT");
+ try {
+ chk.invoke(ctx, new NullProgressMonitor(), issues);
+ fail("Errors expected");
+ } catch (WorkflowInterruptedException e) {
+ assertEquals(1, issues.getErrors().length);
+ assertEquals(1, issues.getWarnings().length);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/Checks.chk b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/Checks.chk
new file mode 100644
index 00000000..6c2558d1
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/Checks.chk
@@ -0,0 +1,4 @@
+import org::eclipse::xtend::middleend::xtend::test;
+
+context Person if name != "Doe" WARNING "Name too short: " + name : name.length > 3;
+context Employee ERROR "Company not defined" : company != null; \ No newline at end of file
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/CollectionExpressionTest.java b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/CollectionExpressionTest.java
new file mode 100644
index 00000000..c5a4557f
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/CollectionExpressionTest.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2008 committers of openArchitectureWare and others.
+ * 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:
+ * committers of openArchitectureWare - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.xtend.middleend.xtend.test;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.xtend.backend.BackendFacade;
+import org.eclipse.xtend.backend.common.QualifiedName;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class CollectionExpressionTest extends ExpressionTest {
+
+ @Test
+ public void testTypeSelect() {
+ List result = (List)BackendFacade.invoke(_ctx, new QualifiedName ("testTypeSelect"), Arrays.asList (Arrays.asList(_person, _employee)));
+ Assert.assertFalse(result.contains(_person));
+ Assert.assertTrue(result.contains(_employee));
+ }
+
+ @Test
+ @SuppressWarnings("unchecked")
+ public void testSelect() {
+ List result = (List)BackendFacade.invoke(_ctx, new QualifiedName ("testSelect"), Arrays.asList (Arrays.asList(_person, _employee, _otherPerson)));
+ Assert.assertFalse(result.contains(_person));
+ Assert.assertTrue(result.contains(_employee));
+ Assert.assertTrue(result.contains(_otherPerson));
+ }
+
+ @Test
+ public void testCollect() {
+ List result = (List)BackendFacade.invoke(_ctx, new QualifiedName ("testCollect"), Arrays.asList (Arrays.asList(_person, _employee, _otherPerson)));
+ Assert.assertTrue(result.contains(_person.getName()));
+ Assert.assertTrue(result.contains(_employee.getName()));
+ Assert.assertTrue(result.contains(_otherPerson.getName()));
+ Assert.assertFalse(result.contains(_person));
+ }
+
+ @Test
+ public void testTypeSelectPolymorphism() {
+ List result = (List)BackendFacade.invoke(_ctx, new QualifiedName ("testTypeSelectPolymorphism"), Arrays.asList ((List)Arrays.asList(_person, _employee)));
+ Assert.assertTrue(result.contains(_person));
+ Assert.assertTrue(result.contains(_employee));
+ }
+
+}
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/Employee.java b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/Employee.java
new file mode 100644
index 00000000..67a08b85
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/Employee.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2008 committers of openArchitectureWare and others.
+ * 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:
+ * committers of openArchitectureWare - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.xtend.middleend.xtend.test;
+
+public class Employee extends Person {
+
+ private String _company;
+
+ public String getCompany() {
+ return _company;
+ }
+
+ public void setCompany(String company) {
+ _company = company;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result
+ + ((_company == null) ? 0 : _company.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (!super.equals(obj))
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Employee other = (Employee) obj;
+ if (_company == null) {
+ if (other._company != null)
+ return false;
+ } else if (!_company.equals(other._company))
+ return false;
+ return true;
+ }
+
+}
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/ExpressionTest.java b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/ExpressionTest.java
new file mode 100644
index 00000000..5d20da77
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/ExpressionTest.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2008 committers of openArchitectureWare and others.
+ * 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:
+ * committers of openArchitectureWare - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.xtend.middleend.xtend.test;
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Arrays;
+
+import org.eclipse.xtend.backend.BackendFacade;
+import org.eclipse.xtend.backend.common.QualifiedName;
+import org.eclipse.xtend.middleend.xtend.XtendBackendFacade;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ExpressionTest extends JavaXtendTest {
+
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ _bc = XtendBackendFacade.createForFile ("org::eclipse::xtend::middleend::xtend::test::expressions", "iso-8859-1", _mms);;
+ _ctx = BackendFacade.createExecutionContext (_bc.getFunctionDefContext(), _ts, true);
+ }
+
+ @Test
+ public void testMultiDispatch() {
+ assertEquals ("Person", BackendFacade.invoke(_ctx, new QualifiedName ("testMultiDispatch"), Arrays.asList (_person)).toString());
+ assertEquals ("Employee", BackendFacade.invoke(_ctx, new QualifiedName ("testMultiDispatch"), Arrays.asList (_employee)).toString());
+ }
+
+ @Test
+ public void testFeatureCall() {
+ assertEquals ("Testerossa", BackendFacade.invoke(_ctx, new QualifiedName ("testFeatureCall"), Arrays.asList (_person)).toString());
+ assertNull (BackendFacade.invoke(_ctx, new QualifiedName ("testFeatureCall"), Arrays.asList (_testPerson2)));
+ }
+
+ @Test
+ public void testSetter() {
+ assertEquals ("NewName", BackendFacade.invoke(_ctx, new QualifiedName ("testSetter"), Arrays.asList (_person)).toString());
+ }
+
+ @Test
+ public void testOperationCall() {
+ String param = "Param";
+ assertEquals ("called:Param", BackendFacade.invoke (_ctx, new QualifiedName ("testOperationCall"), Arrays.asList (_person, param)).toString());
+ }
+
+ @Test
+ public void testIf() {
+ assertEquals ("isFirst", BackendFacade.invoke (_ctx, new QualifiedName ("testIf"), Arrays.asList ("first")).toString());
+ assertEquals ("isOther", BackendFacade.invoke (_ctx, new QualifiedName ("testIf"), Arrays.asList ("second")).toString());
+ }
+
+ @Test
+ public void testSwitch() {
+ assertEquals ("firstCase", BackendFacade.invoke (_ctx, new QualifiedName ("testSwitch"), Arrays.asList ("first")).toString());
+ assertEquals ("secondCase", BackendFacade.invoke (_ctx, new QualifiedName ("testSwitch"), Arrays.asList ("second")).toString());
+ assertEquals ("defaultCase", BackendFacade.invoke (_ctx, new QualifiedName ("testSwitch"), Arrays.asList ("unknown")).toString());
+ }
+
+ @Test
+ public void testCreate() {
+ Person result = (Person) BackendFacade.invoke (_ctx, new QualifiedName ("testCreatePerson"), Arrays.asList ());
+ assertTrue (result.getClass().equals(Person.class) && result.getName().equals("Tester") && result.getFirstName() == null ? true : false );
+ Person result2 = (Person) BackendFacade.invoke (_ctx, new QualifiedName ("testCreatePersonThis"), Arrays.asList ());
+ assertTrue (result2.getClass().equals(Person.class) && result2.getName().equals("Tester") && result2.getFirstName() == null ? true : false );
+ Person result3 = (Person) BackendFacade.invoke (_ctx, new QualifiedName ("testCreatePersonVar"), Arrays.asList ());
+ assertTrue (result3.getClass().equals(Person.class) && result3.getName().equals("Tester") && result3.getFirstName() == null ? true : false );
+ }
+}
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/GeneralXtendTest.java b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/GeneralXtendTest.java
new file mode 100644
index 00000000..3a0cb2d2
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/GeneralXtendTest.java
@@ -0,0 +1,69 @@
+/*
+Copyright (c) 2008 Arno Haase, André Arnold.
+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
+ André Arnold
+ */
+package org.eclipse.xtend.middleend.xtend.test;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.internal.xtend.type.impl.java.JavaBeansMetaModel;
+import org.eclipse.xtend.backend.BackendFacade;
+import org.eclipse.xtend.backend.common.ExecutionContext;
+import org.eclipse.xtend.backend.common.QualifiedName;
+import org.eclipse.xtend.backend.types.CompositeTypesystem;
+import org.eclipse.xtend.middleend.xtend.XtendBackendFacade;
+import org.eclipse.xtend.typesystem.MetaModel;
+import org.junit.Test;
+
+
+/**
+ *
+ * @author Arno Haase (http://www.haase-consulting.com)
+ * @author André Arnold
+ *
+ */
+public class GeneralXtendTest {
+
+ @Test
+ @SuppressWarnings("unchecked")
+ public void testXtendFacade() throws Exception {
+ final List<MetaModel> mms = new ArrayList<MetaModel> ();
+ mms.add (new JavaBeansMetaModel ());
+
+ final CompositeTypesystem ts = new CompositeTypesystem ();
+
+ final XtendBackendFacade bc = XtendBackendFacade.createForFile ("org::eclipse::xtend::middleend::xtend::test::first", "iso-8859-1", mms);
+ final ExecutionContext ctx = BackendFacade.createExecutionContext (bc.getFunctionDefContext(), ts, true);
+
+ assertEquals ("Hallo, Arno: 27 - imported 99!", BackendFacade.invoke (ctx, new QualifiedName ("test"), Arrays.asList ("Arno")).toString());
+ assertEquals ("[a Hallo b]", BackendFacade.invoke (ctx, new QualifiedName ("testColl"), Arrays.asList (Arrays.asList (1L, "Hallo"))).toString());
+ assertEquals (10L, BackendFacade.invoke (ctx, new QualifiedName ("reexp"), Arrays.asList (2L)));
+
+ final Person p = new Person ();
+ p.setFirstName ("Testa");
+ p.setName ("Testarossa");
+
+ assertEquals ("[Testa Testarossa] - Testa Testarossa - Testa Testarossa - Testa", BackendFacade.invoke (ctx, new QualifiedName ("testPerson"), Arrays.asList(p)).toString());
+ }
+
+ @Test
+ public void testEvaluateExpression() throws Exception {
+ final List<MetaModel> mms = new ArrayList<MetaModel> ();
+ mms.add (new JavaBeansMetaModel ());
+
+ assertEquals ("Hallo, Arno: 27 - imported 99!", XtendBackendFacade.invokeXtendFunction ("org::eclipse::xtend::middleend::xtend::test::first", null, mms, new QualifiedName ("test"), "Arno").toString());
+ assertEquals (7L, XtendBackendFacade.evaluateExpression ("1 + 2 + \"asdf\".length", null, null));
+ assertEquals (33L, XtendBackendFacade.evaluateExpression ("1 + 2 + test(\"Arno\").length", "org::eclipse::xtend::middleend::xpand::test::first", null, mms, null));
+ }
+}
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/JavaXtendTest.java b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/JavaXtendTest.java
new file mode 100644
index 00000000..8e95345c
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/JavaXtendTest.java
@@ -0,0 +1,54 @@
+/*
+Copyright (c) 2008 André Arnold.
+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:
+ André Arnold - initial API and implementation
+ */
+package org.eclipse.xtend.middleend.xtend.test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.internal.xtend.type.impl.java.JavaBeansMetaModel;
+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.xtend.XtendBackendFacade;
+import org.eclipse.xtend.typesystem.MetaModel;
+import org.junit.Before;
+
+public abstract class JavaXtendTest {
+
+ protected List<MetaModel> _mms;
+ protected CompositeTypesystem _ts;
+ protected XtendBackendFacade _bc;
+ protected ExecutionContext _ctx;
+
+ protected Person _person;
+ protected Person _testPerson2;
+ protected Person _otherPerson;
+ protected Employee _employee;
+
+ @Before
+ public void setUp() throws Exception {
+ _mms = new ArrayList<MetaModel> ();
+ _mms.add (new JavaBeansMetaModel ());
+ _ts = new CompositeTypesystem ();
+ _person = new Person();
+ _employee = new Employee();
+ _person.setFirstName("Tester");
+ _person.setName("Testerossa");
+ _employee.setFirstName("John");
+ _employee.setName("Doe");
+ _employee.setCompany("TestCompany");
+ _testPerson2 = new Person();
+ _otherPerson = new Person();
+ _otherPerson.setFirstName("Alice");
+ _otherPerson.setName("Dowell");
+ }
+
+}
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/OperatorExpressionTest.java b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/OperatorExpressionTest.java
new file mode 100644
index 00000000..730ef076
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/OperatorExpressionTest.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2008 committers of openArchitectureWare and others.
+ * 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:
+ * committers of openArchitectureWare - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.xtend.middleend.xtend.test;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Arrays;
+
+import org.eclipse.xtend.backend.BackendFacade;
+import org.eclipse.xtend.backend.common.QualifiedName;
+import org.junit.Test;
+
+public class OperatorExpressionTest extends ExpressionTest {
+
+
+ @Test
+ public void testEqualsNull () {
+ Person testPerson1 = new Person();
+ testPerson1.setName("TestPerson");
+
+ assertFalse ((Boolean) BackendFacade.invoke (_ctx, new QualifiedName ("testEqualsNull"), Arrays.asList (testPerson1)));
+ assertTrue ((Boolean) BackendFacade.invoke (_ctx, new QualifiedName ("testEqualsNull"), Arrays.asList (_testPerson2)));
+ }
+
+ @Test
+ public void testNotEqualsNull () {
+ Person testPerson1 = new Person();
+ testPerson1.setName("TestPerson");
+
+ assertTrue ((Boolean) BackendFacade.invoke (_ctx, new QualifiedName ("testNotEqualsNull"), Arrays.asList (testPerson1)));
+ assertFalse ((Boolean) BackendFacade.invoke (_ctx, new QualifiedName ("testNotEqualsNull"), Arrays.asList (_testPerson2)));
+ }
+
+ @Test
+ public void testLess () {
+ assertTrue ((Boolean) BackendFacade.invoke (_ctx, new QualifiedName ("testLess"), Arrays.asList (5L)));
+ assertFalse ((Boolean) BackendFacade.invoke (_ctx, new QualifiedName ("testLess"), Arrays.asList (7L)));
+ assertFalse ((Boolean) BackendFacade.invoke (_ctx, new QualifiedName ("testLess"), Arrays.asList (9L)));
+ }
+
+ @Test
+ public void testLessOrEqual () {
+ assertTrue ((Boolean) BackendFacade.invoke (_ctx, new QualifiedName ("testLessOrEqual"), Arrays.asList (5L)));
+ assertTrue ((Boolean) BackendFacade.invoke (_ctx, new QualifiedName ("testLessOrEqual"), Arrays.asList (7L)));
+ assertFalse ((Boolean) BackendFacade.invoke (_ctx, new QualifiedName ("testLessOrEqual"), Arrays.asList (9L)));
+ }
+
+ @Test
+ public void testGreater () {
+ assertFalse ((Boolean) BackendFacade.invoke (_ctx, new QualifiedName ("testGreater"), Arrays.asList (5L)));
+ assertFalse ((Boolean) BackendFacade.invoke (_ctx, new QualifiedName ("testGreater"), Arrays.asList (7L)));
+ assertTrue ((Boolean) BackendFacade.invoke (_ctx, new QualifiedName ("testGreater"), Arrays.asList (9L)));
+ }
+
+ @Test
+ public void testGreaterOrEqual() {
+ assertFalse ((Boolean) BackendFacade.invoke(_ctx, new QualifiedName ("testGreaterOrEqual"), Arrays.asList (5L)));
+ assertTrue ((Boolean) BackendFacade.invoke(_ctx, new QualifiedName ("testGreaterOrEqual"), Arrays.asList (7L)));
+ assertTrue ((Boolean) BackendFacade.invoke(_ctx, new QualifiedName ("testGreaterOrEqual"), Arrays.asList (9L)));
+ }
+}
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/Person.java b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/Person.java
new file mode 100644
index 00000000..629a26cb
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/Person.java
@@ -0,0 +1,75 @@
+/*
+Copyright (c) 2008 André Arnold.
+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:
+ André Arnold - initial API and implementation
+ */
+package org.eclipse.xtend.middleend.xtend.test;
+
+
+public class Person {
+
+ protected String _name;
+ protected String _firstName;
+
+ public String call(String param) {
+ return "called" + ":" + param;
+ }
+
+ public String getName () {
+ return _name;
+ }
+ public void setName (String name) {
+ _name = name;
+ }
+ public String getFirstName () {
+ return _firstName;
+ }
+ public void setFirstName (String firstName) {
+ _firstName = firstName;
+ }
+
+ public String retrieveTheFullName () {
+ return _firstName + " " + _name;
+ }
+
+ public Person getMother () { // to test for endless recursion during type initialization
+ return null;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result
+ + ((_firstName == null) ? 0 : _firstName.hashCode());
+ result = prime * result + ((_name == null) ? 0 : _name.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Person other = (Person) obj;
+ if (_firstName == null) {
+ if (other._firstName != null)
+ return false;
+ } else if (!_firstName.equals(other._firstName))
+ return false;
+ if (_name == null) {
+ if (other._name != null)
+ return false;
+ } else if (!_name.equals(other._name))
+ return false;
+ return true;
+ }
+}
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/advices.ext b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/advices.ext
new file mode 100644
index 00000000..bcc7c312
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/advices.ext
@@ -0,0 +1,8 @@
+import org::eclipse::xtend::middleend::xtend::test;
+
+
+around *SomeAdviced* (String s, *) :
+ "before1 " + s + " " + ctx.proceed() + " after1";
+
+around org::eclipse::xtend::middleend::xtend::test::sub::* (*) :
+ "before2 " + ctx.proceed() + " after2";
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/expressions.ext b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/expressions.ext
new file mode 100644
index 00000000..7eeb7d6a
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/expressions.ext
@@ -0,0 +1,60 @@
+import org::eclipse::xtend::middleend::xtend::test;
+
+extension org::eclipse::xtend::middleend::xtend::test::sub::subpackage;
+
+// function dispatch
+String testMultiDispatch(Person p) : "Person";
+String testMultiDispatch(Employee e) : "Employee";
+
+
+// basic expressions
+String testFeatureCall(Person p) : p.name;
+String testSetter(Person p) : p.setName("NewName") -> p.name;
+String testOperationCall(Person p, String param) : p.call(param);
+
+
+// create extensions
+create Person testCreatePerson(): setName("Tester");
+create Person testCreatePersonThis(): this.setName("Tester");
+create Person p testCreatePersonVar(): p.setName("Tester") -> p;
+
+Person createPersonWithLet(): let p = new Person : p.setName("Tester")->p;
+
+
+// opreators
+Boolean testNotEqualsNull (Person p) : p.name != null;
+Boolean testEqualsNull (Person p) : p.name == null;
+Boolean testLess (Integer x) : x < 7;
+Boolean testLessOrEqual (Integer x) : x <= 7;
+Boolean testGreater (Integer x) : x > 7;
+Boolean testGreaterOrEqual (Integer x) : x >= 7;
+Boolean testIsInstance (Object o) : Person.isInstance(o);
+Boolean testIsAssignableFrom (Object o) : Person.isAssignableFrom(o.metaType);
+
+
+// control structures
+String testIf (String s) : s == "first"? "isFirst" : "isOther";
+String testSwitch (String name) :
+ switch(name) {
+ case "first" : "firstCase"
+ case "second": "secondCase"
+ default: "defaultCase"
+ };
+
+private String call (String param) : "called:"+param;
+
+
+// Collections
+List testTypeSelectPolymorphism (List p) : p.typeSelect(Person);
+List testTypeSelect (List p) : p.typeSelect(Employee);
+
+List[Person] testSelect (List[Person] p) : p.select(e|e.name.startsWith("D"));
+List[String] testCollect (List[Person] p) : p.collect(e|e.name);
+
+
+// AOP tests
+
+String testSomeAdvicedFunction (String param) : param + " body";
+String testSomeAdvicedFunction (String param, Person p) : p.name + " " + param;
+String testAdviceSubPackageFunction (String param1, Integer param2) : testSomeFunction (param1, param2);
+String testOtherAdviceSubPackageFunction (String param1, Integer param2) : testSomeAdvicedFunction (param1, param2);
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/first.ext b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/first.ext
new file mode 100644
index 00000000..17f72aac
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/first.ext
@@ -0,0 +1,14 @@
+import org::eclipse::xtend::middleend::xtend::test;
+
+extension org::eclipse::xtend::middleend::xtend::test::imported reexport;
+
+test (Object s): test2 (s);
+test2 (Object s): "Hallo, " + s + ": " + 3*(4+5) + " - " + other (99);
+
+testColl (Collection c): c.typeSelect (String).collect (e|"a " + e + " b");
+
+testPerson (Person p): p + " - " + p.firstName + " " + p.name + " - " + p.retrieveTheFullName() + " - " + p.getFirstName();
+
+toString (Person p): "[" + p.firstName + " " + p.name + "]";
+
+
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/imported.ext b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/imported.ext
new file mode 100644
index 00000000..970d8f82
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/imported.ext
@@ -0,0 +1,5 @@
+
+extension org::eclipse::xtend::middleend::xtend::test::reexported reexport;
+
+other(Object o): "imported " + o + "!";
+private Boolean aPrivateFunction() : true; \ No newline at end of file
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/reexported.ext b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/reexported.ext
new file mode 100644
index 00000000..f7cf7ce1
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/reexported.ext
@@ -0,0 +1,5 @@
+
+extension org::eclipse::xtend::middleend::xtend::test::imported reexport;
+extension org::eclipse::xtend::middleend::xtend::test::first reexport;
+
+reexp(Integer i): 3*i+4; \ No newline at end of file
diff --git a/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/sub/subpackage.ext b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/sub/subpackage.ext
new file mode 100644
index 00000000..111341ab
--- /dev/null
+++ b/tests/org.eclipse.xtend.middleend.xtend.test/src/org/eclipse/xtend/middleend/xtend/test/sub/subpackage.ext
@@ -0,0 +1,5 @@
+import org::eclipse::xtend::middleend::xtend::test;
+
+
+String testSomeFunction(String param1, Integer param2) : param1 + param2;
+String testSomeAdvicedFunction(String param1, Integer param2) : param1 + param2; \ No newline at end of file

Back to the top