| /** |
| * <copyright> |
| * |
| * Copyright (c) 2012 E.D.Willink 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: |
| * E.D.Willink - initial API and implementation |
| * |
| * </copyright> |
| * |
| * Run As->MWE2 Workflow to regenerate the LPG files. |
| */ |
| module GenerateLPG |
| |
| import org.eclipse.ocl.examples.build.utilities.* |
| import org.eclipse.emf.mwe.utils.* |
| import org.eclipse.emf.mwe.utils.* |
| import org.eclipse.emf.ecore.resource.impl.* |
| import org.eclipse.m2m.internal.qvt.oml.runtime.ant.QvtoAntTransformationTask |
| |
| var projectName = "org.eclipse.ocl.examples.xtext2lpg" |
| var CompleteOCLxtext = "org.eclipse.ocl.examples.xtext.completeocl/src/org/eclipse/ocl/examples/xtext/completeocl/CompleteOCL.xtext" |
| var CompleteOCLxtextXBNF = "/${projectName}/generatedModels/CompleteOCL.xtext.XBNF" |
| var CompleteOCLnormalXBNF = "/${projectName}/generatedModels/CompleteOCL.normal.XBNF" |
| var CompleteOCLinlineXBNF = "/${projectName}/generatedModels/CompleteOCL.inline.XBNF" |
| var EssentialOCLxtext = "org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/EssentialOCL.xtext" |
| var EssentialOCLxtextXBNF = "/${projectName}/generatedModels/EssentialOCL.xtext.XBNF" |
| var EssentialOCLnormalXBNF = "/${projectName}/generatedModels/EssentialOCL.normal.XBNF" |
| var EssentialOCLinlineXBNF = "/${projectName}/generatedModels/EssentialOCL.inline.XBNF" |
| var OCLinEcorextext = "org.eclipse.ocl.examples.xtext.oclinecore/src/org/eclipse/ocl/examples/xtext/oclinecore/OCLinEcore.xtext" |
| var OCLinEcorextextXBNF = "/${projectName}/generatedModels/OCLinEcore.xtext.XBNF" |
| var OCLinEcorenormalXBNF = "/${projectName}/generatedModels/OCLinEcore.normal.XBNF" |
| var OCLinEcoreinlineXBNF = "/${projectName}/generatedModels/OCLinEcore.inline.XBNF" |
| var OCLstdlibxtext = "org.eclipse.ocl.examples.xtext.oclstdlib/src/org/eclipse/ocl/examples/xtext/oclstdlib/OCLstdlib.xtext" |
| var OCLstdlibxtextXBNF = "/${projectName}/generatedModels/OCLstdlib.xtext.XBNF" |
| var OCLstdlibnormalXBNF = "/${projectName}/generatedModels/OCLstdlib.normal.XBNF" |
| var OCLstdlibinlineXBNF = "/${projectName}/generatedModels/OCLstdlib.inline.XBNF" |
| |
| /** |
| * Generate the Concrete Syntax Models used by the Xtext editors. |
| */ |
| Workflow { |
| bean = ResourceSetImpl : resourceSet {} |
| bean = StandaloneSetup { resourceSet = resourceSet |
| extensionMap = Mapping { |
| from = "XBNF" |
| to = "org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl" |
| } |
| // platformUri = "./META-INF" // A local folder to minimize workspace searching |
| // scanClassPath = true // But we do need to search the plugin-space |
| // registerGeneratedEPackage = "org.eclipse.xtext.common.types.TypesPackage" |
| // uriMap = Mapping { |
| // from = "platform:/plugin/org.eclipse.xtext.common.types/" |
| // to = "platform:/resource/org.eclipse.xtext.common.types/" |
| // } |
| } |
| bean = XtextStandaloneSetupBean {} |
| bean = ProjectMapSetup { resourceSet = resourceSet } |
| bean = DynamicEPackageSetup { resourceSet = resourceSet |
| dynamicEPackage = "/${projectName}/model/XBNF.ecore" |
| dynamicEPackage = "/${projectName}/model/XBNFwithCardinality.ecore" |
| } |
| component = QvtoWorkflowComponent { |
| resourceSet = resourceSet |
| uri = "/${projectName}/transforms/xtext2xbnf.qvto" |
| in = "${EssentialOCLxtext}" |
| out = "${EssentialOCLxtextXBNF}" |
| } |
| component = QvtoWorkflowComponent { |
| resourceSet = resourceSet |
| uri = "/${projectName}/transforms/xtext2xbnf.qvto" |
| in = "${CompleteOCLxtext}" |
| out = "${CompleteOCLxtextXBNF}" |
| } |
| component = QvtoWorkflowComponent { |
| resourceSet = resourceSet |
| uri = "/${projectName}/transforms/xtext2xbnf.qvto" |
| in = "${OCLinEcorextext}" |
| out = "${OCLinEcorextextXBNF}" |
| } |
| component = QvtoWorkflowComponent { |
| resourceSet = resourceSet |
| uri = "/${projectName}/transforms/xtext2xbnf.qvto" |
| in = "${OCLstdlibxtext}" |
| out = "${OCLstdlibxtextXBNF}" |
| } |
| component = QvtoWorkflowComponent { |
| resourceSet = resourceSet |
| uri = "/${projectName}/transforms/normalize.qvto" |
| in = "${EssentialOCLxtextXBNF}" |
| out = "${EssentialOCLnormalXBNF}" |
| } |
| component = QvtoWorkflowComponent { |
| resourceSet = resourceSet |
| uri = "/${projectName}/transforms/normalize.qvto" |
| in = "${CompleteOCLxtextXBNF}" |
| out = "${CompleteOCLnormalXBNF}" |
| } |
| component = QvtoWorkflowComponent { |
| resourceSet = resourceSet |
| uri = "/${projectName}/transforms/normalize.qvto" |
| in = "${OCLinEcorextextXBNF}" |
| out = "${OCLinEcorenormalXBNF}" |
| } |
| component = QvtoWorkflowComponent { |
| resourceSet = resourceSet |
| uri = "/${projectName}/transforms/normalize.qvto" |
| in = "${OCLstdlibxtextXBNF}" |
| out = "${OCLstdlibnormalXBNF}" |
| } |
| component = QvtoWorkflowComponent { |
| resourceSet = resourceSet |
| uri = "/${projectName}/transforms/inline.qvto" |
| in = "${EssentialOCLnormalXBNF}" |
| out = "${EssentialOCLinlineXBNF}" |
| } |
| component = QvtoWorkflowComponent { |
| resourceSet = resourceSet |
| uri = "/${projectName}/transforms/inline.qvto" |
| in = "${CompleteOCLnormalXBNF}" |
| out = "${CompleteOCLinlineXBNF}" |
| } |
| component = QvtoWorkflowComponent { |
| resourceSet = resourceSet |
| uri = "/${projectName}/transforms/inline.qvto" |
| in = "${OCLinEcorenormalXBNF}" |
| out = "${OCLinEcoreinlineXBNF}" |
| } |
| component = QvtoWorkflowComponent { |
| resourceSet = resourceSet |
| uri = "/${projectName}/transforms/inline.qvto" |
| in = "${OCLstdlibnormalXBNF}" |
| out = "${OCLstdlibinlineXBNF}" |
| } |
| component = XBNF2LPGCodeGenerator { resourceSet = resourceSet |
| in = "${EssentialOCLinlineXBNF}" |
| javaFolder = "../${projectName}/generatedModels" |
| javaPackageName = "${projectName}" |
| } |
| component = XBNF2LPGCodeGenerator { resourceSet = resourceSet |
| in = "${CompleteOCLinlineXBNF}" |
| javaFolder = "../${projectName}/generatedModels" |
| javaPackageName = "${projectName}" |
| } |
| component = XBNF2LPGCodeGenerator { resourceSet = resourceSet |
| in = "${OCLinEcoreinlineXBNF}" |
| javaFolder = "../${projectName}/generatedModels" |
| javaPackageName = "${projectName}" |
| } |
| component = XBNF2LPGCodeGenerator { resourceSet = resourceSet |
| in = "${OCLstdlibinlineXBNF}" |
| javaFolder = "../${projectName}/generatedModels" |
| javaPackageName = "${projectName}" |
| } |
| } |
| |