I've made two xtext projects:
1. The first project contains only an expression grammar. The idea is to use this project in several other projects that use the same expressions. The file extension is
2. In the second project i have a grammar that inherits from grammar in the first project. This works fine when i'm editing, but when i click on "build project" only the generator of the first project is started. I've checked this by creating a file with the extension of the first project.
Is it possible to give the first project a more passive role? So that it's generator doens't get called by "Build Project"?
More info:
first project:
- standard project with a xtext grammar for expressions
second project:
I have changed the following files:
Manifest.MF
Require-Bundle: org.eclipse.xtext;visibility:=reexport,
org.eclipse.xtext.xbase;resolution:=optional;visibility:=reexport,
org.eclipse.xtext.generator;resolution:=optional,
org.apache.commons.logging;bundle-version="1.0.4";resolution:=optional,
org.eclipse.emf.codegen.ecore;resolution:=optional,
org.eclipse.emf.mwe.utils;resolution:=optional,
org.eclipse.emf.mwe2.launch;resolution:=optional,
fes-xtext-expression;bundle-version="1.0.0";visibility:=reexport, <<<<<<<<
org.eclipse.xtext.util,
org.eclipse.emf.ecore,
org.eclipse.emf.common,
org.antlr.runtime,
org.eclipse.xtext.common.types
Grammar header
grammar nl.finan.language.financial.Financial with nl.finan.language.expression.Expression
Generator mwe2
var grammarURI = "classpath:/nl/finan/language/financial/Financial.xtext"
var file.extensions = "ffl"
var projectName = "fes-xtext-financial"
var runtimeProject = "../${projectName}"
Workflow {
bean = StandaloneSetup {
scanClassPath = true
platformUri = "${runtimeProject}/.."
registerGeneratedEPackage = "nl.finan.language.expression.expression.ExpressionPackage"
registerGenModelFile = "platform:/resource/fes-xtext-expression/src-gen/nl/finan/language/expression/Expression.genmodel"
}
When i test i start the second project as Eclipse application. I'm using XText 2.4.