blob: b6eaf2b343b14f64ca772d552c9c4daccf564cbd [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2011 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 editor.
* If it fails with a stack dump, open the Xtext file and do
* a dummy edit. Generally there is an error in the source file.
*******************************************************************************/
module GenerateQVTbaseEditor
import org.eclipse.xtext.xtext.generator.*
import org.eclipse.xtext.xtext.generator.model.project.*
import org.eclipse.xtext.xtext.generator.ui.codemining.CodeMiningFragment
var QVTbaseProjectName = "org.eclipse.qvtd.xtext.qvtbase"
var QVTbaseRuntimeProject = "../../plugins/${QVTbaseProjectName}"
var rootPath = "../../plugins"
/**
* Generate the QVTbase Editor.
*/
Workflow {
bean = org.eclipse.emf.mwe.utils.StandaloneSetup {
scanClassPath = true
platformUri = ".."
registerGeneratedEPackage = "org.eclipse.ocl.xtext.essentialoclcs.EssentialOCLCSPackage"
registerGeneratedEPackage = "org.eclipse.qvtd.xtext.qvtbasecs.QVTbaseCSPackage"
registerGenModelFile = "platform:/resource/org.eclipse.ocl.xtext.essentialocl/model/EssentialOCLCS.genmodel"
registerGenModelFile = "platform:/resource/org.eclipse.qvtd.xtext.qvtbase/model/QVTbaseCS.genmodel"
}
component = XtextGenerator {
standaloneSetup = XtextGeneratorStandaloneSetup {
scanClasspath = false
}
configuration = org.eclipse.ocl.examples.build.fragments.MyDefaultGeneratorModule {
project = org.eclipse.ocl.examples.build.fragments.MyStandardProjectConfig {
activatorName = "QVTbaseActivator"
baseName = "${QVTbaseProjectName}"
rootPath = rootPath
runtimeTest = {
enabled = false
}
eclipsePlugin = {
enabled = true
}
eclipsePluginTest = {
enabled = false
}
genericIde = {
enabled = true
name = "${QVTbaseProjectName}.ui"
}
createEclipseMetaData = true
}
code = {
preferXtendStubs = false
encoding = "UTF-8"
fileHeader =
"/*******************************************************************************
* Copyright (c) 2011, \${year} 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
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* E.D.Willink - initial API and implementation
*******************************************************************************/"
}
}
language = StandardLanguage {
name = "${QVTbaseProjectName}.QVTbase"
fileExtensions = "qvtbase"
generator = null
serializer = org.eclipse.ocl.examples.xtext.build.fragments.DeclarativeSerializerFragmentXtend {
generateStub = true
}
validator = {
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
generateDeprecationValidation = false
}
/* fragment = CodeMiningFragment {
generateStub = true
generateXtendStub = false
} */
parserGenerator = parser.antlr.XtextAntlrGeneratorFragment2 {
options = parser.antlr.AntlrOptions {
backtrack = true
classSplitting = true
}
}
formatter = org.eclipse.ocl.examples.xtext.build.fragments.DeclarativeFormatterFragmentXtend {
generateStub = true
}
// EssentialOCL bindings
fragment = org.eclipse.ocl.examples.build.fragments.EssentialOCLFragment {}
// Support Markup and Hover text
fragment = org.eclipse.ocl.examples.build.fragments.MarkupHoverFragment {}
// *.xtextbin support on Xtext 2.3
fragment = org.eclipse.ocl.examples.build.fragments.CompatibilityFragment {}
}
}
component = org.eclipse.ocl.examples.build.xtend.GenerateGrammarXtend {
javaFolder = "${QVTbaseRuntimeProject}/src-gen"
javaPackageName = "${QVTbaseProjectName}"
grammarFileStem = "QVTbase"
}
component = org.eclipse.ocl.examples.build.utilities.ConvertToUnixLineEndings {
directory = "${QVTbaseRuntimeProject}/META-INF"
}
component = org.eclipse.ocl.examples.build.utilities.ConvertToUnixLineEndings {
directory = "${QVTbaseRuntimeProject}/emf-gen"
}
component = org.eclipse.ocl.examples.build.utilities.ConvertToUnixLineEndings {
directory = "${QVTbaseRuntimeProject}/src"
}
component = org.eclipse.ocl.examples.build.utilities.ConvertToUnixLineEndings {
directory = "${QVTbaseRuntimeProject}/src-gen"
}
component = org.eclipse.ocl.examples.build.utilities.ConvertToUnixLineEndings {
directory = "${QVTbaseRuntimeProject}.ui/META-INF"
}
component = org.eclipse.ocl.examples.build.utilities.ConvertToUnixLineEndings {
directory = "${QVTbaseRuntimeProject}.ui/src"
}
component = org.eclipse.ocl.examples.build.utilities.ConvertToUnixLineEndings {
directory = "${QVTbaseRuntimeProject}.ui/src-gen"
}
}