1 | module workflow.GoldGenerator |
---|
2 | |
---|
3 | import org.eclipse.emf.mwe.utils.* |
---|
4 | |
---|
5 | var modelPath = "src/model" |
---|
6 | var targetDir = "src-gen" |
---|
7 | var fileEncoding = "Cp1252" |
---|
8 | |
---|
9 | Workflow { |
---|
10 | |
---|
11 | component = org.eclipse.xtext.mwe.Reader { |
---|
12 | // lookup all resources on the classpath |
---|
13 | // useJavaClassPath = true |
---|
14 | |
---|
15 | // or define search scope explicitly |
---|
16 | path = modelPath |
---|
17 | uriFilter = org.eclipse.xtext.mwe.NameBasedFilter { |
---|
18 | // regularExpression="repeatedRuleTest1.*" |
---|
19 | // regularExpression="repeatedRuleTest2.*" |
---|
20 | // regularExpression="groupRuleTest.*" |
---|
21 | regularExpression="optional.*" |
---|
22 | // regularExpression="ttcn3-4.2.1-draft.*" |
---|
23 | } |
---|
24 | |
---|
25 | // this class will be generated by the xtext generator |
---|
26 | register = de.ugoe.cs.swe.bnftools.EbnfStandaloneSetup {} |
---|
27 | load = { |
---|
28 | slot = "model" |
---|
29 | type = "EtsiBnf" |
---|
30 | } |
---|
31 | } |
---|
32 | |
---|
33 | component = org.eclipse.xtend.XtendComponent { |
---|
34 | metaModel = org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel {} |
---|
35 | invoke = "extensions::SimpleBnf::transform(model)" |
---|
36 | outputSlot = "simplebnfmodel" |
---|
37 | } |
---|
38 | |
---|
39 | component = Writer { |
---|
40 | // useSingleGlobalResourceSet = true |
---|
41 | // cloneSlotContents = true |
---|
42 | modelSlot = "simplebnfmodel" |
---|
43 | uri = "src-gen/newModel.xmi" |
---|
44 | } |
---|
45 | |
---|
46 | component = org.eclipse.xpand2.Generator { |
---|
47 | metaModel = org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel {} |
---|
48 | |
---|
49 | expand = "templates::Gold::Root FOREACH simplebnfmodel" |
---|
50 | outlet = { |
---|
51 | // name = "ruleasd" |
---|
52 | // append = true |
---|
53 | path = targetDir |
---|
54 | } |
---|
55 | fileEncoding = fileEncoding |
---|
56 | } |
---|
57 | |
---|
58 | } |
---|