Index: /v2/trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/plugin.xml
===================================================================
--- /v2/trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/plugin.xml	(revision 68)
+++ /v2/trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/plugin.xml	(revision 69)
@@ -248,5 +248,5 @@
 	</extension>
 
-<!--
+<!---->
    <extension
          point="org.eclipse.xtext.builder.participant">
@@ -255,11 +255,11 @@
       </participant>
    </extension>
-   -->
-   
-   <!--this is for using a button for generation-->
+   
+   
+   <!--this is for using a button for generation
    <extension
         point="org.eclipse.ui.handlers">
      <handler
-           class="de.ugoe.cs.swe.bnftools.ui.EbnfExecutableExtensionFactory:de.ugoe.cs.swe.bnftools.ui.helper.GenerationHandler"
+           class="de.ugoe.cs.swe.bnftools.ui.EBnfExecutableExtensionFactory:de.ugoe.cs.swe.bnftools.ui.helper.GenerationHandler"
            commandId="de.ugoe.cs.swe.bnftools.ui.handler.GenerationCommand">
      </handler>
@@ -291,5 +291,5 @@
     </menuContribution>
     </extension>
- <!---->
+ -->
    
    
Index: /v2/trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/handler/GenerationHandler.java
===================================================================
--- /v2/trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/handler/GenerationHandler.java	(revision 68)
+++ /v2/trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/handler/GenerationHandler.java	(revision 69)
@@ -66,4 +66,5 @@
                 generator.doGenerate(r, fsa);
                  
+                
             }
         }
Index: /v2/trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/quickfix/EbnfQuickfixProvider.xtend
===================================================================
--- /v2/trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/quickfix/EbnfQuickfixProvider.xtend	(revision 68)
+++ /v2/trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/quickfix/EbnfQuickfixProvider.xtend	(revision 69)
@@ -42,58 +42,59 @@
 	//*****************************************************************************************
 	//works but only in one file
-		@Fix(EbnfValidator.ruleReferencedOneDescription)
-		def void fixInlineRuleReferencedOnce(Issue issue, IssueResolutionAcceptor acceptor) {
-			acceptor.accept(
-				issue,
-				"Inline the rule",
-				"Delete the rule and replace its single reference by the rule's right side",
-				"upcase.png"
-			) [ element, context |
-				var Rule rule = element as Rule;
-				var IXtextDocument xtextDocument = context.getXtextDocument();
-				var ICompositeNode node = NodeModelUtils.findActualNodeFor(rule);
-				var String nodeText = node.text;
-				var int textLength = nodeText.length - 2;
-				var int offset = node.textRegion.offset;
-				//rename references
-				var ICompositeNode dList = NodeModelUtils.findActualNodeFor(rule.definitionList);
-				var String refText = "(" + dList.text + ")";
-				var int refLength = rule.name.length;
-				var List<RuleReference> references = EbnfAnalysisUtils.findReferences(rule);
-				//*********************************
-				//is the reference in the rule itself?
-				var boolean foundRule = false;
-				var EObject r = references.get(0) as EObject;
-				var Rule containingRule = null;
-				while (!foundRule) {
-					r = r.eContainer;
-					if (r instanceof Rule) {
-						containingRule = r as Rule;
-						foundRule = true;
-					}
-				}
-				if (!rule.equals(containingRule)) {
-	
-									for (ruleRef : references) {
-										var ICompositeNode refNode = NodeModelUtils.findActualNodeFor(ruleRef);
-										var int refOffset = refNode.textRegion.offset;
-					
-										xtextDocument.replace(refOffset, refLength, refText);
-										if (refOffset < offset) {
-											offset += refText.length - refLength;
-										}
-									}
-									
-				// delete rule
-				}
-				
-				xtextDocument.replace(offset, textLength, "");
-			]
-	
-		}
+//		@Fix(EbnfValidator.ruleReferencedOneDescription)
+//		def void fixInlineRuleReferencedOnce(Issue issue, IssueResolutionAcceptor acceptor) {
+//			acceptor.accept(
+//				issue,
+//				"Inline the rule",
+//				"Delete the rule and replace its single reference by the rule's right side",
+//				"upcase.png"
+//			) [ element, context |
+//				var Rule rule = element as Rule;
+//				var IXtextDocument xtextDocument = context.getXtextDocument();
+//				var ICompositeNode node = NodeModelUtils.findActualNodeFor(rule);
+//				var String nodeText = node.text;
+//				var int textLength = nodeText.length - 2;
+//				var int offset = node.textRegion.offset;
+//				//rename references
+//				var ICompositeNode dList = NodeModelUtils.findActualNodeFor(rule.definitionList);
+//				var String refText = "(" + dList.text + ")";
+//				var int refLength = rule.name.length;
+//				var List<RuleReference> references = EbnfAnalysisUtils.findReferences(rule);
+//				//*********************************
+//				//is the reference in the rule itself?
+//				var boolean foundRule = false;
+//				var EObject r = references.get(0) as EObject;
+//				var Rule containingRule = null;
+//				while (!foundRule) {
+//					r = r.eContainer;
+//					if (r instanceof Rule) {
+//						containingRule = r as Rule;
+//						foundRule = true;
+//					}
+//				}
+//				if (!rule.equals(containingRule)) {
+//	
+//									for (ruleRef : references) {
+//										var ICompositeNode refNode = NodeModelUtils.findActualNodeFor(ruleRef);
+//										var int refOffset = refNode.textRegion.offset;
+//					
+//										xtextDocument.replace(refOffset, refLength, refText);
+//										if (refOffset < offset) {
+//											offset += refText.length - refLength;
+//										}
+//									}
+//									
+//				// delete rule
+//				}
+//				
+//				xtextDocument.replace(offset, textLength, "");
+//			]
+//	
+//		}
 	
 //	// this is not working by unknown reasons 
 //	@Fix(EbnfValidator.ruleReferencedOneDescription)
 //	def void fixInlineRuleReferencedOnce(Issue issue, IssueResolutionAcceptor acceptor) {
