Merge "Add Nashorn JavaScript Engine to support newer JDK releases"
diff --git a/plugins/org.eclipse.emf.henshin.text/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.henshin.text/META-INF/MANIFEST.MF
index db986ad..f483722 100644
--- a/plugins/org.eclipse.emf.henshin.text/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.henshin.text/META-INF/MANIFEST.MF
@@ -13,7 +13,10 @@
  org.antlr.runtime,
  org.eclipse.xtext.util,
  org.eclipse.xtend.lib,
- org.eclipse.emf.common
+ org.eclipse.emf.common,
+ org.eclipse.core.resources,
+ org.eclipse.jdt.core,
+ javax.annotation
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Export-Package: org.eclipse.emf.henshin.text.henshin_text.impl,
  org.eclipse.emf.henshin.text.validation,
diff --git a/plugins/org.eclipse.emf.henshin.text/src/org/eclipse/emf/henshin/text/validation/Henshin_textValidator.xtend b/plugins/org.eclipse.emf.henshin.text/src/org/eclipse/emf/henshin/text/validation/Henshin_textValidator.xtend
index 8ddb537..5e7982a 100644
--- a/plugins/org.eclipse.emf.henshin.text/src/org/eclipse/emf/henshin/text/validation/Henshin_textValidator.xtend
+++ b/plugins/org.eclipse.emf.henshin.text/src/org/eclipse/emf/henshin/text/validation/Henshin_textValidator.xtend
@@ -69,6 +69,9 @@
 import org.eclipse.emf.henshin.text.typesystem.Henshin_textType
 import org.eclipse.emf.henshin.text.typesystem.Henshin_textTypeProvider
 import org.eclipse.xtext.validation.Check
+import org.eclipse.core.resources.ResourcesPlugin
+import org.eclipse.jdt.core.JavaCore
+import org.eclipse.jdt.core.IJavaProject
 
 /**
  * This class contains custom validation rules. 
@@ -501,8 +504,31 @@
 	@Check
 	def checkJavaImport(Rule rule){
 		var iterableOfJavaImportImpl= Iterables.filter(rule.ruleElements,typeof(JavaImportImpl))
+		
+		var projectName=rule.eResource.URI.toString().replaceAll("platform:/resource/", "").replaceAll("\\/.*", "")
+		
+		var workspace = ResourcesPlugin.getWorkspace();
+        var root = workspace.getRoot();
+        var IJavaProject javaProject=null
+            
+		for(project:root.projects){
+			if(projectName.equals(project.name)){
+				javaProject=JavaCore.create(project)
+			}
+		}
+        	
+		
 		for(javaImport:iterableOfJavaImportImpl){
-			if(Package.getPackage(javaImport.packagename)==null){
+			var importCorrect=false
+        	if(javaProject!==null){
+	            for(package:javaProject.allPackageFragmentRoots){
+	            	if(package.getPackageFragment(javaImport.packagename).exists){
+	            		importCorrect=true
+	            	}
+	            }
+			}
+          
+			if(!importCorrect){
 				error("Package "+javaImport.packagename+" doesn't exist.'",javaImport, Henshin_textPackage.Literals.JAVA_IMPORT__PACKAGENAME )
 			}
 		}
@@ -540,10 +566,32 @@
 	@Check
 	def checkJavaImport(MultiRule rule){
 		var iterableOfJavaImportImpl= Iterables.filter(rule.multiruleElements,typeof(JavaImportImpl))
+		
+		var projectName=rule.eResource.URI.toString().replaceAll("platform:/resource/", "").replaceAll("\\/.*", "")
+		var workspace = ResourcesPlugin.getWorkspace();
+        var root = workspace.getRoot();
+        var IJavaProject javaProject=null
+            
+		for(project:root.projects){
+			if(projectName.equals(project.name)){
+				javaProject=JavaCore.create(project)
+			}
+		}
+		
 		for(javaImport:iterableOfJavaImportImpl){
-			if(Package.getPackage(javaImport.packagename)==null){
+			var importCorrect=false
+        	if(javaProject!==null){
+	            for(package:javaProject.allPackageFragmentRoots){
+	            	if(package.getPackageFragment(javaImport.packagename).exists){
+	            		importCorrect=true
+	            	}
+	            }
+			}
+          
+			if(!importCorrect){
 				error("Package "+javaImport.packagename+" doesn't exist.'",javaImport, Henshin_textPackage.Literals.JAVA_IMPORT__PACKAGENAME )
 			}
+			
 		}
 	}
 	
diff --git a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/Henshin_textRuntimeModule.java b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/Henshin_textRuntimeModule.java
index 5bce5a1..5f0fcfd 100644
--- a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/Henshin_textRuntimeModule.java
+++ b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/Henshin_textRuntimeModule.java
@@ -4,11 +4,7 @@
 package org.eclipse.emf.henshin.text;
 
 import com.google.inject.Binder;
-import com.google.inject.binder.AnnotatedBindingBuilder;
-import com.google.inject.binder.LinkedBindingBuilder;
-import com.google.inject.name.Named;
 import com.google.inject.name.Names;
-import org.eclipse.emf.henshin.text.AbstractHenshin_textRuntimeModule;
 import org.eclipse.emf.henshin.text.scoping.Henshin_textImportedNamespaceAwareLocalScopeProvider;
 import org.eclipse.xtext.scoping.IScopeProvider;
 import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider;
@@ -18,11 +14,7 @@
  */
 @SuppressWarnings("all")
 public class Henshin_textRuntimeModule extends AbstractHenshin_textRuntimeModule {
-  @Override
   public void configureIScopeProviderDelegate(final Binder binder) {
-    AnnotatedBindingBuilder<IScopeProvider> _bind = binder.<IScopeProvider>bind(IScopeProvider.class);
-    Named _named = Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE);
-    LinkedBindingBuilder<IScopeProvider> _annotatedWith = _bind.annotatedWith(_named);
-    _annotatedWith.to(Henshin_textImportedNamespaceAwareLocalScopeProvider.class);
+    binder.<IScopeProvider>bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(Henshin_textImportedNamespaceAwareLocalScopeProvider.class);
   }
 }
diff --git a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/Henshin_textStandaloneSetup.java b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/Henshin_textStandaloneSetup.java
index 2aaa91c..712243d 100644
--- a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/Henshin_textStandaloneSetup.java
+++ b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/Henshin_textStandaloneSetup.java
@@ -3,15 +3,12 @@
  */
 package org.eclipse.emf.henshin.text;
 
-import org.eclipse.emf.henshin.text.Henshin_textStandaloneSetupGenerated;
-
 /**
  * Initialization support for running Xtext languages without Equinox extension registry.
  */
 @SuppressWarnings("all")
 public class Henshin_textStandaloneSetup extends Henshin_textStandaloneSetupGenerated {
   public static void doSetup() {
-    Henshin_textStandaloneSetup _henshin_textStandaloneSetup = new Henshin_textStandaloneSetup();
-    _henshin_textStandaloneSetup.createInjectorAndDoEMFRegistration();
+    new Henshin_textStandaloneSetup().createInjectorAndDoEMFRegistration();
   }
 }
diff --git a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/formatting2/.Henshin_textFormatter.xtendbin b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/formatting2/.Henshin_textFormatter.xtendbin
index c7aadeb..c59b6b2 100644
--- a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/formatting2/.Henshin_textFormatter.xtendbin
+++ b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/formatting2/.Henshin_textFormatter.xtendbin
Binary files differ
diff --git a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/formatting2/Henshin_textFormatter.java b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/formatting2/Henshin_textFormatter.java
index c9ecbc0..7c3d5be 100644
--- a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/formatting2/Henshin_textFormatter.java
+++ b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/formatting2/Henshin_textFormatter.java
@@ -48,10 +48,6 @@
 import org.eclipse.xtext.formatting2.AbstractFormatter2;
 import org.eclipse.xtext.formatting2.IFormattableDocument;
 import org.eclipse.xtext.formatting2.IHiddenRegionFormatter;
-import org.eclipse.xtext.formatting2.regionaccess.IHiddenRegion;
-import org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion;
-import org.eclipse.xtext.formatting2.regionaccess.ISemanticRegionFinder;
-import org.eclipse.xtext.formatting2.regionaccess.ISemanticRegionsFinder;
 import org.eclipse.xtext.resource.XtextResource;
 import org.eclipse.xtext.xbase.lib.Extension;
 import org.eclipse.xtext.xbase.lib.IterableExtensions;
