Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext starts the generator of the inherited plugin.
Xtext starts the generator of the inherited plugin. [message #1064451] Wed, 19 June 2013 11:00 Go to next message
Niek Hulsman is currently offline Niek HulsmanFriend
Messages: 7
Registered: June 2013
Junior Member
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.

Re: Xtext starts the generator of the inherited plugin. [message #1064476 is a reply to message #1064451] Wed, 19 June 2013 12:57 Go to previous message
Niek Hulsman is currently offline Niek HulsmanFriend
Messages: 7
Registered: June 2013
Junior Member
Solved the problem. I had to activate the compiler for the Financial plugin.
Previous Topic:News about formatter on Xtext 2.4.1 release ?
Next Topic:Accessing global constant data
Goto Forum:
  


Current Time: Wed Apr 24 22:25:06 GMT 2024

Powered by FUDForum. Page generated in 0.03263 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top