Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: e75c4d7bc5e55a677a3c880c8c6653974e720a3f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?xml version="1.0"?>
<!--
	Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
	All rights reserved. This program and the accompanying materials
	are made available under the terms of the Eclipse Public License v1.0
	which accompanies this distribution, and is available at
	http://www.eclipse.org/legal/epl-v10.html

	Contributors:
	  Martin Fluegge - initial API and implementation
-->

<workflow>

	<!--<property name="model" value="file:/D:/Development/CDO/org.eclipse.emf.cdo.dawn.reference.editor/model/classdiagram.gmfgen" />-->
	<property name="model" value="file:/D:/Development/INSTANCES/Dawn_Instance1/Dawn/model/classdiagram.dawngenmodel" />  
	
	<property name="src-gen" value="d:/temp/source" />
	<!--<property name="src-gen" /> --> <!--just declare it to make it accessable -->
	
	<!-- set up EMF for standalone execution -->
    <bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" >
		<platformUri value=".."/>
	</bean>

	<!-- load model and store it in slot 'model' -->
	<component class="org.eclipse.emf.mwe.utils.Reader">
		<uri value="${model}" />
		<modelSlot value="model" />
	</component>
	
	

	<!-- check model -->
	<!--loads different metamodels-->
	<component class="org.eclipse.xtend.check.CheckComponent">  
		<metaModel id="ecore" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
			<metaModelPackage value="org.eclipse.emf.ecore.EcorePackage"/>
		</metaModel>
		
		<metaModel id="genmodel" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
			<metaModelPackage value="org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage"/>
		</metaModel>
		
		<metaModel id="dawngenmodel" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
			<metaModelPackage value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.DawngenmodelPackage"/>
		</metaModel>
		
		<metaModel id="mmGGr" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
			<metaModelPackage value="org.eclipse.gmf.gmfgraph.GMFGraphPackage"/>
		</metaModel>
	
		<metaModel id="mmGGen" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
			<metaModelPackage value="org.eclipse.gmf.codegen.gmfgen.GMFGenPackage"/>
		</metaModel>
		<checkFile value="metamodel::Checks" />
		<emfAllChildrenSlot value="model" />
	</component>

	<!--  generate code for the meta specified templates -->
	<component class="org.eclipse.xpand2.Generator">
	
		<metaModel id="ecore" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
			<metaModelPackage value="org.eclipse.emf.ecore.EcorePackage"/>
		</metaModel>
		
		<metaModel id="genmodel" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
			<metaModelPackage value="org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage"/>
		</metaModel>
		
		<metaModel id="dawngenmodel" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
			<metaModelPackage value="org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.DawngenmodelPackage"/>
		</metaModel>
	
		<metaModel id="mmGGr" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
			<metaModelPackage value="org.eclipse.gmf.gmfgraph.GMFGraphPackage"/>
		</metaModel>
		
		<metaModel id="mmGGen" class="org.eclipse.xtend.typesystem.emf.EmfMetaModel">
			<metaModelPackage value="org.eclipse.gmf.codegen.gmfgen.GMFGenPackage"/>
		</metaModel>
		
		<expand	value="template::GMFFragmentTemplate::main FOR model" />
		<outlet path="${src-gen}" >
			<postprocessor class="org.eclipse.xpand2.output.JavaBeautifier" />
		</outlet>
		
		<!--<prSrcPaths value="${src-gen}"/>
		<prExcludes value=", *.xml, *.hbm"/>-->
	</component>
</workflow>

Back to the top