diff options
Diffstat (limited to 'language/src/main/java/org/eclipse/viatra/solver/language/generator/ProblemGenerator.java')
-rw-r--r-- | language/src/main/java/org/eclipse/viatra/solver/language/generator/ProblemGenerator.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/language/src/main/java/org/eclipse/viatra/solver/language/generator/ProblemGenerator.java b/language/src/main/java/org/eclipse/viatra/solver/language/generator/ProblemGenerator.java new file mode 100644 index 00000000..b6ea3553 --- /dev/null +++ b/language/src/main/java/org/eclipse/viatra/solver/language/generator/ProblemGenerator.java | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.26.0.M1 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.generator; | ||
5 | |||
6 | import org.eclipse.emf.ecore.resource.Resource; | ||
7 | import org.eclipse.xtext.generator.AbstractGenerator; | ||
8 | import org.eclipse.xtext.generator.IFileSystemAccess2; | ||
9 | import org.eclipse.xtext.generator.IGeneratorContext; | ||
10 | |||
11 | /** | ||
12 | * Generates code from your model files on save. | ||
13 | * | ||
14 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation | ||
15 | */ | ||
16 | public class ProblemGenerator extends AbstractGenerator { | ||
17 | |||
18 | @Override | ||
19 | public void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) { | ||
20 | // Iterator<Greeting> filtered = Iterators.filter(resource.getAllContents(), Greeting.class); | ||
21 | // Iterator<String> names = Iterators.transform(filtered, new Function<Greeting, String>() { | ||
22 | // | ||
23 | // @Override | ||
24 | // public String apply(Greeting greeting) { | ||
25 | // return greeting.getName(); | ||
26 | // } | ||
27 | // }); | ||
28 | // fsa.generateFile("greetings.txt", "People to greet: " + IteratorExtensions.join(names, ", ")); | ||
29 | } | ||
30 | } | ||