| /******************************************************************************* |
| * 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 |
| * E.D.Willink (CEA LIST) - Bug 424034 |
| * |
| * Run As->MWE2 Workflow to regenerate the pivot model. |
| *******************************************************************************/ |
| module GenerateOCLstdlibModel |
| |
| import org.eclipse.ocl.examples.build.utilities.* |
| import org.eclipse.ocl.examples.build.xtend.* |
| import org.eclipse.emf.mwe.utils.* |
| import org.eclipse.emf.mwe.utils.* |
| import org.eclipse.emf.ecore.resource.impl.* |
| |
| var sourceName = "org.eclipse.ocl.pivot" |
| |
| /** |
| * Generate the OCLstdlib Model, by converting oclstdlib.oclstdlib to OCLstdlib.java. |
| */ |
| Workflow { |
| bean = ResourceSetImpl : resourceSet {} |
| bean = StandaloneSetup { resourceSet = resourceSet |
| platformUri = "../../plugins" |
| } |
| bean = EcoreGenModelSetup { resourceSet = resourceSet } |
| component = GenerateOCLstdlibXtend { resourceSet = resourceSet |
| projectName = "${sourceName}" |
| modelFile = "model/OCL-2.5.oclstdlib" |
| uri = "http://www.eclipse.org/ocl/2015/Library" |
| ecoreFile = "/org.eclipse.ocl.pivot/model-gen/oclstdlib.ecore" |
| javaFolder = "/org.eclipse.ocl.pivot/emf-gen" |
| javaPackageName = "org.eclipse.ocl.pivot.model" |
| javaClassName = "OCLstdlib" |
| libraryName = "oclstdlib" |
| libraryNsPrefix = "oclstdlib" |
| excludedEClassifierName = "Class" |
| excludedEClassifierName = "Enumeration" |
| excludedEClassifierName = "EnumerationLiteral" |
| excludedEClassifierName = "State" |
| excludedEClassifierName = "Type" |
| } |
| component = GenerateModel { resourceSet = resourceSet skipOnErrors = true clearResourceSet=false |
| genModel = "/${sourceName}/model/oclstdlib.genmodel" |
| } |
| component = Model2tablesGenerator { resourceSet = resourceSet |
| genModelFile = "/${sourceName}/model/oclstdlib.genmodel" |
| genOCLstdlib = true |
| } |
| component = ConvertToUnixLineEndings { |
| directory = "../../plugins/${sourceName}/emf-gen" |
| } |
| } |
| |