| /* |
| * Copyright (c) 2011 Google Inc. |
| * |
| * 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 |
| * |
| * Generated by Xtext |
| */ |
| module com.google.eclipse.protobuf.Protobuf |
| |
| import org.eclipse.emf.mwe.utils.* |
| import org.eclipse.xtext.generator.* |
| import org.eclipse.xtext.ui.generator.* |
| |
| var grammarURI = "classpath:/com/google/eclipse/protobuf/Protobuf.xtext" |
| var file.extensions = "proto" |
| var projectName = "com.google.eclipse.protobuf" |
| 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 = { |
| 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 { |
| // referencedGenModels = "uri to genmodel, uri to next genmodel" |
| } |
| |
| // the serialization component |
| fragment = parseTreeConstructor.ParseTreeConstructorFragment {} |
| |
| // a custom ResourceFactory for use with EMF |
| fragment = resourceFactory.ResourceFactoryFragment { |
| fileExtensions = file.extensions |
| } |
| |
| // The antlr parser generator fragment. |
| fragment = parser.antlr.XtextAntlrGeneratorFragment { |
| // options = { |
| // backtrack = true |
| // } |
| } |
| |
| // java-based API for validation |
| fragment = validation.JavaValidatorFragment { |
| composedCheck = "org.eclipse.xtext.validation.ImportUriValidator" |
| composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator" |
| // registerForImportedPackages = true |
| } |
| |
| // scoping and exporting API |
| // fragment = scoping.ImportURIScopingFragment {} |
| // fragment = exporting.SimpleNamesFragment {} |
| |
| // scoping and exporting API |
| fragment = scoping.ImportNamespacesScopingFragment {} |
| fragment = exporting.QualifiedNamesFragment {} |
| fragment = builder.BuilderIntegrationFragment {} |
| |
| // formatter API |
| fragment = formatting.FormatterFragment {} |
| |
| // labeling API |
| fragment = labeling.LabelProviderFragment {} |
| |
| // outline API |
| fragment = outline.OutlineTreeProviderFragment {} |
| fragment = outline.QuickOutlineFragment {} |
| |
| // quickfix API |
| fragment = quickfix.QuickfixProviderFragment {} |
| |
| // rename refactoring |
| fragment = refactoring.RefactorElementNameFragment {} |
| |
| // content assist API |
| fragment = contentAssist.JavaBasedContentAssistFragment {} |
| |
| // generates a more lightweight Antlr parser and lexer tailored for content assist |
| fragment = parser.antlr.XtextAntlrUiGeneratorFragment {} |
| |
| // project wizard (optional) |
| // fragment = projectWizard.SimpleProjectWizardFragment { |
| // generatorProjectName = "${projectName}.generator" |
| // modelFileExtension = file.extensions |
| // } |
| } |
| } |
| } |