+//		System.out.println("test");
 //		acceptor.accept(
 //			issue,
@@ -105,9 +106,13 @@
 //			var DefinitionList dlist = rule.definitionList;
 //			var List<Rule> rules=EbnfAnalysisUtils.getAllRules(rule.eContainer().eContainer() as EtsiBnf);
-//			var SingleDefinition sDef = rules.get(1).definitionList.singleDefinition.get(1);
+//			var SingleDefinition sDef = rules.get(0).definitionList.singleDefinition.get(0);
+//			
+//			System.out.println(dlist.singleDefinition);
 //			dlist.singleDefinition.add(sDef);
+//			System.out.println(dlist.singleDefinition);
+//			
 //			rule.name="bla";
-//		]
-//
+//			]
+
 //	}
 
Index: /v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/.classpath
===================================================================
--- /v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/.classpath	(revision 68)
+++ /v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/.classpath	(revision 69)
@@ -6,4 +6,15 @@
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="lib" path="C:/Users/hauke/Desktop/Uni/Hiwijob bnf tools/fop-1.1/lib/avalon-framework-4.2.0.jar"/>
+	<classpathentry kind="lib" path="C:/Users/hauke/Desktop/Uni/Hiwijob bnf tools/fop-1.1/lib/batik-all-1.7.jar"/>
+	<classpathentry kind="lib" path="C:/Users/hauke/Desktop/Uni/Hiwijob bnf tools/fop-1.1/lib/commons-io-1.3.1.jar"/>
+	<classpathentry kind="lib" path="C:/Users/hauke/Desktop/Uni/Hiwijob bnf tools/fop-1.1/lib/commons-logging-1.0.4.jar"/>
+	<classpathentry kind="lib" path="C:/Users/hauke/Desktop/Uni/Hiwijob bnf tools/fop-1.1/lib/serializer-2.7.0.jar"/>
+	<classpathentry kind="lib" path="C:/Users/hauke/Desktop/Uni/Hiwijob bnf tools/fop-1.1/lib/xalan-2.7.0.jar"/>
+	<classpathentry kind="lib" path="C:/Users/hauke/Desktop/Uni/Hiwijob bnf tools/fop-1.1/lib/xercesImpl-2.7.1.jar"/>
+	<classpathentry kind="lib" path="C:/Users/hauke/Desktop/Uni/Hiwijob bnf tools/fop-1.1/lib/xml-apis-1.3.04.jar"/>
+	<classpathentry kind="lib" path="C:/Users/hauke/Desktop/Uni/Hiwijob bnf tools/fop-1.1/lib/xml-apis-ext-1.3.04.jar"/>
+	<classpathentry kind="lib" path="C:/Users/hauke/Desktop/Uni/Hiwijob bnf tools/fop-1.1/lib/xmlgraphics-commons-1.5.jar"/>
+	<classpathentry kind="lib" path="C:/Users/hauke/Desktop/Uni/Hiwijob bnf tools/fop-1.1/build/fop.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
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 68)
+++ /v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/generator/EbnfGenerator.xtend	(revision 69)
@@ -20,4 +20,6 @@
 import de.ugoe.cs.swe.bnftools.ebnf.StringRule
 import java.io.File
