blob: 60a69743acb0da32b75cc393296fe336b1d03c27 [file] [log] [blame]
Ed Willink17785c52014-05-20 12:29:51 +01001/*******************************************************************************
Ed Willink52e3d062015-05-19 10:14:44 +01002 * Copyright (c) 2013 Willink Transformations and others.
Ed Willinkc27f84e2013-07-06 14:56:08 +01003 * All rights reserved. This program and the accompanying materials
Ed Willink2b4d8be2018-06-13 11:53:02 +01004 * are made available under the terms of the Eclipse Public License v2.0
Ed Willinkc27f84e2013-07-06 14:56:08 +01005 * which accompanies this distribution, and is available at
Ed Willink2b4d8be2018-06-13 11:53:02 +01006 * http://www.eclipse.org/legal/epl-v20.html
Ed Willinkc27f84e2013-07-06 14:56:08 +01007 *
8 * Contributors:
9 * E.D.Willink - initial API and implementation
Ed Willink17785c52014-05-20 12:29:51 +010010 *******************************************************************************/
Ed.Willinkf1ec73c2013-07-10 11:36:49 +010011module SubGenerateASModel
Ed Willinkc27f84e2013-07-06 14:56:08 +010012
13import org.eclipse.ocl.examples.build.utilities.GenerateModel
Ed.Willinkf1ec73c2013-07-10 11:36:49 +010014import org.eclipse.ocl.examples.build.xtend.GenerateASVisitors
Ed Willinkc27f84e2013-07-06 14:56:08 +010015import org.eclipse.emf.ecore.resource.ResourceSet
16
17/**
18 * A ResourceSet that may be shared by workflow components.
19 */
20var ResourceSet resourceSet
21
22/**
Ed Willink62842592014-12-05 13:07:26 +000023 * The name of the project hosting the generated models; e.g. "org.eclipse.ocl.xtext.essentialocl"
Ed Willinkc27f84e2013-07-06 14:56:08 +010024 */
25var projectName
26
27/**
Adolfo SBH8acd5692016-01-20 17:53:47 +000028 * The project-relative genmodel file; e.g. "model/MyModel.genmodel".
Ed Willinkc27f84e2013-07-06 14:56:08 +010029 */
Adolfo SBH8acd5692016-01-20 17:53:47 +000030var genModelFile
31
Ed Willinkc27f84e2013-07-06 14:56:08 +010032
33/**
Adolfo SBH8acd5692016-01-20 17:53:47 +000034 * (Optional) The name of the inherited project hosting the generated models; e.g. "org.eclipse.ocl.xtext.basecs", "" for a base visitor.
Ed Willinkc27f84e2013-07-06 14:56:08 +010035 */
Adolfo SBH8acd5692016-01-20 17:53:47 +000036var superProjectName = ""
Ed Willinkc27f84e2013-07-06 14:56:08 +010037
38/**
Adolfo SBH8acd5692016-01-20 17:53:47 +000039 * (Optional) The project-relative genmodel file of the inherited project; e.g. "model/MyModel.genmodel"; default: "".
Ed Willinkc27f84e2013-07-06 14:56:08 +010040 */
Adolfo SBH8acd5692016-01-20 17:53:47 +000041var superGenModelFile = ""
Ed Willinkc27f84e2013-07-06 14:56:08 +010042
43/**
Adolfo SBH8acd5692016-01-20 17:53:47 +000044 * (Optional) The name of the base project hosting the generated models; e.g. "org.eclipse.ocl.xtext.basecs", "" for a base visitor.
Ed Willinkc27f84e2013-07-06 14:56:08 +010045 */
Adolfo SBH8acd5692016-01-20 17:53:47 +000046var baseProjectName = ""
Ed Willinkc27f84e2013-07-06 14:56:08 +010047
48/**
Adolfo SBH8acd5692016-01-20 17:53:47 +000049 * (Optional) The project-relative genmodel file of the base project; e.g. "model/MyModel.genmodel"; default: "".
Ed Willinkc27f84e2013-07-06 14:56:08 +010050 */
Adolfo SBH8acd5692016-01-20 17:53:47 +000051var baseGenModelFile = ""
Ed Willinkc27f84e2013-07-06 14:56:08 +010052
53/**
54 * (Optional) The workspace-relative name of the gen model file; default: "/${projectName}/${genModelFile}"
55 */
56var genModel = "/${projectName}/${genModelFile}"
57
58/**
Ed.Willinkf1ec73c2013-07-10 11:36:49 +010059 * Generate an Abstract Syntax Model and its visitors as used by the evaluator.
Ed Willinkc27f84e2013-07-06 14:56:08 +010060 */
61Workflow {
62 component = GenerateModel { resourceSet = resourceSet skipOnErrors = true
Ed Willink28c8e762018-01-10 13:05:13 +000063 genModel = genModel clearResourceSet = false
Ed Willinkc27f84e2013-07-06 14:56:08 +010064 }
Ed.Willinkf1ec73c2013-07-10 11:36:49 +010065 component = GenerateASVisitors { resourceSet = resourceSet skipOnErrors = true
Ed Willinkc27f84e2013-07-06 14:56:08 +010066 projectName = projectName
67 genModelFile = genModelFile
Adolfo SBH8acd5692016-01-20 17:53:47 +000068 superProjectName = superProjectName
69 superGenModelFile = superGenModelFile
70 baseProjectName = baseProjectName
71 baseGenModelFile = baseGenModelFile
Ed Willinkc27f84e2013-07-06 14:56:08 +010072 }
73}