blob: f7dce7ed30ee10bf4c2f14c1dcf6db41fce8b4a9 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 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 UML 2.5 model.
*******************************************************************************/
module GenerateUML25Model
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.*
import org.eclipse.uml2.uml.resource.XMI2UMLResource
var projectName = "org.eclipse.ocl.examples.uml25"
//var ecoreSlot = "ecore"
/**
* Generate the UML 2.5 Model, by performing the merge to create the flattened package
* with additional MDT/OCL content, alphabeticsing the classes, reloading the genmodel
* and finally generating the model code.
*/
Workflow {
bean = ResourceSetImpl : resourceSet {}
bean = ProjectMapSetup { resourceSet = resourceSet }
bean = UMLStandaloneSetup { resourceSet = resourceSet }
bean = OCLStandaloneSetup {}
// bean = GenModelSetup { resourceSet = resourceSet }
bean = UML25GenModelSetup { resourceSet = resourceSet }
/* component = GenmodelReloader { resourceSet = resourceSet skipOnErrors = true
projectName = "${projectName}"
modelSlot = "${ecoreSlot}"
genModel = "/${projectName}/model/UML.genmodel"
ecoreFile = "/${projectName}/model/UML.ecore"
// modelImporter = "org.eclipse.uml2.uml.ecore.importer.UMLImporter"
// modelImporter = "org.eclipse.ocl.examples.build.utilities.UMLImporterWithDelegates"
}
component = ResourceReader { resourceSet = resourceSet skipOnErrors = true
modelSlot = "${ecoreSlot}"
uri = "/${projectName}/model/UML.ecore"
}
// component = ConstraintMerger { resourceSet = resourceSet skipOnErrors = true
// projectName = "${projectName}"
// modelSlot = "${ecoreSlot}"
// uri = "model/Pivot.ocl"
// }
component = UML25Fixes { skipOnErrors = true
modelSlot = "${ecoreSlot}"
}
component = EPackageAlphabetizer { skipOnErrors = true
modelSlot = "${ecoreSlot}"
}
// component = PruneSuperClasses { skipOnErrors = true
// modelSlot = "${ecoreSlot}"
// }
// component = SetASmetamodel { skipOnErrors = true
// modelSlot = "${ecoreSlot}"
// }
// component = OCLDelegateActivator { skipOnErrors = true
// modelSlot = "${pivotSlot}"
// }
component = ResourceWriter { resourceSet = resourceSet skipOnErrors = true
modelSlot = "${ecoreSlot}"
} */
component = GenerateModel { resourceSet = resourceSet skipOnErrors = true
// projectName = "${projectName}"
genModel = "/${projectName}/model/UML.genmodel"
// clearResourceSet = false
// modelSlot = "${ecoreSlot}"
}
}