Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: c09af98be4617827ca12e70efd4cef537a463f28 (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
/*******************************************************************************
 * Copyright (c) 2010, 2013 Willink Transformations and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v2.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v20.html
 *
 * Contributors:
 *     E.D.Willink - initial API and implementation
 * 
 * Run As->MWE2 Workflow to regenerate the Xtext CG models.
 *******************************************************************************/
module GenerateCGModels

import org.eclipse.ocl.examples.build.modelspecs.*
import org.eclipse.ocl.examples.build.utilities.*
import org.eclipse.ocl.examples.build.xtend.*
import org.eclipse.emf.mwe.utils.*
import org.eclipse.emf.ecore.resource.impl.*

/**
 *	Generate the Models and Visitors for the Code Generator.
 */
Workflow {
	bean = ResourceSetImpl : resourceSet {}
    bean = StandaloneSetup { resourceSet = resourceSet
    	platformUri = ".."
    	scanClassPath = true
    }
    bean = EcoreGenModelSetup { resourceSet = resourceSet }
	bean = CGElementModelSpec.Register {}
	bean = CGTypedElementModelSpec.Register {}
	bean = CGValuedElementModelSpec.Register {}
	
	component = GenerateModel { resourceSet = resourceSet skipOnErrors = true
		genModel = "/org.eclipse.ocl.examples.codegen/model/cgmodel.genmodel"
		clearResourceSet = false
	}
	
    component = GenerateCGVisitors { resourceSet = resourceSet
    	projectName = "org.eclipse.ocl.examples.codegen"
    	genModelFile = "model/cgmodel.genmodel"
    }
	component = ConvertToUnixLineEndings {
		directory = "org.eclipse.ocl.examples.codegen/emf-gen"
	}
}

Back to the top