Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd.Willink2012-04-17 15:18:20 +0000
committerEd.Willink2012-04-17 15:18:20 +0000
commit5425dfe0b10c01624dab01c566dc060552fc99a1 (patch)
treefa107de879c4247eb33f07c7d2c7876a708de712 /releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTrelationEditor.mwe2
parentb26d33a59981f5e41de49730c615765977d675a9 (diff)
downloadorg.eclipse.qvtd-5425dfe0b10c01624dab01c566dc060552fc99a1.tar.gz
org.eclipse.qvtd-5425dfe0b10c01624dab01c566dc060552fc99a1.tar.xz
org.eclipse.qvtd-5425dfe0b10c01624dab01c566dc060552fc99a1.zip
[unrelated] First approximation to a QVTr editor
Diffstat (limited to 'releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTrelationEditor.mwe2')
-rw-r--r--releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTrelationEditor.mwe2153
1 files changed, 153 insertions, 0 deletions
diff --git a/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTrelationEditor.mwe2 b/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTrelationEditor.mwe2
new file mode 100644
index 000000000..e0883dbce
--- /dev/null
+++ b/releng/org.eclipse.qvtd.build/src/org/eclipse/qvtd/build/mwe2/GenerateQVTrelationEditor.mwe2
@@ -0,0 +1,153 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2012 E.D.Willink 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
+ *
+ * </copyright>
+ *
+ * $Id$
+ *
+ * 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.emf.mwe.utils.*
+import org.eclipse.ocl.examples.build.*
+import org.eclipse.xtext.generator.*
+import org.eclipse.xtext.ui.generator.*
+
+var QVTrelation.file.extensions = "qvtr"
+var QVTrelationProjectName = "org.eclipse.qvtd.xtext.qvtrelation"
+var QVTrelationRuntimeProject = "../../plugins/${QVTrelationProjectName}"
+
+/**
+ * Generate the QVTrelation Editor.
+ */
+Workflow {
+ bean = StandaloneSetup {
+ platformUri = "${QVTrelationRuntimeProject}/.."
+ scanClassPath = true
+ uriMap = Mapping {
+ from = "platform:/plugin/org.eclipse.ocl.examples.pivot/"
+ to = "platform:/resource/org.eclipse.ocl.examples.pivot/"
+ }
+ }
+
+ component = DirectoryCleaner {
+ directory = "${QVTrelationRuntimeProject}/src-gen"
+ }
+
+ component = DirectoryCleaner {
+ directory = "${QVTrelationRuntimeProject}.ui/src-gen"
+ }
+
+ component = Generator {
+ pathRtProject = QVTrelationRuntimeProject
+ pathUiProject = "${QVTrelationRuntimeProject}.ui"
+ projectNameRt = QVTrelationProjectName
+ projectNameUi = "${QVTrelationProjectName}.ui"
+ mergeManifest = false
+
+ language = {
+ uri = "classpath:/org/eclipse/qvtd/xtext/qvtrelation/QVTrelation.xtext"
+ fileExtensions = QVTrelation.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.ErelationGeneratorFragment {
+// referencedGenModels = "platform:/resource/org.eclipse.emf.erelation/model/Erelation.genmodel"
+// referencedGenModels = "platform:/resource/org.eclipse.ocl.examples.xtext.essentialocl/model/EssentialOCLCST.genmodel"
+// }
+
+ // the serialization component
+ fragment = parseTreeConstructor.ParseTreeConstructorFragment {}
+
+ // a custom ResourceFactory for use with EMF
+ fragment = resourceFactory.ResourceFactoryFragment {
+ fileExtensions = QVTrelation.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 {}
+ }
+ }
+}

Back to the top