Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2016-06-13 08:56:21 +0000
committerEd Willink2016-06-13 11:41:28 +0000
commit78c0c0fa15dcfca9fc16367256d9c91c50591383 (patch)
treec1c16c11060d772809ba48bc67536724e337391e /releng/org.eclipse.qvtd.build/src
parentb22abce5d18dc0f68f5fcd12f0d1db8ae6b331fa (diff)
downloadorg.eclipse.qvtd-78c0c0fa15dcfca9fc16367256d9c91c50591383.tar.gz
org.eclipse.qvtd-78c0c0fa15dcfca9fc16367256d9c91c50591383.tar.xz
org.eclipse.qvtd-78c0c0fa15dcfca9fc16367256d9c91c50591383.zip
[495331] Introduce QVTbase.xtext
Diffstat (limited to 'releng/org.eclipse.qvtd.build/src')
-rw-r--r--releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTbaseEditor.mwe2171
-rw-r--r--releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTdAllEditors.mwe21
2 files changed, 172 insertions, 0 deletions
diff --git a/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTbaseEditor.mwe2 b/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTbaseEditor.mwe2
new file mode 100644
index 000000000..511990991
--- /dev/null
+++ b/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTbaseEditor.mwe2
@@ -0,0 +1,171 @@
+/*******************************************************************************
+ * 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 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
+ *
+ * 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.emf.mwe.utils.*
+import org.eclipse.ocl.examples.build.*
+import org.eclipse.ocl.examples.build.utilities.*
+import org.eclipse.ocl.examples.build.xtend.*
+import org.eclipse.xtext.generator.*
+import org.eclipse.xtext.ui.generator.*
+
+var QVTbase.file.extensions = "qvtb"
+var QVTbaseProjectName = "org.eclipse.qvtd.xtext.qvtbase"
+var QVTbaseRuntimeProject = "../../plugins/${QVTbaseProjectName}"
+
+/**
+ * Generate the QVTbase Editor.
+ */
+Workflow {
+ bean = StandaloneSetup {
+ platformUri = "${QVTbaseRuntimeProject}/.."
+ scanClassPath = true
+ registerGeneratedEPackage = "org.eclipse.qvtd.xtext.qvtbasecs.QVTbaseCSPackage"
+ registerGenModelFile = "platform:/resource/org.eclipse.qvtd.xtext.qvtbase/model/QVTbaseCS.genmodel"
+ }
+
+ component = DirectoryCleaner {
+ directory = "${QVTbaseRuntimeProject}/src-gen"
+ }
+
+ component = DirectoryCleaner {
+ directory = "${QVTbaseRuntimeProject}.ui/src-gen"
+ }
+
+ component = Generator {
+ 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 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
+ *******************************************************************************/"
+ pathRtProject = QVTbaseRuntimeProject
+ pathUiProject = "${QVTbaseRuntimeProject}.ui"
+ projectNameRt = QVTbaseProjectName
+ projectNameUi = "${QVTbaseProjectName}.ui"
+ mergeManifest = false
+
+ language = {
+ uri = "classpath:/org/eclipse/qvtd/xtext/qvtbase/QVTbase.xtext"
+ fileExtensions = QVTbase.file.extensions
+
+ // Java API to access grammar elements (required by several other fragments)
+ fragment = grammarAccess.GrammarAccessFragment {}
+
+ // generates Java API for the generated EPackages
+// fragment = ecore.EcoreGeneratorFragment {
+// referencedGenModels = "platform:/resource/org.eclipse.emf.ecore/model/Ecore.genmodel"
+// referencedGenModels = "platform:/resource/org.eclipse.ocl.xtext.essentialocl/model/EssentialOCLCST.genmodel"
+// }
+
+ // the serialization component
+ fragment = serializer.SerializerFragment {}
+
+ // a custom ResourceFactory for use with EMF
+ fragment = resourceFactory.ResourceFactoryFragment {
+ fileExtensions = QVTbase.file.extensions
+ }
+
+ // the following fragment tries to use the Antlr Generator fragment which can be installed via update manager from http://download.itemis.com/updates/
+// fragment = de.itemis.xtext.antlr.XtextAntlrGeneratorFragment {
+// options = { backtrack = true classSplitting = true }
+// }
+ fragment = parser.antlr.XtextAntlrGeneratorFragment {
+ options = { backtrack = true classSplitting = true }
+ antlrParam = "-Xconversiontimeout" antlrParam = "10000"
+ }
+
+ // check-based API for validation
+ /*
+ fragment = validation.CheckFragment {}
+ */
+
+ // java-based API for validation
+ fragment = validation.JavaValidatorFragment {
+ composedCheck = "org.eclipse.xtext.validation.ImportUriValidator"
+// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
+ }
+
+ // scoping and exporting API
+ /*
+ fragment = scoping.ImportURIScopingFragment {}
+ fragment = exporting.SimpleNamesFragment {}
+ */
+
+ // scoping and exporting API
+ fragment = scoping.ImportNamespacesScopingFragment {}
+ fragment = exporting.QualifiedNamesFragment {}
+
+ // formatter API
+ fragment = formatting.FormatterFragment {}
+
+ // labeling API
+ fragment = labeling.LabelProviderFragment {}
+
+ // outline API
+// fragment = outline.TransformerFragment {}
+// fragment = outline.OutlineNodeAdapterFactoryFragment {}
+ fragment = outline.OutlineTreeProviderFragment {}
+ fragment = outline.QuickOutlineFragment {}
+
+ // java-based API for content assistance
+ fragment = contentAssist.JavaBasedContentAssistFragment {}
+
+// fragment = de.itemis.xtext.antlr.XtextAntlrGeneratorFragment {
+// options = { backtrack = true classSplitting = true}
+// }
+ fragment = parser.antlr.XtextAntlrUiGeneratorFragment {
+ options = { backtrack = true classSplitting = true}
+ antlrParam = "-Xconversiontimeout" antlrParam = "10000"
+ }
+
+ fragment = builder.BuilderIntegrationFragment {}
+
+ // project wizard (optional)
+ /*
+ fragment = projectWizard.SimpleProjectWizardFragment {
+ generatorProjectName = "${projectName}.generator"
+ modelFileExtension = file.extensions
+ }
+ */
+
+ // quickfix API
+ fragment = quickfix.QuickfixProviderFragment {}
+
+ // EssentialOCL bindings
+ fragment = fragments.EssentialOCLFragment {}
+ // Support Markup in Hover text
+ fragment = fragments.MarkupHoverFragment {}
+ // *.xtextbin support on Xtext 2.3
+ fragment = fragments.CompatibilityFragment {}
+ }
+ }
+ component = GenerateGrammarXtend {
+ javaFolder = "${QVTbaseRuntimeProject}/src-gen"
+ javaPackageName = "${QVTbaseProjectName}"
+ grammarFileStem = "QVTbase"
+ }
+ component = ConvertToUnixLineEndings {
+ directory = "${QVTbaseRuntimeProject}/src-gen"
+ }
+ component = ConvertToUnixLineEndings {
+ directory = "${QVTbaseRuntimeProject}.ui/src-gen"
+ }
+}
diff --git a/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTdAllEditors.mwe2 b/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTdAllEditors.mwe2
index df53131aa..a48d2ca3b 100644
--- a/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTdAllEditors.mwe2
+++ b/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTdAllEditors.mwe2
@@ -18,6 +18,7 @@ module GenerateQVTdAllEditors
* Generate all Xtext editors (but not their Concrete Syntax Models).
*/
Workflow {
+ component = @GenerateQVTbaseEditor {}
component = @GenerateQVTcoreBaseEditor {}
component = @GenerateQVTcoreEditor {}
component = @GenerateQVTimperativeEditor {}

Back to the top