Last change
on this file was
68,
checked in by hkaulbersch, 11 years ago
|
1.)Changed the outline
2.)Added a PopupButton? for codegeneration(not running yet)
|
-
Property svn:mime-type set to
text/plain
|
File size:
871 bytes
|
Line | |
---|
1 | package app; |
---|
2 | |
---|
3 | import java.io.File; |
---|
4 | |
---|
5 | import org.eclipse.emf.ecore.resource.Resource; |
---|
6 | |
---|
7 | import resource.tools.xtools.EbnfResourceTool; |
---|
8 | |
---|
9 | |
---|
10 | public class Translator { |
---|
11 | public Translator(){ |
---|
12 | super(); |
---|
13 | } |
---|
14 | |
---|
15 | public static void main(String[] args) { |
---|
16 | if (args.length != 1) { |
---|
17 | System.out.println("Usage: Translator <FILE>"); |
---|
18 | // return; |
---|
19 | } |
---|
20 | |
---|
21 | Translator app = new Translator(); |
---|
22 | System.out.println(args[0]); |
---|
23 | String path = "C:\\Users\\hauke\\test.bnf"; |
---|
24 | app.process(path,"bnf"); |
---|
25 | } |
---|
26 | |
---|
27 | public void process(String filename, String extension) { |
---|
28 | System.out.println("Processing: " + filename); |
---|
29 | if (!filename.endsWith(extension)) { |
---|
30 | System.out.println("Selected file is not supported!"); |
---|
31 | return; |
---|
32 | } |
---|
33 | switch (extension) { |
---|
34 | case "bnf": |
---|
35 | EbnfResourceTool tool = new EbnfResourceTool(); |
---|
36 | tool.processFile(new File(filename)); |
---|
37 | break; |
---|
38 | default: |
---|
39 | break; |
---|
40 | } |
---|
41 | } |
---|
42 | |
---|
43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.