1+ module org.svis.generator.run.plant
2+
3+ var projectName = "org.svis.generator.run"
4+ var outputPath = "./output/plant/famix"
5+ //var runtimeProject = "../${projectName}"
6+ var texturSourcePath = "org.svis.generator/src/org/svis/generator/plant/m2t/textures"
7+ var texturDestinyPath = "org.svis.generator.run/output/plant/famix/pics"
8+ var configPath = "./input/famix/plantConfig.json"
9+
10+ Workflow {
11+
12+ bean = org.eclipse.emf.mwe.utils.StandaloneSetup {
13+ // platformUri = "${runtimeProject}/.."
14+ platformUri = "../org.svis.generator.run/.."
15+ registerGeneratedEPackage = "org.svis.xtext.famix.FamixPackage"
16+ }
17+
18+ // support lazy loading of textual models
19+ component = org.svis.generator.ResolveLazyComponent {}
20+
21+ // delete unnecessary objects
22+ component = org.svis.generator.famix.JQA2Famix {
23+ modelSlot = "famix"
24+ // config = configPath
25+ }
26+
27+ // transform famix into disks (s2m)
28+ component = org.svis.generator.plant.s2m.Famix2Plant {
29+ modelSlot = "famix"
30+ config = configPath
31+ }
32+
33+ // write metaData
34+ component = org.eclipse.xtext.generator.GeneratorComponent {
35+ register = org.svis.generator.famix.Famix2JSONStandaloneSetup {}
36+ slot = 'metadata'
37+ outlet = {
38+ path = "${outputPath}"
39+ }
40+ }
41+
42+ // write out resulting model
43+ component = org.eclipse.emf.mwe.utils.Writer {
44+ modelSlot = "plantwriter"
45+ uri = "${outputPath}/plant.xml"
46+ }
47+
48+ // calculate layout (m2m)
49+ component = org.svis.generator.plant.m2m.Plant2Plant {
50+ modelSlot = "plant"
51+ config = configPath
52+ }
53+
54+ component = org.eclipse.emf.mwe.utils.Writer {
55+ modelSlot = "plantextendedwriter"
56+ uri = "${outputPath}/plantextended.xml"
57+ cloneSlotContents = true
58+ }
59+
60+ // model2X3D (m2t)
61+ component = org.eclipse.xtext.generator.GeneratorComponent {
62+ register = org.svis.generator.plant.m2t.Plant2X3DStandaloneSetup {}
63+ slot = 'plantextended'
64+ outlet = {
65+ path = "${outputPath}"
66+ }
67+ }
68+ // copy textures: -----------------------------------------------------------
69+ // ToDo: copy just used textures.
70+ // ToDo: read all files automatically
71+ // copy textures in output path:
72+ component = org.svis.generator.plant.m2t.FileManager{
73+ trash = projectName
74+ source = "${texturSourcePath}/bloom.png"
75+ destiny = "${texturDestinyPath}/bloom.png"
76+ }
77+ component = org.svis.generator.plant.m2t.FileManager{
78+ trash = projectName
79+ source = "${texturSourcePath}/grassTexture.png"
80+ destiny = "${texturDestinyPath}/grassTexture.png"
81+ }
82+ component = org.svis.generator.plant.m2t.FileManager{
83+ trash = projectName
84+ source = "${texturSourcePath}/lilacPetal.png"
85+ destiny = "${texturDestinyPath}/lilacPetal.png"
86+ }
87+ component = org.svis.generator.plant.m2t.FileManager{
88+ trash = projectName
89+ source = "${texturSourcePath}/plant.png"
90+ destiny = "${texturDestinyPath}/plant.png"
91+ }
92+ component = org.svis.generator.plant.m2t.FileManager{
93+ trash = projectName
94+ source = "${texturSourcePath}/pollball.png"
95+ destiny = "${texturDestinyPath}/pollball.png"
96+ }
97+ component = org.svis.generator.plant.m2t.FileManager{
98+ trash = projectName
99+ source = "${texturSourcePath}/ground.png"
100+ destiny = "${texturDestinyPath}/ground.png"
101+ }
102+ component = org.svis.generator.plant.m2t.FileManager{
103+ trash = projectName
104+ source = "${texturSourcePath}/freeGrass.png"
105+ destiny = "${texturDestinyPath}/freeGrass.png"
106+ }
107+ component = org.svis.generator.plant.m2t.FileManager{
108+ trash = projectName
109+ source = "${texturSourcePath}/freeGrass.png"
110+ destiny = "${texturDestinyPath}/freeGrass.png"
111+ }
112+ component = org.svis.generator.plant.m2t.FileManager{
113+ trash = projectName
114+ source = "${texturSourcePath}/whitePetal.png"
115+ destiny = "${texturDestinyPath}/whitePetal.png"
116+ }
117+ component = org.svis.generator.plant.m2t.FileManager{
118+ trash = projectName
119+ source = "${texturSourcePath}/redPetal.png"
120+ destiny = "${texturDestinyPath}/redPetal.png"
121+ }
122+ component = org.svis.generator.plant.m2t.FileManager{
123+ trash = projectName
124+ source = "${texturSourcePath}/bluePetal.png"
125+ destiny = "${texturDestinyPath}/bluePetal.png"
126+ }
127+ component = org.svis.generator.plant.m2t.FileManager{
128+ trash = projectName
129+ source = "${texturSourcePath}/plantHeadBrown.png"
130+ destiny = "${texturDestinyPath}/plantHeadBrown.png"
131+ }
132+ component = org.svis.generator.plant.m2t.FileManager{
133+ trash = projectName
134+ source = "${texturSourcePath}/junctionGreen.png"
135+ destiny = "${texturDestinyPath}/junctionGreen.png"
136+ }
137+ component = org.svis.generator.plant.m2t.FileManager{
138+ trash = projectName
139+ source = "${texturSourcePath}/junctionHeadTopPart.png"
140+ destiny = "${texturDestinyPath}/junctionHeadTopPart.png"
141+ }
142+ }
0 commit comments