Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.osbp.xtext.table/src/org/eclipse/osbp/xtext/table/GenerateTableDSL.mwe2')
-rw-r--r--org.eclipse.osbp.xtext.table/src/org/eclipse/osbp/xtext/table/GenerateTableDSL.mwe2193
1 files changed, 193 insertions, 0 deletions
diff --git a/org.eclipse.osbp.xtext.table/src/org/eclipse/osbp/xtext/table/GenerateTableDSL.mwe2 b/org.eclipse.osbp.xtext.table/src/org/eclipse/osbp/xtext/table/GenerateTableDSL.mwe2
new file mode 100644
index 0000000..eb65259
--- /dev/null
+++ b/org.eclipse.osbp.xtext.table/src/org/eclipse/osbp/xtext/table/GenerateTableDSL.mwe2
@@ -0,0 +1,193 @@
+/**
+ *
+ * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
+ *
+ * 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:
+ * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
+ *
+ */
+module org.eclipse.osbp.xtext.table.GenerateTableDSL
+
+import org.eclipse.emf.mwe.utils.*
+import org.eclipse.xtext.generator.*
+import org.eclipse.xtext.ui.generator.*
+import org.eclipse.osbp.dsl.mwe.*
+
+var projectName = "org.eclipse.osbp.xtext.table"
+var grammarURI = "platform:/resource/${projectName}/src/org/eclipse/osbp/xtext/table/TableDSL.xtext"
+var fileExtensions = "table"
+var runtimeProject = "../${projectName}"
+var generateXtendStub = true
+var encoding = "UTF-8"
+
+Workflow {
+
+ bean = org.eclipse.osbp.dsl.mwe.SemanticModelSetupComponent {
+ ePackage = org.eclipse.osbp.dsl.mwe.PackageMapping {
+ nsURI = "http://osbp.eclipse.org/gridsource/v1/core"
+ packageClass = "org.eclipse.osbp.infogrid.model.gridsource.CxGridSourcePackage"
+ factoryClass = "org.eclipse.osbp.infogrid.model.gridsource.impl.CxGridSourceFactoryImpl"
+ }
+
+ ePackage = org.eclipse.osbp.dsl.mwe.PackageMapping {
+ nsURI = "http://osbp.eclipse.org/gridsource/v1/core/style"
+ packageClass = "org.eclipse.osbp.infogrid.model.gridsource.style.CxGridStylePackage"
+ factoryClass = "org.eclipse.osbp.infogrid.model.gridsource.style.impl.CxGridStyleFactoryImpl"
+ }
+ }
+
+
+ bean = org.eclipse.emf.ecore.xcore.XcoreStandaloneSetup : xcore {}
+ bean = org.eclipse.xtext.mwe.Reader {
+ register = xcore
+ }
+ bean = MavenStandaloneSetup {
+ scanClassPath = true
+ platformUri = "${runtimeProject}/.."
+ registerGenModelFile = "platform:/resource/org.eclipse.osbp.infogrid.model/model/gridsource.genmodel"
+ registerEcoreFile = "platform:/resource/org.eclipse.osbp.infogrid.model/model/gridsource.ecore" // vo mia
+ registerGeneratedEPackage = "org.eclipse.osbp.infogrid.model.gridsource.CxGridSourcePackage"
+ registerGeneratedEPackage = "org.eclipse.osbp.infogrid.model.gridsource.style.CxGridStylePackage"
+ registerGenModelFile = "platform:/resource/org.eclipse.osbp.xtext.table/model/TableDSL.xcore"// registerEcoreFile = "platform:/resource/org.eclipse.osbp.xtext.table/model/TableDSL.xcore"
+ registerGeneratedEPackage = "org.eclipse.osbp.xtext.table.TableDSLPackage"
+ registerGenModelFile = "platform:/resource/org.eclipse.osbp.xtext.datamartdsl/model/DatamartDSL.xcore"// registerEcoreFile = "platform:/resource/org.eclipse.osbp.xtext.datamartdsl/model/DatamartDSL.xcore"
+ registerGeneratedEPackage = "org.eclipse.osbp.xtext.datamartdsl.DatamartDSLPackage"
+ registerGenModelFile = "platform:/resource/org.eclipse.osbp.xtext.cubedsl/model/CubeDSL.xcore"// registerEcoreFile = "platform:/resource/org.eclipse.osbp.xtext.cubedsl/model/CubeDSL.xcore"
+ registerGeneratedEPackage = "org.eclipse.osbp.xtext.cubedsl.CubeDSLPackage"
+ registerGenModelFile = "platform:/resource/org.eclipse.osbp.xtext.datainterchange/model/DataDSL.xcore"
+ registerGeneratedEPackage = "org.eclipse.osbp.xtext.datainterchange.DataDSLPackage"
+ registerGenModelFile = "platform:/resource/org.eclipse.osbp.xtext.action/model/ActionDSL.xcore"
+ registerGeneratedEPackage = "org.eclipse.osbp.xtext.action.ActionDSLPackage"
+ registerGenModelFile = "platform:/resource/org.eclipse.osbp.dsl.entity.xtext/model/entity.xcore"
+ registerEcoreFile = "platform:/resource/org.eclipse.osbp.dsl.entity.xtext/model/entity.xcore"
+ registerGenModelFile = "platform:/resource/org.eclipse.osbp.dsl.common.xtext/model/types.xcore"
+ registerEcoreFile = "platform:/resource/org.eclipse.osbp.dsl.common.xtext/model/types.xcore"
+ registerGenModelFile = "platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel"
+ registerEcoreFile = "platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.ecore"
+ registerGenModelFile = "platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel"
+ registerEcoreFile = "platform:/resource/org.eclipse.xtext.xbase/model/Xtype.ecore"
+ registerEcoreFile = "platform:/resource/org.eclipse.xtext.xbase/model/Xbase.ecore"
+ registerEcoreFile = "platform:/resource/org.eclipse.xtext.xbase/model/XAnnotations.ecore"
+ }
+
+ component = DirectoryCleaner {
+ directory = "${runtimeProject}/src-gen"
+ exclude = "README.txt"
+ }
+
+ component = DirectoryCleaner {
+ directory = "${runtimeProject}.ui/src-gen"
+ exclude = "README.txt"
+ }
+
+ component = DirectoryCleaner {
+ directory = "${runtimeProject}.tests/src-gen"
+ exclude = "README.txt"
+ }
+
+ component = Generator {
+ pathRtProject = runtimeProject
+ pathUiProject = "${runtimeProject}.ui"
+ pathTestProject = "${runtimeProject}.tests"
+ projectNameRt = projectName
+ projectNameUi = "${projectName}.ui"
+ encoding = encoding
+ language = auto-inject {
+ uri = grammarURI
+
+ // Java API to access grammar elements (required by several other fragments)
+ fragment = grammarAccess.GrammarAccessFragment auto-inject {}
+
+ // generates Java API for the generated EPackages
+ fragment = ecore.EMFGeneratorFragment auto-inject {}
+
+ // the old serialization component
+ // fragment = parseTreeConstructor.ParseTreeConstructorFragment auto-inject {}
+
+ // serializer 2.0
+ fragment = serializer.SerializerFragment auto-inject {
+ generateStub = false
+ }
+
+ // a custom ResourceFactory for use with EMF
+ fragment = resourceFactory.ResourceFactoryFragment auto-inject {}
+
+ // The antlr parser generator fragment.
+ fragment = parser.antlr.XtextAntlrGeneratorFragment auto-inject {
+ // options = {
+ // backtrack = true
+ // }
+ }
+
+ // Xtend-based API for validation
+ fragment = validation.ValidatorFragment auto-inject {
+ // composedCheck = "org.eclipse.xtext.validation.ImportUriValidator"
+ // composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
+ }
+
+ // old scoping and exporting API
+ // fragment = scoping.ImportURIScopingFragment auto-inject {}
+ // fragment = exporting.SimpleNamesFragment auto-inject {}
+
+ // scoping and exporting API
+ fragment = scoping.ImportNamespacesScopingFragment auto-inject {}
+ fragment = exporting.QualifiedNamesFragment auto-inject {}
+ fragment = builder.BuilderIntegrationFragment auto-inject {}
+
+ // generator API
+ fragment = generator.GeneratorFragment auto-inject {}
+
+ // formatter API
+ fragment = formatting.FormatterFragment auto-inject {}
+
+ // labeling API
+ fragment = labeling.LabelProviderFragment auto-inject {}
+
+ // outline API
+ fragment = outline.OutlineTreeProviderFragment auto-inject {}
+ fragment = outline.QuickOutlineFragment auto-inject {}
+
+ // quickfix API
+ fragment = quickfix.QuickfixProviderFragment auto-inject {}
+
+ // content assist API
+ fragment = contentAssist.ContentAssistFragment auto-inject {}
+
+ // generates a more lightweight Antlr parser and lexer tailored for content assist
+ fragment = parser.antlr.XtextAntlrUiGeneratorFragment auto-inject {
+ options = {
+ classSplitting = true
+ fieldsPerClass = "100"
+ methodsPerClass = "100"
+ }
+ }
+
+ // generates junit test support classes into Generator#pathTestProject
+ fragment = junit.Junit4Fragment auto-inject {}
+
+ // rename refactoring
+ fragment = refactoring.RefactorElementNameFragment auto-inject {}
+
+ // provides the necessary bindings for java types integration
+ fragment = types.TypesGeneratorFragment auto-inject {}
+
+ // generates the required bindings only if the grammar inherits from Xbase
+ fragment = xbase.XbaseGeneratorFragment auto-inject {}
+
+ // provides a preference page for template proposals
+ fragment = templates.CodetemplatesGeneratorFragment auto-inject {}
+
+ // provides a compare view
+ fragment = compare.CompareFragment auto-inject {}
+
+ // parse grammar and generate i18n grammar
+ fragment = org.eclipse.osbp.xtext.basic.generator.BasicDslGrammarI18nGenerator auto-inject {}
+ }
+ }
+}
+

Back to the top