@@ -66,20 +62,23 @@
   private EList<Match> el;
   
   protected void _format(final Model model, @Extension final IFormattableDocument document) {
+    final EPackageImport lastImport = IterableExtensions.<EPackageImport>last(model.getEPackageimports());
     EList<EPackageImport> _ePackageimports = model.getEPackageimports();
-    final EPackageImport lastImport = IterableExtensions.<EPackageImport>last(_ePackageimports);
-    EList<EPackageImport> _ePackageimports_1 = model.getEPackageimports();
-    for (final EPackageImport ePackageimport : _ePackageimports_1) {
+    for (final EPackageImport ePackageimport : _ePackageimports) {
       {
         document.<EPackageImport>format(ePackageimport);
         if ((ePackageimport == lastImport)) {
-          final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-            it.setNewLines(2);
+          final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+            public void apply(final IHiddenRegionFormatter it) {
+              it.setNewLines(2);
+            }
           };
           document.<EPackageImport>append(ePackageimport, _function);
         } else {
-          final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-            it.setNewLines(1);
+          final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+            public void apply(final IHiddenRegionFormatter it) {
+              it.setNewLines(1);
+            }
           };
           document.<EPackageImport>append(ePackageimport, _function_1);
         }
@@ -92,12 +91,12 @@
   }
   
   protected void _format(final EPackageImport ePackageImport, @Extension final IFormattableDocument document) {
-    ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(ePackageImport);
-    ISemanticRegion _keyword = _regionFor.keyword("ePackageImport");
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.append(_keyword, _function);
+    document.append(this.textRegionExtensions.regionFor(ePackageImport).keyword("ePackageImport"), _function);
   }
   
   protected void _format(final Rule rule, @Extension final IFormattableDocument document) {
@@ -109,313 +108,354 @@
     for (final RuleElement ruleElements : _ruleElements) {
       document.<RuleElement>format(ruleElements);
     }
-    ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(rule);
-    ISemanticRegion _keyword = _regionFor.keyword("(");
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.noSpace();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.noSpace();
+      }
     };
-    document.append(_keyword, _function);
-    ISemanticRegionsFinder _regionFor_1 = this.textRegionExtensions.regionFor(rule);
-    ISemanticRegion _keyword_1 = _regionFor_1.keyword(")");
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    document.append(this.textRegionExtensions.regionFor(rule).keyword("("), _function);
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.append(_keyword_1, _function_1);
-    ISemanticRegionsFinder _regionFor_2 = this.textRegionExtensions.regionFor(rule);
-    ISemanticRegion _keyword_2 = _regionFor_2.keyword("{");
-    final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    document.append(this.textRegionExtensions.regionFor(rule).keyword(")"), _function_1);
+    final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
-    document.append(_keyword_2, _function_2);
-    ISemanticRegionsFinder _regionFor_3 = this.textRegionExtensions.regionFor(rule);
-    ISemanticRegion _keyword_3 = _regionFor_3.keyword("}");
-    final Procedure1<IHiddenRegionFormatter> _function_3 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    document.append(this.textRegionExtensions.regionFor(rule).keyword("{"), _function_2);
+    final Procedure1<IHiddenRegionFormatter> _function_3 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
-    document.prepend(_keyword_3, _function_3);
-    final Procedure1<IHiddenRegionFormatter> _function_4 = (IHiddenRegionFormatter it) -> {
-      it.setNewLines(2);
+    document.prepend(this.textRegionExtensions.regionFor(rule).keyword("}"), _function_3);
+    final Procedure1<IHiddenRegionFormatter> _function_4 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.setNewLines(2);
+      }
     };
     document.<Rule>surround(rule, _function_4);
   }
   
   protected void _format(final MultiRule rule, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<MultiRule>surround(rule, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<MultiRule>surround(rule, _function_1);
     EList<RuleElement> _multiruleElements = rule.getMultiruleElements();
     for (final RuleElement ruleElements : _multiruleElements) {
       document.<RuleElement>format(ruleElements);
     }
-    ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(rule);
-    ISemanticRegion _keyword = _regionFor.keyword("(");
-    final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-      it.noSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.noSpace();
+      }
     };
-    document.append(_keyword, _function_2);
-    ISemanticRegionsFinder _regionFor_1 = this.textRegionExtensions.regionFor(rule);
-    ISemanticRegion _keyword_1 = _regionFor_1.keyword(")");
-    final Procedure1<IHiddenRegionFormatter> _function_3 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    document.append(this.textRegionExtensions.regionFor(rule).keyword("("), _function_2);
+    final Procedure1<IHiddenRegionFormatter> _function_3 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.append(_keyword_1, _function_3);
-    ISemanticRegionsFinder _regionFor_2 = this.textRegionExtensions.regionFor(rule);
-    ISemanticRegion _keyword_2 = _regionFor_2.keyword("{");
-    final Procedure1<IHiddenRegionFormatter> _function_4 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    document.append(this.textRegionExtensions.regionFor(rule).keyword(")"), _function_3);
+    final Procedure1<IHiddenRegionFormatter> _function_4 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
-    document.append(_keyword_2, _function_4);
-    ISemanticRegionsFinder _regionFor_3 = this.textRegionExtensions.regionFor(rule);
-    ISemanticRegion _keyword_3 = _regionFor_3.keyword("}");
-    final Procedure1<IHiddenRegionFormatter> _function_5 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    document.append(this.textRegionExtensions.regionFor(rule).keyword("{"), _function_4);
+    final Procedure1<IHiddenRegionFormatter> _function_5 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
-    document.prepend(_keyword_3, _function_5);
-    final Procedure1<IHiddenRegionFormatter> _function_6 = (IHiddenRegionFormatter it) -> {
-      it.setNewLines(1);
+    document.prepend(this.textRegionExtensions.regionFor(rule).keyword("}"), _function_5);
+    final Procedure1<IHiddenRegionFormatter> _function_6 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.setNewLines(1);
+      }
     };
     document.<MultiRule>surround(rule, _function_6);
   }
   
   protected void _format(final JavaImport javaImport, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<JavaImport>surround(javaImport, _function);
-    ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(javaImport);
-    ISemanticRegion _keyword = _regionFor.keyword("javaImport");
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.append(_keyword, _function_1);
-    final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    document.append(this.textRegionExtensions.regionFor(javaImport).keyword("javaImport"), _function_1);
+    final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<JavaImport>append(javaImport, _function_2);
   }
   
   protected void _format(final CheckDangling checkDangling, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<CheckDangling>surround(checkDangling, _function);
-    ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(checkDangling);
-    ISemanticRegion _keyword = _regionFor.keyword("checkDangling");
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.append(_keyword, _function_1);
-    final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    document.append(this.textRegionExtensions.regionFor(checkDangling).keyword("checkDangling"), _function_1);
+    final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<CheckDangling>append(checkDangling, _function_2);
   }
   
   protected void _format(final InjectiveMatching injectiveMatching, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<InjectiveMatching>surround(injectiveMatching, _function);
-    ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(injectiveMatching);
-    ISemanticRegion _keyword = _regionFor.keyword("checkDangling");
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.append(_keyword, _function_1);
-    final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    document.append(this.textRegionExtensions.regionFor(injectiveMatching).keyword("checkDangling"), _function_1);
+    final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<InjectiveMatching>append(injectiveMatching, _function_2);
   }
   
   protected void _format(final Graph graph, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<Graph>surround(graph, _function);
-    EList<GraphElements> _graphElements = graph.getGraphElements();
-    boolean _isEmpty = _graphElements.isEmpty();
+    boolean _isEmpty = graph.getGraphElements().isEmpty();
     boolean _not = (!_isEmpty);
     if (_not) {
-      ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(graph);
-      ISemanticRegion _keyword = _regionFor.keyword("{");
-      final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-        it.newLine();
+      final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+        public void apply(final IHiddenRegionFormatter it) {
+          it.newLine();
+        }
       };
-      document.append(_keyword, _function_1);
+      document.append(this.textRegionExtensions.regionFor(graph).keyword("{"), _function_1);
     }
