Ignore:
Timestamp:
05/26/14 11:48:28 (10 years ago)
Author:
hkaulbersch
Message:

added the functions to generate a .pdf from .fo.
Still Not accessible.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/generator/EbnfGenerator.xtend

    r65 r69  
    2020import de.ugoe.cs.swe.bnftools.ebnf.StringRule 
    2121import java.io.File 
     22import org.eclipse.xtext.generator.IFileSystemAccessExtension2 
     23import org.eclipse.emf.common.util.URI; 
    2224 
    2325/** 
     
    3234                        if (e.bnfEntry.size!=0) { 
    3335                                 fsa.generateFile(e.name + ".fo", e.compile) 
     36                                  
     37                                 //generate pdf 
     38//                               var uri = (fsa as IFileSystemAccessExtension2).getURI(e.name+".fo"); 
     39//                               (fsa as IFileSystemAccessExtension2). 
     40//                               
     41//                               System.out.println(uri.hasAbsolutePath()); 
     42//                               System.out.println(uri.path.substring(0,uri.path.length-3)); 
     43//                               System.out.println(uri.file); 
     44//                               System.out.println(uri.toString()); 
     45//                               var File file = new File(uri.path).absoluteFile; 
     46//                               System.out.println(file.exists); 
     47//                               var String aPath = file.absolutePath; 
     48//                                
     49//                               foToPdf.createPdfFromFo(file,aPath.substring(0,aPath.length-3)); 
    3450                        } 
    3551                } 
Note: See TracChangeset for help on using the changeset viewer.