+import org.eclipse.xtext.generator.IFileSystemAccessExtension2
+import org.eclipse.emf.common.util.URI;
 
 /**
@@ -32,4 +34,18 @@
 			if (e.bnfEntry.size!=0) {
 				 fsa.generateFile(e.name + ".fo", e.compile)
+				 
+				 //generate pdf
+//				 var uri = (fsa as IFileSystemAccessExtension2).getURI(e.name+".fo");
+//				 (fsa as IFileSystemAccessExtension2).
+//				
+//				 System.out.println(uri.hasAbsolutePath());
+//				 System.out.println(uri.path.substring(0,uri.path.length-3));
+//				 System.out.println(uri.file);
+//				 System.out.println(uri.toString());
+//				 var File file = new File(uri.path).absoluteFile;
+//				 System.out.println(file.exists);
+//				 var String aPath = file.absolutePath;
+//				 
+//				 foToPdf.createPdfFromFo(file,aPath.substring(0,aPath.length-3));
 			}
 		}
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 69)
+++ /v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/generator/foToPdf.java	(revision 69)
@@ -0,0 +1,100 @@
+package de.ugoe.cs.swe.bnftools.generator;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.fop.apps.FOPException;
+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,
+	TransformerException{
+
+		createfoFromPdf(fileName,fileName);
+	}
+	
+	private static void createfoFromPdf(String foFileName, String pdfFileName)throws IOException, FOPException,
+	TransformerException{
+		File file = new File(foFileName+".fo");
+		// Step 1: Construct a FopFactory
+		FopFactory fopFactory = FopFactory.newInstance();
+
+		// Step 2: Set up output stream.
+		OutputStream out = new BufferedOutputStream(new FileOutputStream(new File(pdfFileName+".pdf")));
+
+		try {
+			// Step 3: Construct fop with desired output format
+			Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, out);
+
+			// Step 4: Setup JAXP using identity transformer
+			TransformerFactory factory = TransformerFactory.newInstance();
+			Transformer transformer = factory.newTransformer();
+
+			// Step 5: Setup input and output for XSLT transformation
+			Source src = new StreamSource(file);
+
+			// Resulting SAX events (the generated FO) must be piped through to FOP		
+			Result res = new SAXResult(fop.getDefaultHandler());
+
+			// Step 6: Start XSLT transformation and FOP processing
+			transformer.transform(src, res);
+		} finally {
+			out.close();
+		}
+	}
+	
+	public static void createPdfFromFo(File file,String fileName) throws IOException, FOPException,
+	TransformerException{
+
+		createfoFromPdf(file,"mytest");
+	}
+	
+	private static void createfoFromPdf(File file, String pdfFileName)throws IOException, FOPException,
+	TransformerException{
+		// Step 1: Construct a FopFactory
+		FopFactory fopFactory = FopFactory.newInstance();
+
+		// Step 2: Set up output stream.
+		OutputStream out = new BufferedOutputStream(new FileOutputStream(new File(pdfFileName+".pdf")));
+
+		try {
+			// Step 3: Construct fop with desired output format
+			Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, out);
+
+			// Step 4: Setup JAXP using identity transformer
+			TransformerFactory factory = TransformerFactory.newInstance();
+			Transformer transformer = factory.newTransformer();
+
+			// Step 5: Setup input and output for XSLT transformation
+			Source src = new StreamSource(file);
+
+			// Resulting SAX events (the generated FO) must be piped through to FOP		
+			Result res = new SAXResult(fop.getDefaultHandler());
+
+			// Step 6: Start XSLT transformation and FOP processing
+			transformer.transform(src, res);
+		} finally {
+			out.close();
+		}
+	}
+}