-    EList<GraphElements> _graphElements_1 = graph.getGraphElements();
-    for (final GraphElements el : _graphElements_1) {
+    EList<GraphElements> _graphElements = graph.getGraphElements();
+    for (final GraphElements el : _graphElements) {
       document.<GraphElements>format(el);
     }
-    ISemanticRegionsFinder _regionFor_1 = this.textRegionExtensions.regionFor(graph);
-    ISemanticRegion _keyword_1 = _regionFor_1.keyword("{");
-    final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.prepend(_keyword_1, _function_2);
-    EList<GraphElements> _graphElements_2 = graph.getGraphElements();
-    boolean _isEmpty_1 = _graphElements_2.isEmpty();
+    document.prepend(this.textRegionExtensions.regionFor(graph).keyword("{"), _function_2);
+    boolean _isEmpty_1 = graph.getGraphElements().isEmpty();
     boolean _not_1 = (!_isEmpty_1);
     if (_not_1) {
-      ISemanticRegionsFinder _regionFor_2 = this.textRegionExtensions.regionFor(graph);
-      ISemanticRegion _keyword_2 = _regionFor_2.keyword("}");
-      final Procedure1<IHiddenRegionFormatter> _function_3 = (IHiddenRegionFormatter it) -> {
-        it.newLine();
+      final Procedure1<IHiddenRegionFormatter> _function_3 = new Procedure1<IHiddenRegionFormatter>() {
+        public void apply(final IHiddenRegionFormatter it) {
+          it.newLine();
+        }
       };
-      document.prepend(_keyword_2, _function_3);
+      document.prepend(this.textRegionExtensions.regionFor(graph).keyword("}"), _function_3);
     }
-    final Procedure1<IHiddenRegionFormatter> _function_4 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_4 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<Graph>surround(graph, _function_4);
   }
   
   protected void _format(final ConditionGraph graph, @Extension final IFormattableDocument document) {
-    EList<ConditionGraphElements> _conditionGraphElements = graph.getConditionGraphElements();
-    boolean _isEmpty = _conditionGraphElements.isEmpty();
+    boolean _isEmpty = graph.getConditionGraphElements().isEmpty();
     boolean _not = (!_isEmpty);
     if (_not) {
-      ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(graph);
-      ISemanticRegion _keyword = _regionFor.keyword("{");
-      final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-        it.newLine();
+      final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+        public void apply(final IHiddenRegionFormatter it) {
+          it.newLine();
+        }
       };
-      document.append(_keyword, _function);
+      document.append(this.textRegionExtensions.regionFor(graph).keyword("{"), _function);
     }
-    EList<ConditionGraphElements> _conditionGraphElements_1 = graph.getConditionGraphElements();
-    for (final ConditionGraphElements el : _conditionGraphElements_1) {
+    EList<ConditionGraphElements> _conditionGraphElements = graph.getConditionGraphElements();
+    for (final ConditionGraphElements el : _conditionGraphElements) {
       document.<ConditionGraphElements>format(el);
     }
-    ISemanticRegionsFinder _regionFor_1 = this.textRegionExtensions.regionFor(graph);
-    ISemanticRegion _keyword_1 = _regionFor_1.keyword("{");
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.prepend(_keyword_1, _function_1);
-    EList<ConditionGraphElements> _conditionGraphElements_2 = graph.getConditionGraphElements();
-    boolean _isEmpty_1 = _conditionGraphElements_2.isEmpty();
+    document.prepend(this.textRegionExtensions.regionFor(graph).keyword("{"), _function_1);
+    boolean _isEmpty_1 = graph.getConditionGraphElements().isEmpty();
     boolean _not_1 = (!_isEmpty_1);
     if (_not_1) {
-      ISemanticRegionsFinder _regionFor_2 = this.textRegionExtensions.regionFor(graph);
-      ISemanticRegion _keyword_2 = _regionFor_2.keyword("}");
-      final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-        it.newLine();
+      final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+        public void apply(final IHiddenRegionFormatter it) {
+          it.newLine();
+        }
       };
-      document.prepend(_keyword_2, _function_2);
+      document.prepend(this.textRegionExtensions.regionFor(graph).keyword("}"), _function_2);
     }
-    final Procedure1<IHiddenRegionFormatter> _function_3 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_3 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<ConditionGraph>surround(graph, _function_3);
   }
   
   protected void _format(final Node node, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<Node>surround(node, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<Node>surround(node, _function_1);
-    ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(node);
-    ISemanticRegion _keyword = _regionFor.keyword("{");
-    final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.prepend(_keyword, _function_2);
-    ISemanticRegionsFinder _regionFor_1 = this.textRegionExtensions.regionFor(node);
-    ISemanticRegion _keyword_1 = _regionFor_1.keyword("(");
-    final Procedure1<IHiddenRegionFormatter> _function_3 = (IHiddenRegionFormatter it) -> {
-      it.noSpace();
+    document.prepend(this.textRegionExtensions.regionFor(node).keyword("{"), _function_2);
+    final Procedure1<IHiddenRegionFormatter> _function_3 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.noSpace();
+      }
     };
-    document.append(_keyword_1, _function_3);
+    document.append(this.textRegionExtensions.regionFor(node).keyword("("), _function_3);
     EList<Attribute> _attribute = node.getAttribute();
     for (final EObject attr : _attribute) {
       document.<EObject>format(attr);
     }
-    ISemanticRegionsFinder _regionFor_2 = this.textRegionExtensions.regionFor(node);
-    ISemanticRegion _keyword_2 = _regionFor_2.keyword(")");
-    final Procedure1<IHiddenRegionFormatter> _function_4 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_4 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.append(_keyword_2, _function_4);
+    document.append(this.textRegionExtensions.regionFor(node).keyword(")"), _function_4);
   }
   
   protected void _format(final Attribute attribute, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<Attribute>surround(attribute, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<Attribute>surround(attribute, _function_1);
   }
   
   protected void _format(final Match match, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<Match>surround(match, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<Match>surround(match, _function_1);
   }
   
   protected void _format(final ConditionNode node, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<ConditionNode>surround(node, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<ConditionNode>surround(node, _function_1);
-    ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(node);
-    ISemanticRegion _keyword = _regionFor.keyword("{");
-    final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.prepend(_keyword, _function_2);
-    ISemanticRegionsFinder _regionFor_1 = this.textRegionExtensions.regionFor(node);
-    ISemanticRegion _keyword_1 = _regionFor_1.keyword("(");
-    final Procedure1<IHiddenRegionFormatter> _function_3 = (IHiddenRegionFormatter it) -> {
-      it.noSpace();
+    document.prepend(this.textRegionExtensions.regionFor(node).keyword("{"), _function_2);
+    final Procedure1<IHiddenRegionFormatter> _function_3 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.noSpace();
+      }
     };
-    document.append(_keyword_1, _function_3);
+    document.append(this.textRegionExtensions.regionFor(node).keyword("("), _function_3);
     EList<Match> _attribute = node.getAttribute();
     for (final EObject attr : _attribute) {
       document.<EObject>format(attr);
     }
-    ISemanticRegionsFinder _regionFor_2 = this.textRegionExtensions.regionFor(node);
-    ISemanticRegion _keyword_2 = _regionFor_2.keyword(")");
-    final Procedure1<IHiddenRegionFormatter> _function_4 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_4 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.append(_keyword_2, _function_4);
+    document.append(this.textRegionExtensions.regionFor(node).keyword(")"), _function_4);
   }
   
   protected void _format(final Edges edges, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<Edges>surround(edges, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<Edges>surround(edges, _function_1);
+    final Edge first = edges.getEdges().get(0);
     EList<Edge> _edges = edges.getEdges();
-    final Edge first = _edges.get(0);
-    EList<Edge> _edges_1 = edges.getEdges();
-    for (final Edge e : _edges_1) {
+    for (final Edge e : _edges) {
       if ((e != first)) {
         document.<Edge>format(e);
       }
@@ -423,36 +463,42 @@
   }
   
   protected void _format(final Edge edge, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<Edge>surround(edge, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<Edge>prepend(edge, _function_1);
-    IHiddenRegion _previousHiddenRegion = this.textRegionExtensions.previousHiddenRegion(edge);
-    ISemanticRegionFinder _immediatelyPreceding = _previousHiddenRegion.immediatelyPreceding();
-    ISemanticRegion _keyword = _immediatelyPreceding.keyword(",");
-    final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-      it.noSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.noSpace();
+      }
     };
-    document.append(_keyword, _function_2);
+    document.append(this.textRegionExtensions.previousHiddenRegion(edge).immediatelyPreceding().keyword(","), _function_2);
   }
   
   protected void _format(final ConditionEdges edges, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<ConditionEdges>surround(edges, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<ConditionEdges>surround(edges, _function_1);
+    final ConditionEdge first = edges.getEdges().get(0);
     EList<ConditionEdge> _edges = edges.getEdges();
-    final ConditionEdge first = _edges.get(0);
-    EList<ConditionEdge> _edges_1 = edges.getEdges();
-    for (final ConditionEdge e : _edges_1) {
+    for (final ConditionEdge e : _edges) {
       if ((e != first)) {
         document.<ConditionEdge>format(e);
       }
@@ -460,36 +506,42 @@
   }
   
   protected void _format(final ConditionEdge edge, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<ConditionEdge>surround(edge, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<ConditionEdge>prepend(edge, _function_1);
-    IHiddenRegion _previousHiddenRegion = this.textRegionExtensions.previousHiddenRegion(edge);
-    ISemanticRegionFinder _immediatelyPreceding = _previousHiddenRegion.immediatelyPreceding();
-    ISemanticRegion _keyword = _immediatelyPreceding.keyword(",");
-    final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-      it.noSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.noSpace();
+      }
     };
-    document.append(_keyword, _function_2);
+    document.append(this.textRegionExtensions.previousHiddenRegion(edge).immediatelyPreceding().keyword(","), _function_2);
   }
   
   protected void _format(final Conditions conditions, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<Conditions>surround(conditions, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<Conditions>surround(conditions, _function_1);
+    final Expression first = conditions.getAttributeConditions().get(0);
     EList<Expression> _attributeConditions = conditions.getAttributeConditions();
-    final Expression first = _attributeConditions.get(0);
-    EList<Expression> _attributeConditions_1 = conditions.getAttributeConditions();
-    for (final Expression e : _attributeConditions_1) {
+    for (final Expression e : _attributeConditions) {
       if ((e != first)) {
         document.<Expression>format(e);
       }
@@ -497,121 +549,138 @@
   }
   
   protected void _format(final Expression expression, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<Expression>surround(expression, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<Expression>prepend(expression, _function_1);
-    IHiddenRegion _previousHiddenRegion = this.textRegionExtensions.previousHiddenRegion(expression);
-    ISemanticRegionFinder _immediatelyPreceding = _previousHiddenRegion.immediatelyPreceding();
-    ISemanticRegion _keyword = _immediatelyPreceding.keyword(",");
-    final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-      it.noSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.noSpace();
+      }
     };
-    document.append(_keyword, _function_2);
+    document.append(this.textRegionExtensions.previousHiddenRegion(expression).immediatelyPreceding().keyword(","), _function_2);
   }
   
   protected void _format(final ConditionReuseNode node, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<ConditionReuseNode>surround(node, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<ConditionReuseNode>surround(node, _function_1);
-    ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(node);
-    ISemanticRegion _keyword = _regionFor.keyword("{");
-    final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.prepend(_keyword, _function_2);
-    ISemanticRegionsFinder _regionFor_1 = this.textRegionExtensions.regionFor(node);
-    ISemanticRegion _keyword_1 = _regionFor_1.keyword("(");
-    final Procedure1<IHiddenRegionFormatter> _function_3 = (IHiddenRegionFormatter it) -> {
-      it.noSpace();
+    document.prepend(this.textRegionExtensions.regionFor(node).keyword("{"), _function_2);
+    final Procedure1<IHiddenRegionFormatter> _function_3 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.noSpace();
+      }
     };
-    document.append(_keyword_1, _function_3);
+    document.append(this.textRegionExtensions.regionFor(node).keyword("("), _function_3);
     EList<Match> _attribute = node.getAttribute();
     for (final EObject attr : _attribute) {
       document.<EObject>format(attr);
     }
-    ISemanticRegionsFinder _regionFor_2 = this.textRegionExtensions.regionFor(node);
-    ISemanticRegion _keyword_2 = _regionFor_2.keyword(")");
-    final Procedure1<IHiddenRegionFormatter> _function_4 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_4 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.append(_keyword_2, _function_4);
+    document.append(this.textRegionExtensions.regionFor(node).keyword(")"), _function_4);
   }
   
   protected void _format(final MultiRuleReuseNode node, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<MultiRuleReuseNode>surround(node, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<MultiRuleReuseNode>surround(node, _function_1);
-    ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(node);
-    ISemanticRegion _keyword = _regionFor.keyword("{");
-    final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.prepend(_keyword, _function_2);
-    ISemanticRegionsFinder _regionFor_1 = this.textRegionExtensions.regionFor(node);
-    ISemanticRegion _keyword_1 = _regionFor_1.keyword("(");
-    final Procedure1<IHiddenRegionFormatter> _function_3 = (IHiddenRegionFormatter it) -> {
-      it.noSpace();
+    document.prepend(this.textRegionExtensions.regionFor(node).keyword("{"), _function_2);
+    final Procedure1<IHiddenRegionFormatter> _function_3 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.noSpace();
+      }
     };
-    document.append(_keyword_1, _function_3);
+    document.append(this.textRegionExtensions.regionFor(node).keyword("("), _function_3);
     EList<Attribute> _attribute = node.getAttribute();
     for (final EObject attr : _attribute) {
       document.<EObject>format(attr);
     }
-    ISemanticRegionsFinder _regionFor_2 = this.textRegionExtensions.regionFor(node);
-    ISemanticRegion _keyword_2 = _regionFor_2.keyword(")");
-    final Procedure1<IHiddenRegionFormatter> _function_4 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_4 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.append(_keyword_2, _function_4);
+    document.append(this.textRegionExtensions.regionFor(node).keyword(")"), _function_4);
   }
   
   protected void _format(final Formula formula, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<Formula>surround(formula, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<Formula>surround(formula, _function_1);
-    ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(formula);
-    ISemanticRegion _keyword = _regionFor.keyword("formula");
-    final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
-    document.prepend(_keyword, _function_2);
-    ISemanticRegionsFinder _regionFor_1 = this.textRegionExtensions.regionFor(formula);
-    ISemanticRegion _keyword_1 = _regionFor_1.keyword("formula");
-    final Procedure1<IHiddenRegionFormatter> _function_3 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    document.prepend(this.textRegionExtensions.regionFor(formula).keyword("formula"), _function_2);
+    final Procedure1<IHiddenRegionFormatter> _function_3 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
-    document.surround(_keyword_1, _function_3);
-    ISemanticRegionsFinder _regionFor_2 = this.textRegionExtensions.regionFor(formula);
-    ISemanticRegion _keyword_2 = _regionFor_2.keyword("}");
-    final Procedure1<IHiddenRegionFormatter> _function_4 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    document.surround(this.textRegionExtensions.regionFor(formula).keyword("formula"), _function_3);
+    final Procedure1<IHiddenRegionFormatter> _function_4 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
-    document.prepend(_keyword_2, _function_4);
+    document.prepend(this.textRegionExtensions.regionFor(formula).keyword("}"), _function_4);
     EList<ConditionGraph> _conditionGraphs = formula.getConditionGraphs();
     for (final ConditionGraph g : _conditionGraphs) {
       {
-        final Procedure1<IHiddenRegionFormatter> _function_5 = (IHiddenRegionFormatter it) -> {
-          it.newLine();
+        final Procedure1<IHiddenRegionFormatter> _function_5 = new Procedure1<IHiddenRegionFormatter>() {
+          public void apply(final IHiddenRegionFormatter it) {
+            it.newLine();
+          }
         };
         document.<ConditionGraph>prepend(g, _function_5);
         document.<ConditionGraph>format(g);
@@ -628,43 +697,49 @@
     for (final UnitElement unitElement : _unitElements) {
       document.<UnitElement>format(unitElement);
     }
-    ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(unit);
-    ISemanticRegion _keyword = _regionFor.keyword("(");
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.noSpace();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.noSpace();
+      }
     };
-    document.append(_keyword, _function);
-    ISemanticRegionsFinder _regionFor_1 = this.textRegionExtensions.regionFor(unit);
-    ISemanticRegion _keyword_1 = _regionFor_1.keyword(")");
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    document.append(this.textRegionExtensions.regionFor(unit).keyword("("), _function);
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.append(_keyword_1, _function_1);
-    ISemanticRegionsFinder _regionFor_2 = this.textRegionExtensions.regionFor(unit);
-    ISemanticRegion _keyword_2 = _regionFor_2.keyword("{");
-    final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    document.append(this.textRegionExtensions.regionFor(unit).keyword(")"), _function_1);
+    final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
-    document.append(_keyword_2, _function_2);
-    ISemanticRegionsFinder _regionFor_3 = this.textRegionExtensions.regionFor(unit);
-    ISemanticRegion _keyword_3 = _regionFor_3.keyword("}");
-    final Procedure1<IHiddenRegionFormatter> _function_3 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    document.append(this.textRegionExtensions.regionFor(unit).keyword("{"), _function_2);
+    final Procedure1<IHiddenRegionFormatter> _function_3 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
-    document.prepend(_keyword_3, _function_3);
-    final Procedure1<IHiddenRegionFormatter> _function_4 = (IHiddenRegionFormatter it) -> {
-      it.setNewLines(2);
+    document.prepend(this.textRegionExtensions.regionFor(unit).keyword("}"), _function_3);
+    final Procedure1<IHiddenRegionFormatter> _function_4 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.setNewLines(2);
+      }
     };
     document.<Unit>surround(unit, _function_4);
   }
   
   protected void _format(final UnitElement unitElement, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<UnitElement>surround(unitElement, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<UnitElement>surround(unitElement, _function_1);
     EList<UnitElement> _subSequence = unitElement.getSubSequence();
@@ -674,63 +749,70 @@
   }
   
   protected void _format(final Call call, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<Call>surround(call, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<Call>surround(call, _function_1);
   }
   
   protected void _format(final ConditionalUnit unit, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<ConditionalUnit>surround(unit, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<ConditionalUnit>surround(unit, _function_1);
-    ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(unit);
-    ISemanticRegion _keyword = _regionFor.keyword("(");
-    final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.prepend(_keyword, _function_2);
-    ISemanticRegionsFinder _regionFor_1 = this.textRegionExtensions.regionFor(unit);
-    ISemanticRegion _keyword_1 = _regionFor_1.keyword("(");
-    final Procedure1<IHiddenRegionFormatter> _function_3 = (IHiddenRegionFormatter it) -> {
-      it.noSpace();
+    document.prepend(this.textRegionExtensions.regionFor(unit).keyword("("), _function_2);
+    final Procedure1<IHiddenRegionFormatter> _function_3 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.noSpace();
+      }
     };
-    document.append(_keyword_1, _function_3);
-    ISemanticRegionsFinder _regionFor_2 = this.textRegionExtensions.regionFor(unit);
-    ISemanticRegion _keyword_2 = _regionFor_2.keyword(")");
-    final Procedure1<IHiddenRegionFormatter> _function_4 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    document.append(this.textRegionExtensions.regionFor(unit).keyword("("), _function_3);
+    final Procedure1<IHiddenRegionFormatter> _function_4 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.append(_keyword_2, _function_4);
-    ISemanticRegionsFinder _regionFor_3 = this.textRegionExtensions.regionFor(unit);
-    ISemanticRegion _keyword_3 = _regionFor_3.keyword("{");
-    final Procedure1<IHiddenRegionFormatter> _function_5 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    document.append(this.textRegionExtensions.regionFor(unit).keyword(")"), _function_4);
+    final Procedure1<IHiddenRegionFormatter> _function_5 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
-    document.append(_keyword_3, _function_5);
-    ISemanticRegionsFinder _regionFor_4 = this.textRegionExtensions.regionFor(unit);
-    ISemanticRegion _keyword_4 = _regionFor_4.keyword("}");
-    final Procedure1<IHiddenRegionFormatter> _function_6 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    document.append(this.textRegionExtensions.regionFor(unit).keyword("{"), _function_5);
+    final Procedure1<IHiddenRegionFormatter> _function_6 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
-    document.prepend(_keyword_4, _function_6);
-    ISemanticRegionsFinder _regionFor_5 = this.textRegionExtensions.regionFor(unit);
-    ISemanticRegion _keyword_5 = _regionFor_5.keyword("else");
-    final Procedure1<IHiddenRegionFormatter> _function_7 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    document.prepend(this.textRegionExtensions.regionFor(unit).keyword("}"), _function_6);
+    final Procedure1<IHiddenRegionFormatter> _function_7 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.prepend(_keyword_5, _function_7);
-    EList<UnitElement> _if = unit.getIf();
-    document.<EList<UnitElement>>format(_if);
+    document.prepend(this.textRegionExtensions.regionFor(unit).keyword("else"), _function_7);
+    document.<EList<UnitElement>>format(unit.getIf());
     EList<UnitElement> _then = unit.getThen();
     for (final UnitElement el : _then) {
       document.<UnitElement>format(el);
@@ -742,12 +824,16 @@
   }
   
   protected void _format(final PriorityUnit unit, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<PriorityUnit>surround(unit, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<PriorityUnit>surround(unit, _function_1);
     EList<UnitElement> _subSequence = unit.getSubSequence();
@@ -757,12 +843,16 @@
   }
   
   protected void _format(final IndependentUnit unit, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<IndependentUnit>surround(unit, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<IndependentUnit>surround(unit, _function_1);
     EList<UnitElement> _subSequence = unit.getSubSequence();
@@ -772,12 +862,16 @@
   }
   
   protected void _format(final LoopUnit unit, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<LoopUnit>surround(unit, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<LoopUnit>surround(unit, _function_1);
     EList<UnitElement> _subElement = unit.getSubElement();
@@ -787,72 +881,86 @@
   }
   
   protected void _format(final IteratedUnit unit, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<IteratedUnit>surround(unit, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<IteratedUnit>surround(unit, _function_1);
     EList<UnitElement> _subElement = unit.getSubElement();
     for (final UnitElement el : _subElement) {
       document.<UnitElement>format(el);
     }
-    ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(unit);
-    ISemanticRegion _keyword = _regionFor.keyword("(");
-    final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    final Procedure1<IHiddenRegionFormatter> _function_2 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.prepend(_keyword, _function_2);
-    ISemanticRegionsFinder _regionFor_1 = this.textRegionExtensions.regionFor(unit);
-    ISemanticRegion _keyword_1 = _regionFor_1.keyword("(");
-    final Procedure1<IHiddenRegionFormatter> _function_3 = (IHiddenRegionFormatter it) -> {
-      it.noSpace();
+    document.prepend(this.textRegionExtensions.regionFor(unit).keyword("("), _function_2);
+    final Procedure1<IHiddenRegionFormatter> _function_3 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.noSpace();
+      }
     };
-    document.append(_keyword_1, _function_3);
-    ISemanticRegionsFinder _regionFor_2 = this.textRegionExtensions.regionFor(unit);
-    ISemanticRegion _keyword_2 = _regionFor_2.keyword(")");
-    final Procedure1<IHiddenRegionFormatter> _function_4 = (IHiddenRegionFormatter it) -> {
-      it.oneSpace();
+    document.append(this.textRegionExtensions.regionFor(unit).keyword("("), _function_3);
+    final Procedure1<IHiddenRegionFormatter> _function_4 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.oneSpace();
+      }
     };
-    document.append(_keyword_2, _function_4);
-    ISemanticRegionsFinder _regionFor_3 = this.textRegionExtensions.regionFor(unit);
-    ISemanticRegion _keyword_3 = _regionFor_3.keyword("{");
-    final Procedure1<IHiddenRegionFormatter> _function_5 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    document.append(this.textRegionExtensions.regionFor(unit).keyword(")"), _function_4);
+    final Procedure1<IHiddenRegionFormatter> _function_5 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
-    document.append(_keyword_3, _function_5);
-    ISemanticRegionsFinder _regionFor_4 = this.textRegionExtensions.regionFor(unit);
-    ISemanticRegion _keyword_4 = _regionFor_4.keyword("}");
-    final Procedure1<IHiddenRegionFormatter> _function_6 = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    document.append(this.textRegionExtensions.regionFor(unit).keyword("{"), _function_5);
+    final Procedure1<IHiddenRegionFormatter> _function_6 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
-    document.prepend(_keyword_4, _function_6);
-    final Procedure1<IHiddenRegionFormatter> _function_7 = (IHiddenRegionFormatter it) -> {
-      it.setNewLines(1);
+    document.prepend(this.textRegionExtensions.regionFor(unit).keyword("}"), _function_6);
+    final Procedure1<IHiddenRegionFormatter> _function_7 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.setNewLines(1);
+      }
     };
     document.<IteratedUnit>surround(unit, _function_7);
   }
   
   protected void _format(final Strict strict, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<Strict>surround(strict, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<Strict>surround(strict, _function_1);
   }
   
   protected void _format(final Rollback rollback, @Extension final IFormattableDocument document) {
-    final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
-      it.newLine();
+    final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.newLine();
+      }
     };
     document.<Rollback>surround(rollback, _function);
-    final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it) -> {
-      it.indent();
+    final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
+      public void apply(final IHiddenRegionFormatter it) {
+        it.indent();
+      }
     };
     document.<Rollback>surround(rollback, _function_1);
   }
diff --git a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/generator/Henshin_textGenerator.java b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/generator/Henshin_textGenerator.java
index 44878de..b8c55a6 100644
--- a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/generator/Henshin_textGenerator.java
+++ b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/generator/Henshin_textGenerator.java
@@ -15,7 +15,6 @@
  */
 @SuppressWarnings("all")
 public class Henshin_textGenerator extends AbstractGenerator {
-  @Override
   public void doGenerate(final Resource resource, final IFileSystemAccess2 fsa, final IGeneratorContext context) {
   }
 }
diff --git a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/scoping/Henshin_textScopeProvider.java b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/scoping/Henshin_textScopeProvider.java
index 9b6560f..27d9db4 100644
--- a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/scoping/Henshin_textScopeProvider.java
+++ b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/scoping/Henshin_textScopeProvider.java
@@ -3,8 +3,6 @@
  */
 package org.eclipse.emf.henshin.text.scoping;
 
-import org.eclipse.emf.henshin.text.scoping.AbstractHenshin_textScopeProvider;
-
 /**
  * This class contains custom scoping description.
  * 
diff --git a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textBoolType.java b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textBoolType.java
index 66c24e7..e0a2ea9 100644
--- a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textBoolType.java
+++ b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textBoolType.java
@@ -1,10 +1,7 @@
 package org.eclipse.emf.henshin.text.typesystem;
 
-import org.eclipse.emf.henshin.text.typesystem.Henshin_textType;
-
 @SuppressWarnings("all")
 public class Henshin_textBoolType implements Henshin_textType {
-  @Override
   public String toString() {
     return "boolean";
   }
diff --git a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textComplexType.java b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textComplexType.java
index 3e93e51..3ae6459 100644
--- a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textComplexType.java
+++ b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textComplexType.java
@@ -1,10 +1,7 @@
 package org.eclipse.emf.henshin.text.typesystem;
 
-import org.eclipse.emf.henshin.text.typesystem.Henshin_textType;
-
 @SuppressWarnings("all")
 public class Henshin_textComplexType implements Henshin_textType {
-  @Override
   public String toString() {
     return "complex";
   }
diff --git a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textNumberType.java b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textNumberType.java
index 92fbdca..e2b63b6 100644
--- a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textNumberType.java
+++ b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textNumberType.java
@@ -1,10 +1,7 @@
 package org.eclipse.emf.henshin.text.typesystem;
 
-import org.eclipse.emf.henshin.text.typesystem.Henshin_textType;
-
 @SuppressWarnings("all")
 public class Henshin_textNumberType implements Henshin_textType {
-  @Override
   public String toString() {
     return "number";
   }
diff --git a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textStringType.java b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textStringType.java
index ff51918..49e6db0 100644
--- a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textStringType.java
+++ b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textStringType.java
@@ -1,10 +1,7 @@
 package org.eclipse.emf.henshin.text.typesystem;
 
-import org.eclipse.emf.henshin.text.typesystem.Henshin_textType;
-
 @SuppressWarnings("all")
 public class Henshin_textStringType implements Henshin_textType {
-  @Override
   public String toString() {
     return "string";
   }
diff --git a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textType.java b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textType.java
index acf3c21..9698364 100644
--- a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textType.java
+++ b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textType.java
@@ -2,6 +2,5 @@
 
 @SuppressWarnings("all")
 public interface Henshin_textType {
-  @Override
-  public abstract String toString();
+  String toString();
 }
diff --git a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textTypeProvider.java b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textTypeProvider.java
index 56fe2b7..788495e 100644
--- a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textTypeProvider.java
+++ b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/typesystem/Henshin_textTypeProvider.java
@@ -4,7 +4,6 @@
 import com.google.common.collect.Iterables;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
-import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.henshin.text.henshin_text.AndExpression;
@@ -24,30 +23,22 @@
 import org.eclipse.emf.henshin.text.henshin_text.NotExpression;
 import org.eclipse.emf.henshin.text.henshin_text.NumberValue;
 import org.eclipse.emf.henshin.text.henshin_text.OrExpression;
-import org.eclipse.emf.henshin.text.henshin_text.Parameter;
 import org.eclipse.emf.henshin.text.henshin_text.ParameterType;
 import org.eclipse.emf.henshin.text.henshin_text.ParameterValue;
 import org.eclipse.emf.henshin.text.henshin_text.PlusExpression;
 import org.eclipse.emf.henshin.text.henshin_text.Rule;
-import org.eclipse.emf.henshin.text.henshin_text.RuleElement;
 import org.eclipse.emf.henshin.text.henshin_text.StringValue;
-import org.eclipse.emf.henshin.text.henshin_text.Type;
-import org.eclipse.emf.henshin.text.typesystem.Henshin_textBoolType;
-import org.eclipse.emf.henshin.text.typesystem.Henshin_textComplexType;
-import org.eclipse.emf.henshin.text.typesystem.Henshin_textNumberType;
-import org.eclipse.emf.henshin.text.typesystem.Henshin_textStringType;
-import org.eclipse.emf.henshin.text.typesystem.Henshin_textType;
 import org.eclipse.xtext.xbase.lib.Exceptions;
 
 @SuppressWarnings("all")
 public class Henshin_textTypeProvider {
-  public final static Henshin_textStringType stringType = new Henshin_textStringType();
+  public static final Henshin_textStringType stringType = new Henshin_textStringType();
   
-  public final static Henshin_textNumberType numberType = new Henshin_textNumberType();
+  public static final Henshin_textNumberType numberType = new Henshin_textNumberType();
   
-  public final static Henshin_textBoolType boolType = new Henshin_textBoolType();
+  public static final Henshin_textBoolType boolType = new Henshin_textBoolType();
   
-  public final static Henshin_textComplexType complexType = new Henshin_textComplexType();
+  public static final Henshin_textComplexType complexType = new Henshin_textComplexType();
   
   /**
    * Liefert den Type eines Ausdrucks
@@ -130,8 +121,7 @@
     if (!_matched) {
       if (expression instanceof BracketExpression) {
         _matched=true;
-        Expression _expression = ((BracketExpression)expression).getExpression();
-        return this.typeFor(_expression);
+        return this.typeFor(((BracketExpression)expression).getExpression());
       }
     }
     if (!_matched) {
@@ -143,9 +133,7 @@
     if (!_matched) {
       if (expression instanceof ParameterValue) {
         _matched=true;
-        Parameter _value = ((ParameterValue)expression).getValue();
-        ParameterType _type = _value.getType();
-        return this.typeFor(_type);
+        return this.typeFor(((ParameterValue)expression).getValue().getType());
       }
     }
     if (!_matched) {
@@ -172,44 +160,32 @@
   public Henshin_textType typeFor(final JavaAttributeValue javaAttribute) {
     EObject container = javaAttribute.eContainer();
     while (((!(container instanceof Rule)) && (!(container instanceof MultiRule)))) {
-      EObject _eContainer = container.eContainer();
-      container = _eContainer;
+      container = container.eContainer();
     }
     Iterable<JavaImport> iterableOfJavaImportImpl = null;
     if ((container instanceof Rule)) {
-      EList<RuleElement> _ruleElements = ((Rule) container).getRuleElements();
-      Iterable<JavaImport> _filter = Iterables.<JavaImport>filter(_ruleElements, JavaImport.class);
-      iterableOfJavaImportImpl = _filter;
+      iterableOfJavaImportImpl = Iterables.<JavaImport>filter(((Rule) container).getRuleElements(), JavaImport.class);
     } else {
-      EList<RuleElement> _multiruleElements = ((MultiRule) container).getMultiruleElements();
-      Iterable<JavaImport> _filter_1 = Iterables.<JavaImport>filter(_multiruleElements, JavaImport.class);
-      iterableOfJavaImportImpl = _filter_1;
+      iterableOfJavaImportImpl = Iterables.<JavaImport>filter(((MultiRule) container).getMultiruleElements(), JavaImport.class);
     }
     for (final JavaImport imports : iterableOfJavaImportImpl) {
       try {
         String _packagename = imports.getPackagename();
         String _plus = (_packagename + ".");
-        String _value = javaAttribute.getValue();
-        String[] _split = _value.split("\\.");
-        String _get = _split[0];
+        String _get = javaAttribute.getValue().split("\\.")[0];
         String _plus_1 = (_plus + _get);
         Class<?> calledClass = Class.forName(_plus_1);
         Field[] _declaredFields = calledClass.getDeclaredFields();
         for (final Field atrib : _declaredFields) {
           String _name = atrib.getName();
-          String _value_1 = javaAttribute.getValue();
-          String[] _split_1 = _value_1.split("\\.");
-          Object _get_1 = _split_1[1];
+          Object _get_1 = javaAttribute.getValue().split("\\.")[1];
           boolean _equals = Objects.equal(_name, _get_1);
           if (_equals) {
-            Class<?> _type = atrib.getType();
-            String _name_1 = _type.getName();
-            return this.typeForJavaType(_name_1);
+            return this.typeForJavaType(atrib.getType().getName());
           }
         }
       } catch (final Throwable _t) {
         if (_t instanceof Exception) {
-          final Exception e = (Exception)_t;
         } else {
           throw Exceptions.sneakyThrow(_t);
         }
@@ -227,44 +203,32 @@
   public Henshin_textType typeFor(final JavaClassValue javaCall) {
     EObject container = javaCall.eContainer();
     while (((!(container instanceof Rule)) && (!(container instanceof MultiRule)))) {
-      EObject _eContainer = container.eContainer();
-      container = _eContainer;
+      container = container.eContainer();
     }
     Iterable<JavaImport> iterableOfJavaImportImpl = null;
     if ((container instanceof Rule)) {
-      EList<RuleElement> _ruleElements = ((Rule) container).getRuleElements();
-      Iterable<JavaImport> _filter = Iterables.<JavaImport>filter(_ruleElements, JavaImport.class);
-      iterableOfJavaImportImpl = _filter;
+      iterableOfJavaImportImpl = Iterables.<JavaImport>filter(((Rule) container).getRuleElements(), JavaImport.class);
     } else {
-      EList<RuleElement> _multiruleElements = ((MultiRule) container).getMultiruleElements();
-      Iterable<JavaImport> _filter_1 = Iterables.<JavaImport>filter(_multiruleElements, JavaImport.class);
-      iterableOfJavaImportImpl = _filter_1;
+      iterableOfJavaImportImpl = Iterables.<JavaImport>filter(((MultiRule) container).getMultiruleElements(), JavaImport.class);
     }
     for (final JavaImport imports : iterableOfJavaImportImpl) {
       try {
         String _packagename = imports.getPackagename();
         String _plus = (_packagename + ".");
-        String _value = javaCall.getValue();
-        String[] _split = _value.split("\\.");
-        String _get = _split[0];
+        String _get = javaCall.getValue().split("\\.")[0];
         String _plus_1 = (_plus + _get);
         Class<?> calledClass = Class.forName(_plus_1);
         Method[] _methods = calledClass.getMethods();
         for (final Method methode : _methods) {
           String _name = methode.getName();
-          String _value_1 = javaCall.getValue();
-          String[] _split_1 = _value_1.split("\\.");
-          Object _get_1 = _split_1[1];
+          Object _get_1 = javaCall.getValue().split("\\.")[1];
           boolean _equals = Objects.equal(_name, _get_1);
           if (_equals) {
-            Class<?> _returnType = methode.getReturnType();
-            String _name_1 = _returnType.getName();
-            return this.typeForJavaType(_name_1);
+            return this.typeForJavaType(methode.getReturnType().getName());
           }
         }
       } catch (final Throwable _t) {
         if (_t instanceof Exception) {
-          final Exception e = (Exception)_t;
         } else {
           throw Exceptions.sneakyThrow(_t);
         }
@@ -280,46 +244,114 @@
    * @return Type des Java-Types
    */
   public Henshin_textType typeForJavaType(final String className) {
-    switch (className) {
-      case "java.lang.Boolean":
-        return Henshin_textTypeProvider.boolType;
-      case "boolean":
-        return Henshin_textTypeProvider.boolType;
-      case "java.lang.Byte":
-        return Henshin_textTypeProvider.numberType;
-      case "byte":
-        return Henshin_textTypeProvider.numberType;
-      case "java.lang.Character":
-        return Henshin_textTypeProvider.stringType;
-      case "char":
-        return Henshin_textTypeProvider.stringType;
-      case "java.lang.Double":
-        return Henshin_textTypeProvider.numberType;
-      case "double":
-        return Henshin_textTypeProvider.numberType;
-      case "java.lang.Float":
-        return Henshin_textTypeProvider.numberType;
-      case "float":
-        return Henshin_textTypeProvider.numberType;
-      case "java.lang.Integer":
-        return Henshin_textTypeProvider.numberType;
-      case "int":
-        return Henshin_textTypeProvider.numberType;
-      case "java.lang.Long":
-        return Henshin_textTypeProvider.numberType;
-      case "long":
-        return Henshin_textTypeProvider.numberType;
-      case "java.lang.Short":
-        return Henshin_textTypeProvider.numberType;
-      case "short":
-        return Henshin_textTypeProvider.numberType;
-      case "java.lang.String":
-        return Henshin_textTypeProvider.stringType;
-      case "string":
-        return Henshin_textTypeProvider.stringType;
-      default:
-        return Henshin_textTypeProvider.complexType;
+    boolean _matched = false;
+    if (Objects.equal(className, "java.lang.Boolean")) {
+      _matched=true;
+      return Henshin_textTypeProvider.boolType;
     }
+    if (!_matched) {
+      if (Objects.equal(className, "boolean")) {
+        _matched=true;
+        return Henshin_textTypeProvider.boolType;
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(className, "java.lang.Byte")) {
+        _matched=true;
+        return Henshin_textTypeProvider.numberType;
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(className, "byte")) {
+        _matched=true;
+        return Henshin_textTypeProvider.numberType;
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(className, "java.lang.Character")) {
+        _matched=true;
+        return Henshin_textTypeProvider.stringType;
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(className, "char")) {
+        _matched=true;
+        return Henshin_textTypeProvider.stringType;
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(className, "java.lang.Double")) {
+        _matched=true;
+        return Henshin_textTypeProvider.numberType;
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(className, "double")) {
+        _matched=true;
+        return Henshin_textTypeProvider.numberType;
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(className, "java.lang.Float")) {
+        _matched=true;
+        return Henshin_textTypeProvider.numberType;
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(className, "float")) {
+        _matched=true;
+        return Henshin_textTypeProvider.numberType;
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(className, "java.lang.Integer")) {
+        _matched=true;
+        return Henshin_textTypeProvider.numberType;
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(className, "int")) {
+        _matched=true;
+        return Henshin_textTypeProvider.numberType;
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(className, "java.lang.Long")) {
+        _matched=true;
+        return Henshin_textTypeProvider.numberType;
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(className, "long")) {
+        _matched=true;
+        return Henshin_textTypeProvider.numberType;
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(className, "java.lang.Short")) {
+        _matched=true;
+        return Henshin_textTypeProvider.numberType;
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(className, "short")) {
+        _matched=true;
+        return Henshin_textTypeProvider.numberType;
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(className, "java.lang.String")) {
+        _matched=true;
+        return Henshin_textTypeProvider.stringType;
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(className, "string")) {
+        _matched=true;
+        return Henshin_textTypeProvider.stringType;
+      }
+    }
+    return Henshin_textTypeProvider.complexType;
   }
   
   /**
@@ -332,9 +364,7 @@
     EClass _type = parameterType.getType();
     boolean _equals = Objects.equal(_type, null);
     if (_equals) {
-      Type _enumType = parameterType.getEnumType();
-      String _literal = _enumType.getLiteral();
-      return this.typeFor(_literal);
+      return this.typeFor(parameterType.getEnumType().getLiteral());
     } else {
       return Henshin_textTypeProvider.complexType;
     }
@@ -347,73 +377,202 @@
    * @return Type des E-Types
    */
   public Henshin_textType typeFor(final String eType) {
-    switch (eType) {
-      case "EBigDecimal":
+    boolean _matched = false;
+    if (Objects.equal(eType, "EBigDecimal")) {
+      _matched=true;
+      return Henshin_textTypeProvider.complexType;
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EBigInteger")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EBigInteger":
-        return Henshin_textTypeProvider.complexType;
-      case "EBoolean":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EBoolean")) {
+        _matched=true;
         return Henshin_textTypeProvider.boolType;
-      case "EBooleanObject":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EBooleanObject")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EByte":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EByte")) {
+        _matched=true;
         return Henshin_textTypeProvider.numberType;
-      case "EByteArray":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EByteArray")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EByteObject":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EByteObject")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EChar":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EChar")) {
+        _matched=true;
         return Henshin_textTypeProvider.stringType;
-      case "ECharacterObject":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "ECharacterObject")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EDate":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EDate")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EDiagnosticChain":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EDiagnosticChain")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EDouble":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EDouble")) {
+        _matched=true;
         return Henshin_textTypeProvider.numberType;
-      case "EDoubleObject":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EDoubleObject")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EEList":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EEList")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EEnumerator":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EEnumerator")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EFeatureMap":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EFeatureMap")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EFeatureMapEntry":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EFeatureMapEntry")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EFloat":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EFloat")) {
+        _matched=true;
         return Henshin_textTypeProvider.numberType;
-      case "EFloatObject":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EFloatObject")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EInt":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EInt")) {
+        _matched=true;
         return Henshin_textTypeProvider.numberType;
-      case "EIntegerObject":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EIntegerObject")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "ETreeIterator":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "ETreeIterator")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EInvocationTargetException":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EInvocationTargetException")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EJavaClass":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EJavaClass")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EJavaObject":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EJavaObject")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "ELong":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "ELong")) {
+        _matched=true;
         return Henshin_textTypeProvider.numberType;
-      case "ELongObject":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "ELongObject")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EMap":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EMap")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EResource":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EResource")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EResourceSet":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EResourceSet")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EShort":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EShort")) {
+        _matched=true;
         return Henshin_textTypeProvider.numberType;
-      case "EShortObject":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EShortObject")) {
+        _matched=true;
         return Henshin_textTypeProvider.complexType;
-      case "EString":
+      }
+    }
+    if (!_matched) {
+      if (Objects.equal(eType, "EString")) {
+        _matched=true;
         return Henshin_textTypeProvider.stringType;
+      }
     }
     return null;
   }
diff --git a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/validation/Henshin_textValidator.java b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/validation/Henshin_textValidator.java
index c08c78c..efb5a60 100644
--- a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/validation/Henshin_textValidator.java
+++ b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/validation/Henshin_textValidator.java
@@ -10,6 +10,10 @@
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EAttribute;
 import org.eclipse.emf.ecore.EClass;
@@ -73,7 +77,9 @@
 import org.eclipse.emf.henshin.text.henshin_text.impl.StrictImpl;
 import org.eclipse.emf.henshin.text.typesystem.Henshin_textType;
 import org.eclipse.emf.henshin.text.typesystem.Henshin_textTypeProvider;
-import org.eclipse.emf.henshin.text.validation.AbstractHenshin_textValidator;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.xtext.validation.Check;
 import org.eclipse.xtext.xbase.lib.Conversions;
 import org.eclipse.xtext.xbase.lib.Exceptions;
@@ -100,9 +106,11 @@
    */
   @Check
   public void checkCallParameter(final Call call) {
-    final Function1<Parameter, Boolean> _function = (Parameter it) -> {
-      ParameterKind _kind = it.getKind();
-      return Boolean.valueOf((!Objects.equal(_kind, ParameterKind.VAR)));
+    final Function1<Parameter, Boolean> _function = new Function1<Parameter, Boolean>() {
+      public Boolean apply(final Parameter it) {
+        ParameterKind _kind = it.getKind();
+        return Boolean.valueOf((!Objects.equal(_kind, ParameterKind.VAR)));
+      }
     };
     int _size = IterableExtensions.size(IterableExtensions.<Parameter>filter(call.getElementCall().getParameters(), _function));
     int _size_1 = call.getParameters().size();
@@ -110,10 +118,12 @@
     if (_notEquals) {
       this.error("Bad Parameter Count.\'", Henshin_textPackage.eINSTANCE.getCall_ElementCall());
     } else {
-      for (int i = 0; (i < IterableExtensions.size(IterableExtensions.<Parameter>filter(call.getElementCall().getParameters(), ((Function1<Parameter, Boolean>) (Parameter it) -> {
-        ParameterKind _kind = it.getKind();
-        return Boolean.valueOf((!Objects.equal(_kind, ParameterKind.VAR)));
-      })))); i++) {
+      for (int i = 0; (i < IterableExtensions.size(IterableExtensions.<Parameter>filter(call.getElementCall().getParameters(), new Function1<Parameter, Boolean>() {
+        public Boolean apply(final Parameter it) {
+          ParameterKind _kind = it.getKind();
+          return Boolean.valueOf((!Objects.equal(_kind, ParameterKind.VAR)));
+        }
+      }))); i++) {
         {
           final Parameter param = call.getElementCall().getParameters().get(i);
           Henshin_textType _typeFor = this._henshin_textTypeProvider.typeFor(param.getType());
@@ -711,16 +721,41 @@
    */
   @Check
   public void checkJavaImport(final Rule rule) {
-    Iterable<JavaImportImpl> iterableOfJavaImportImpl = Iterables.<JavaImportImpl>filter(rule.getRuleElements(), JavaImportImpl.class);
-    for (final JavaImportImpl javaImport : iterableOfJavaImportImpl) {
-      Package _package = Package.getPackage(javaImport.getPackagename());
-      boolean _equals = Objects.equal(_package, null);
-      if (_equals) {
-        String _packagename = javaImport.getPackagename();
-        String _plus = ("Package " + _packagename);
-        String _plus_1 = (_plus + " doesn\'t exist.\'");
-        this.error(_plus_1, javaImport, Henshin_textPackage.Literals.JAVA_IMPORT__PACKAGENAME);
+    try {
+      Iterable<JavaImportImpl> iterableOfJavaImportImpl = Iterables.<JavaImportImpl>filter(rule.getRuleElements(), JavaImportImpl.class);
+      String projectName = rule.eResource().getURI().toString().replaceAll("platform:/resource/", "").replaceAll("\\/.*", "");
+      IWorkspace workspace = ResourcesPlugin.getWorkspace();
+      IWorkspaceRoot root = workspace.getRoot();
+      IJavaProject javaProject = null;
+      IProject[] _projects = root.getProjects();
+      for (final IProject project : _projects) {
+        boolean _equals = projectName.equals(project.getName());
+        if (_equals) {
+          javaProject = JavaCore.create(project);
+        }
       }
+      for (final JavaImportImpl javaImport : iterableOfJavaImportImpl) {
+        {
+          boolean importCorrect = false;
+          if ((javaProject != null)) {
+            IPackageFragmentRoot[] _allPackageFragmentRoots = javaProject.getAllPackageFragmentRoots();
+            for (final IPackageFragmentRoot package_ : _allPackageFragmentRoots) {
+              boolean _exists = package_.getPackageFragment(javaImport.getPackagename()).exists();
+              if (_exists) {
+                importCorrect = true;
+              }
+            }
+          }
+          if ((!importCorrect)) {
+            String _packagename = javaImport.getPackagename();
+            String _plus = ("Package " + _packagename);
+            String _plus_1 = (_plus + " doesn\'t exist.\'");
+            this.error(_plus_1, javaImport, Henshin_textPackage.Literals.JAVA_IMPORT__PACKAGENAME);
+          }
+        }
+      }
+    } catch (Throwable _e) {
+      throw Exceptions.sneakyThrow(_e);
     }
   }
   
@@ -760,16 +795,41 @@
    */
   @Check
   public void checkJavaImport(final MultiRule rule) {
-    Iterable<JavaImportImpl> iterableOfJavaImportImpl = Iterables.<JavaImportImpl>filter(rule.getMultiruleElements(), JavaImportImpl.class);
-    for (final JavaImportImpl javaImport : iterableOfJavaImportImpl) {
-      Package _package = Package.getPackage(javaImport.getPackagename());
-      boolean _equals = Objects.equal(_package, null);
-      if (_equals) {
-        String _packagename = javaImport.getPackagename();
-        String _plus = ("Package " + _packagename);
-        String _plus_1 = (_plus + " doesn\'t exist.\'");
-        this.error(_plus_1, javaImport, Henshin_textPackage.Literals.JAVA_IMPORT__PACKAGENAME);
+    try {
+      Iterable<JavaImportImpl> iterableOfJavaImportImpl = Iterables.<JavaImportImpl>filter(rule.getMultiruleElements(), JavaImportImpl.class);
+      String projectName = rule.eResource().getURI().toString().replaceAll("platform:/resource/", "").replaceAll("\\/.*", "");
+      IWorkspace workspace = ResourcesPlugin.getWorkspace();
+      IWorkspaceRoot root = workspace.getRoot();
+      IJavaProject javaProject = null;
+      IProject[] _projects = root.getProjects();
+      for (final IProject project : _projects) {
+        boolean _equals = projectName.equals(project.getName());
+        if (_equals) {
+          javaProject = JavaCore.create(project);
+        }
       }
+      for (final JavaImportImpl javaImport : iterableOfJavaImportImpl) {
+        {
+          boolean importCorrect = false;
+          if ((javaProject != null)) {
+            IPackageFragmentRoot[] _allPackageFragmentRoots = javaProject.getAllPackageFragmentRoots();
+            for (final IPackageFragmentRoot package_ : _allPackageFragmentRoots) {
+              boolean _exists = package_.getPackageFragment(javaImport.getPackagename()).exists();
+              if (_exists) {
+                importCorrect = true;
+              }
+            }
+          }
+          if ((!importCorrect)) {
+            String _packagename = javaImport.getPackagename();
+            String _plus = ("Package " + _packagename);
+            String _plus_1 = (_plus + " doesn\'t exist.\'");
+            this.error(_plus_1, javaImport, Henshin_textPackage.Literals.JAVA_IMPORT__PACKAGENAME);
+          }
+        }
+      }
+    } catch (Throwable _e) {
+      throw Exceptions.sneakyThrow(_e);
     }
   }
   
diff --git a/promote.sh b/promote.sh
index 8126133..c4257e8 100755
--- a/promote.sh
+++ b/promote.sh
@@ -16,5 +16,5 @@
 TRG="/home/data/httpd/download.eclipse.org/modeling/emft/henshin/updates/$BUILD"
 
 ssh genie.henshin@projects-storage.eclipse.org rm -R $TRG/* 2> /dev/null
-scp -pr $SRC/. genie.henshin@projects-storage.eclipse.org:$TRG
+scp -pr $SRC/* genie.henshin@projects-storage.eclipse.org:$TRG
 ssh genie.henshin@projects-storage.eclipse.org ls -al $TRG
\ No newline at end of file