Index: v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/formatting/EbnfFormatter.xtend
===================================================================
--- v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/formatting/EbnfFormatter.xtend	(revision 70)
+++ v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/formatting/EbnfFormatter.xtend	(revision 72)
@@ -6,10 +6,7 @@
 import com.google.inject.Inject
 import de.ugoe.cs.swe.bnftools.services.EbnfGrammarAccess
-import org.eclipse.xtext.Keyword
 import org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter
 import org.eclipse.xtext.formatting.impl.FormattingConfig
-import org.eclipse.emf.ecore.EObject
-import de.ugoe.cs.swe.bnftools.ebnf.Rule
-import de.ugoe.cs.swe.bnftools.ebnf.DefinitionList
+
 
 /**
@@ -38,9 +35,4 @@
 
 		
-//		for (Keyword bar : f.findKeywords("|")) {
-//
-//			c.setSpace("\n\t\t").before(bar);
-//		}
-
 	}
 }
Index: v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/generator/EbnfGenerator.xtend
===================================================================
--- v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/generator/EbnfGenerator.xtend	(revision 70)
+++ v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/generator/EbnfGenerator.xtend	(revision 72)
@@ -24,4 +24,5 @@
 import org.eclipse.xtext.generator.IFileSystemAccessExtension
 import java.io.PrintWriter
+
 /**
  * Generates code from your model files on save.
@@ -30,23 +31,22 @@
  */
 class EbnfGenerator implements IGenerator {
+
 	//generation of the xsl-file
 	override void doGenerate(Resource resource, IFileSystemAccess fsa) {
-		var String workspacePath =WorkspaceResolver.getWorkspace();
+		var String workspacePath = WorkspaceResolver.getWorkspace();
 		for (e : resource.allContents.toIterable.filter(EtsiBnf)) {
-			if (e.bnfEntry.size!=0) {
-				 fsa.generateFile(e.name + ".fo", e.compile)
-				 
-				 //generate pdf
-				 var uri = (fsa as IFileSystemAccessExtension2).getURI(e.name+".fo");
-				 var String fullUri = workspacePath+uri.path.substring(10,uri.path.length);
-				System.out.println(workspacePath+uri.path.substring(10,uri.path.length));
+			if (e.bnfEntry.size != 0) {
+				fsa.generateFile(e.name + ".fo", e.compile)
+
+				//generate pdf
+				var uri = (fsa as IFileSystemAccessExtension2).getURI(e.name + ".fo");
+				var String fullUri = workspacePath + uri.path.substring(10, uri.path.length);
+				System.out.println(workspacePath + uri.path.substring(10, uri.path.length));
 				var File file = new File(fullUri);
-				System.out.println(file.exists);
-//				 System.out.println(uri.toString());
-				 
-				 
-//				 System.out.println(file.exists);
-				
-//				 foToPdf.createPdfFromFo(file,aPath.substring(0,aPath.length-3));
+				System.out.println(file.exists+ "," + fullUri.substring(0, fullUri.length - 3));
+
+				if (file.exists) {
+					foToPdf.createPdfFromFo(fullUri.substring(0, fullUri.length - 3));
+				}
 			}
 		}
@@ -54,14 +54,13 @@
 
 	// compile the different entities of the Bnf-----------------------------------------------------------------------------
-	def compile(EtsiBnf bnf) 
-	'''
+	def compile(EtsiBnf bnf) '''
 	<?xml version="1.0"?>
 	<!-- fop «bnf.name».xml -rtf «bnf.name».rtf -->
 	<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
-
+	
 		<fo:layout-master-set>
-	  		<fo:simple-page-master master-name="A4" page-width="210mm" page-height="297mm">
-	    		<fo:region-body region-name="xsl-region-body"  margin="2cm"/>
-	     	</fo:simple-page-master>
+		 		<fo:simple-page-master master-name="A4" page-width="210mm" page-height="297mm">
+		 				<fo:region-body region-name="xsl-region-body"  margin="2cm"/>
+		 				</fo:simple-page-master>
 		</fo:layout-master-set>
 	
@@ -69,7 +68,8 @@
 			<fo:flow flow-name="xsl-region-body" font-family="verdana">
 				
-				<fo:block span="all"  text-align="center" text-indent="1em" font-family="Arial" font-size="20pt" font-weight="bold" background-color="#EEEEEE" line-height="20mm">«bnf.name»</fo:block>
+				<fo:block span="all"  text-align="center" text-indent="1em" font-family="Arial" font-size="20pt" font-weight="bold" background-color="#EEEEEE" line-height="20mm">«bnf.
+		name»</fo:block>
 						
-				«FOR bnfentry:bnf.bnfEntry»
+				«FOR bnfentry : bnf.bnfEntry»
 					«bnfentry.compile»
 				«ENDFOR»
@@ -77,32 +77,38 @@
 		</fo:page-sequence>
 	</fo:root>'''
-	
-	def compile(BnfEntry bnfEntry)'''
-		«IF bnfEntry.rule!= null»
-				«bnfEntry.rule.compile»
+
+	def compile(BnfEntry bnfEntry) '''
+		«IF bnfEntry.rule != null»
+			«bnfEntry.rule.compile»
 		«ENDIF»
 	'''
-	
-	def compile(Rule rule)'''<fo:block><fo:inline id="«rule.name»"	color="purple">«IF rule.rulenumber!=0»«rule.rulenumber».	«ENDIF»«rule.name»</fo:inline>	::=	«rule.definitionList.compile»</fo:block>'''
-	
-	def compile(DefinitionList dList)'''«FOR sDef:dList.singleDefinition»«sDef.compile»«IF !sDef.equals(dList.singleDefinition.last)» | «ENDIF»«ENDFOR»'''
-	
-	def compile(SingleDefinition sDefinition)'''«FOR term:sDefinition.terms»«term.compile»«ENDFOR»'''
-	
-	def compile(Term term)'''«IF term.termAtom!=null»«term.termAtom.compile»«ENDIF»«IF term.termOptionalSequence!=null»«term.termOptionalSequence.compile»«ENDIF»«IF term.termRepeatedSequence!=null»«term.termRepeatedSequence.compile»«ENDIF»«IF term.termGroupedSequence!=null»«term.termGroupedSequence.compile»«ENDIF»'''
-	
-	def compile(GroupedSequence gSequ)'''«FOR d :gSequ.definitionList»«d.compile»«ENDFOR»'''
 
-	def compile(RepeatedSequence rSequ)'''{«FOR d:rSequ.definitions»«d.compile»«ENDFOR»}«IF rSequ.morethanonce»+«ENDIF»'''
-	
-	def compile(OptionalSequence oSequ)'''(«FOR d:oSequ.definitionList»«d.compile»«ENDFOR»)'''
-	
-	def compile(Atom atom)'''
-	«IF atom.atomRuleReference!= null»«atom.atomRuleReference.compile»«ENDIF»«IF atom.atomStringRule!= null»«atom.atomStringRule.compile»«ENDIF»'''
-	
-	def compile(RuleReference rRef)'''<fo:basic-link internal-destination="«rRef.ruleref.name»" text-decoration="underline" color="blue">«rRef.ruleref.name»</fo:basic-link>	'''
-	
-	def compile(StringRule sRule)'''«IF sRule.colon!=null»«sRule.colon»«ENDIF»«IF sRule.literal!=null»«sRule.literal»	«ENDIF»'''
-	
-	
+	def compile(Rule rule) '''<fo:block><fo:inline id="«rule.name»"	color="purple">«IF rule.rulenumber != 0»«rule.
+		rulenumber».	«ENDIF»«rule.name»</fo:inline>	::=	«rule.definitionList.compile»</fo:block>'''
+
+	def compile(DefinitionList dList) '''«FOR sDef : dList.singleDefinition»«sDef.compile»«IF !sDef.equals(
+		dList.singleDefinition.last)» | «ENDIF»«ENDFOR»'''
+
+	def compile(SingleDefinition sDefinition) '''«FOR term : sDefinition.terms»«term.compile»«ENDFOR»'''
+
+	def compile(Term term) '''«IF term.termAtom != null»«term.termAtom.compile»«ENDIF»«IF term.termOptionalSequence !=
+		null»«term.termOptionalSequence.compile»«ENDIF»«IF term.termRepeatedSequence != null»«term.termRepeatedSequence.
+		compile»«ENDIF»«IF term.termGroupedSequence != null»«term.termGroupedSequence.compile»«ENDIF»'''
+
+	def compile(GroupedSequence gSequ) '''«FOR d : gSequ.definitionList»«d.compile»«ENDFOR»'''
+
+	def compile(RepeatedSequence rSequ) '''{«FOR d : rSequ.definitions»«d.compile»«ENDFOR»}«IF rSequ.morethanonce»+«ENDIF»'''
+
+	def compile(OptionalSequence oSequ) '''(«FOR d : oSequ.definitionList»«d.compile»«ENDFOR»)'''
+
+	def compile(Atom atom) '''
+	«IF atom.atomRuleReference != null»«atom.atomRuleReference.compile»«ENDIF»«IF atom.atomStringRule != null»«atom.
+		atomStringRule.compile»«ENDIF»'''
+
+	def compile(RuleReference rRef) '''<fo:basic-link internal-destination="«rRef.ruleref.name»" text-decoration="underline" color="blue">«rRef.
+		ruleref.name»</fo:basic-link>	'''
+
+	def compile(StringRule sRule) '''«IF sRule.colon != null»«sRule.colon»«ENDIF»«IF sRule.literal != null»«sRule.
+		literal»	«ENDIF»'''
+
 }
Index: v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/generator/foToPdf.java
===================================================================
--- v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/generator/foToPdf.java	(revision 70)
+++ v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/generator/foToPdf.java	(revision 72)
@@ -15,16 +15,15 @@
 import javax.xml.transform.stream.StreamSource;
 
+
+
 import org.apache.fop.apps.FOPException;
+import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
-import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.MimeConstants;
+
 
 public class foToPdf {
 
-	public static void main(String args[]) throws IOException, FOPException,
-			TransformerException {
 
-		createfoFromPdf("test1","test1");
-	}
 	
 	public static void createPdfFromFo(String fileName) throws IOException, FOPException,
Index: v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/validation/EbnfValidator.xtend
===================================================================
--- v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/validation/EbnfValidator.xtend	(revision 70)
+++ v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/validation/EbnfValidator.xtend	(revision 72)
@@ -14,5 +14,4 @@
 import de.ugoe.cs.swe.bnftools.ebnf.DefinitionList
 import de.ugoe.cs.swe.bnftools.ebnf.SingleDefinition
-import java.util.ArrayList
 import com.google.inject.Inject
 import org.eclipse.xtext.resource.IResourceDescriptions
