| /******************************************************************************* |
| * Copyright (c) 2010 itemis AG (http://www.itemis.eu) 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 |
| *******************************************************************************/ |
| module org.eclipse.xtext.example.arithmetics.Arithmetics |
| |
| import org.eclipse.emf.mwe.utils.* |
| import org.eclipse.xtext.generator.* |
| import org.eclipse.xtext.ui.generator.* |
| |
| var grammarURI = "classpath:/org/eclipse/xtext/example/arithmetics/Arithmetics.xtext" |
| var file.extensions = "calc" |
| var projectName = "org.eclipse.xtext.example.arithmetics" |
| var runtimeProject = "../${projectName}" |
| |
| Workflow { |
| bean = StandaloneSetup { |
| platformUri = "${runtimeProject}/../.." |
| } |
| |
| component = DirectoryCleaner { |
| directory = "${runtimeProject}/src-gen" |
| } |
| |
| component = DirectoryCleaner { |
| directory = "${runtimeProject}.ui/src-gen" |
| } |
| |
| component = Generator { |
| pathRtProject = runtimeProject |
| pathUiProject = "${runtimeProject}.ui" |
| projectNameRt = projectName |
| projectNameUi = "${projectName}.ui" |
| language = LanguageConfig { |
| uri = grammarURI |
| fileExtensions = 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 {} |
| |
| // the serialization component |
| fragment = serializer.SerializerFragment { |
| srcGenOnly=true |
| } |
| |
| // a custom ResourceFactory for use with EMF |
| fragment = resourceFactory.ResourceFactoryFragment { |
| fileExtensions = 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 = parser.antlr.XtextAntlrGeneratorFragment {} |
| |
| // 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.ImportNamespacesScopingFragment {} |
| fragment = exporting.QualifiedNamesFragment {} |
| |
| // formatter API |
| fragment = formatting.FormatterFragment {} |
| |
| // labeling API |
| fragment = labeling.LabelProviderFragment {} |
| |
| // outline API |
| fragment = outline.OutlineTreeProviderFragment {} |
| fragment = outline.QuickOutlineFragment {} |
| |
| // java-based API for content assistance |
| fragment = contentAssist.JavaBasedContentAssistFragment {} |
| |
| fragment = parser.antlr.XtextAntlrUiGeneratorFragment {} |
| |
| fragment = builder.BuilderIntegrationFragment {} |
| |
| // quickfix API |
| fragment = quickfix.QuickfixProviderFragment {} |
| } |
| } |
| } |