blob: 0b07b56b45d8ca7716faf599978c32a0bb237315 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2012 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 GenerateQVTrelationEditor
import org.eclipse.xtext.xtext.generator.*
import org.eclipse.xtext.xtext.generator.model.project.*
import org.eclipse.xtext.xtext.generator.ui.codemining.CodeMiningFragment
var QVTrelationProjectName = "org.eclipse.qvtd.xtext.qvtrelation"
var QVTrelationRuntimeProject = "../../plugins/${QVTrelationProjectName}"
var rootPath = "../../plugins"
/**
* Generate the QVTrelation 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"
registerGeneratedEPackage = "org.eclipse.qvtd.xtext.qvtrelationcs.QVTrelationCSPackage"
registerGenModelFile = "platform:/resource/org.eclipse.qvtd.xtext.qvtrelation/model/QVTrelationCS.genmodel"
}
component = XtextGenerator {
standaloneSetup = XtextGeneratorStandaloneSetup {
scanClasspath = false
}
configuration = org.eclipse.ocl.examples.build.fragments.MyDefaultGeneratorModule {
project = org.eclipse.ocl.examples.build.fragments.MyStandardProjectConfig {
activatorName = "QVTrelationActivator"
baseName = "${QVTrelationProjectName}"
rootPath = rootPath
runtimeTest = {
enabled = false
}
eclipsePlugin = {
enabled = true
}
eclipsePluginTest = {
enabled = false
}
genericIde = {
enabled = true
name = "${QVTrelationProjectName}.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 = "${QVTrelationProjectName}.QVTrelation"
fileExtensions = "qvtr"
generator = null
serializer = {
generateStub = false
}
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
}
}
fragment = org.eclipse.xtext.generator.adapter.FragmentAdapter {
fragment = org.eclipse.xtext.generator.formatting.FormatterFragment {}
}
// 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 = "${QVTrelationRuntimeProject}/src-gen"
javaPackageName = "${QVTrelationProjectName}"
grammarFileStem = "QVTrelation"
}
component = org.eclipse.ocl.examples.build.utilities.ConvertToUnixLineEndings {
directory = "${QVTrelationRuntimeProject}/META-INF"
}
component = org.eclipse.ocl.examples.build.utilities.ConvertToUnixLineEndings {
directory = "${QVTrelationRuntimeProject}/emf-gen"
}
component = org.eclipse.ocl.examples.build.utilities.ConvertToUnixLineEndings {
directory = "${QVTrelationRuntimeProject}/src"
}
component = org.eclipse.ocl.examples.build.utilities.ConvertToUnixLineEndings {
directory = "${QVTrelationRuntimeProject}/src-gen"
}
component = org.eclipse.ocl.examples.build.utilities.ConvertToUnixLineEndings {
directory = "${QVTrelationRuntimeProject}.ui/META-INF"
}
component = org.eclipse.ocl.examples.build.utilities.ConvertToUnixLineEndings {
directory = "${QVTrelationRuntimeProject}.ui/src"
}
component = org.eclipse.ocl.examples.build.utilities.ConvertToUnixLineEndings {
directory = "${QVTrelationRuntimeProject}.ui/src-gen"
}
}