| /** |
| * <copyright> |
| * |
| * Copyright (c) 2011 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: OCLStates.mwe2,v 1.1 2011/03/15 07:51:54 ewillink Exp $ |
| */ |
| module org.eclipse.ocl.tutorial.eclipsecon2011.GenerateOCLStates |
| |
| import org.eclipse.emf.mwe.utils.* |
| import org.eclipse.xtext.generator.* |
| import org.eclipse.xtext.ui.generator.* |
| |
| var grammarURI = "classpath:/org/eclipse/ocl/tutorial/eclipsecon2011/OCLStates.xtext" |
| var file.extensions = "oclstates" |
| var projectName = "org.eclipse.ocl.tutorial.eclipsecon2011.oclstates" |
| 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 {} |
| |
| // Generate java classes for Ecore models |
| fragment = ecore.EcoreGeneratorFragment {} |
| |
| // the serialization component |
| fragment = parseTreeConstructor.ParseTreeConstructorFragment {} |
| |
| // 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 {} |
| |
| // Check based validation |
| fragment = validation.JavaValidatorFragment {} |
| |
| // 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 {} |
| } |
| } |
| } |