blob: 39b7f5ced8392e3ea31786f64c30589313c6791d [file] [log] [blame]
/*******************************************************************************
* 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
* Adolfo Sanchez-Barbudo Herrera (University of York) - bug397429"
*
* Run As->MWE2 Workflow to regenerate the Xtest CS models.
*******************************************************************************/
module GenerateAutoCSModels
import org.eclipse.ocl.examples.build.*
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.*
// Common properties
var lookupSolverClassName = "org.eclipse.ocl.pivot.internal.lookup.util.PivotLookupSolver"
var lookupResultItfName = "org.eclipse.ocl.pivot.internal.lookup.util.PivotLookupResult"
var tracePropertyName = "pivot"
/**
* Generate the Concrete Syntax 2 Abstract Syntax infrastructure
*/
Workflow {
bean = ResourceSetImpl : resourceSet {}
bean = StandaloneSetup { resourceSet = resourceSet
platformUri = ".."
scanClassPath = true
}
bean = EcoreGenModelSetup { resourceSet = resourceSet }
component = CopyAndRename {
script = "org.eclipse.ocl.examples.build.GenerateAutoCSModels.mwe2"
fromProject = "../../../org.eclipse.qvtd/plugins/org.eclipse.qvtd.runtime/src"
toProject = "../../../org.eclipse.ocl/plugins/org.eclipse.ocl.pivot/src-gen"
packageCopy = {
from = "org.eclipse.qvtd.runtime.evaluation"
to = "org.eclipse.ocl.pivot.evaluation.tx"
}
packageCopy = {
from = "org.eclipse.qvtd.runtime.internal.evaluation"
to = "org.eclipse.ocl.pivot.internal.evaluation.tx"
}
packageCopy = {
from = "org.eclipse.qvtd.runtime.labels"
to = "org.eclipse.ocl.pivot.internal.labels"
}
packageCopy = {
from = "org.eclipse.qvtd.runtime.library.model"
to = "org.eclipse.ocl.pivot.library.model"
}
packageRename = {
from = "org.eclipse.qvtd.runtime.internal.cs2as"
to = "org.eclipse.ocl.xtext.base.cs2as.tx"
}
}
component = CopyAndRename {
script = "org.eclipse.ocl.examples.build.GenerateAutoCSModels.mwe2"
fromProject = "../../../org.eclipse.qvtd/plugins/org.eclipse.qvtd.runtime/src"
toProject = "../../../org.eclipse.ocl/plugins/org.eclipse.ocl.xtext.base/src-gen"
packageCopy = {
from = "org.eclipse.qvtd.runtime.internal.cs2as"
to = "org.eclipse.ocl.xtext.base.cs2as.tx"
}
packageRename = {
from = "org.eclipse.qvtd.runtime.evaluation"
to = "org.eclipse.ocl.pivot.evaluation.tx"
}
packageRename = {
from = "org.eclipse.qvtd.runtime.internal.evaluation"
to = "org.eclipse.ocl.pivot.internal.evaluation.tx"
}
packageRename = {
from = "org.eclipse.qvtd.runtime.labels"
to = "org.eclipse.ocl.pivot.internal.labels"
}
packageRename = {
from = "org.eclipse.qvtd.runtime.library.model"
to = "org.eclipse.ocl.pivot.library.model"
}
}
// Generate the CS2AS CGed transformation for BaseCS
component = org.eclipse.ocl.examples.build.utilities.GenerateCGedQVTiTransformation auto-inject {
oclDocURI = "platform:/resource/org.eclipse.ocl.xtext.base/model/BaseCS2AS.ocl"
// FIXME the following only works if the output project are in the same FS folder. Better use a projectName and improve generator
javaFolder = "../../plugins/org.eclipse.ocl.xtext.base/src-gen"
javaPackage = "org.eclipse.ocl.xtext.base.cs2as"
packageRename = {
from = "org.eclipse.qvtd.runtime.library.model"
to = "org.eclipse.ocl.pivot.library.model"
}
packageRename = {
from = "org.eclipse.qvtd.runtime.internal.cs2as"
to = "org.eclipse.ocl.xtext.base.cs2as.tx"
}
}
// Generate the CS2AS CGed transformation for EssentialOCLCS
component = org.eclipse.ocl.examples.build.utilities.GenerateCGedQVTiTransformation auto-inject {
oclDocURI = "platform:/resource/org.eclipse.ocl.xtext.essentialocl/model/EssentialOCLCS2AS.ocl"
extendedOclDocURIs = "platform:/resource/org.eclipse.ocl.xtext.base/model/BaseCS2AS.ocl"
// FIXME the following only works if the output project are in the same FS folder. Better use a projectName and improve generator
javaFolder = "../../plugins/org.eclipse.ocl.xtext.essentialocl/src-gen"
javaPackage = "org.eclipse.ocl.xtext.essentialocl.cs2as"
packageRename = {
from = "org.eclipse.qvtd.runtime.library.model"
to = "org.eclipse.ocl.pivot.library.model"
}
packageRename = {
from = "org.eclipse.qvtd.runtime.internal.cs2as"
to = "org.eclipse.ocl.xtext.base.cs2as.tx"
}
}
}