blob: ec26e8e1f646c51ec78be561031ea8f31e6fad40 [file] [log] [blame]
/*
* 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 com.google.eclipse.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, protodevel"
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 = ProtobufGenerator {
pathRtProject = runtimeProject
pathUiProject = "${runtimeProject}.ui"
projectNameRt = projectName
projectNameUi = "${projectName}.ui"
language = {
uri = grammarURI
fileExtensions = file.extensions
// Java API for accessing grammar elements (required by several other fragments)
fragment = grammarAccess.GrammarAccessFragment {}
// Generates Java API for the generated EPackages
fragment = ecore.EMFGeneratorFragment {
// referencedGenModels = "uri to genmodel, uri to next genmodel"
}
// Serializer 2.0
fragment = serializer.SerializerFragment {
generateStub = false
}
// 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.ProtobufImportNamespacesScopingFragment {}
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 {
// options = {
// backtrack = true
// }
}
// Project wizard (optional)
// fragment = projectWizard.SimpleProjectWizardFragment {
// generatorProjectName = "${projectName}.generator"
// modelFileExtension = file.extensions
// }
}
}
}