Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Running workflow for several languages
Running workflow for several languages [message #683984] Tue, 14 June 2011 19:51 Go to next message
Rafael Angarita is currently offline Rafael AngaritaFriend
Messages: 94
Registered: November 2010
Member
Hello guys,

I'm curious about how do you do to run a workflow for several languages. Some of those languages depend on one or more language that I want to generate in the same workflow. When I say that a language depends on another, I mean it imports the other language:

import "platform:/resource/org.xtext.altagracia/src-gen/org/xtext/altagracia/Domain.ecore" as domainAG


Now, at first the "src-gen" directory is empty, so the file "src-gen/org/xtext/altagracia/Domain.ecore" does not exist and therefore, the .xtext source gives the error "Couldn't resolve reference to EPackage ...".

Because of it, I'm not able to run the workflow with all my language the first time, when the src-gen directory is empty.

I have all the languages inside the Generator component of the workflow:

component = Generator {
		pathRtProject = runtimeProject
		pathUiProject = "${runtimeProject}.ui"
		projectNameRt = projectName
		projectNameUi = "${projectName}.ui"
		language = {
                     ....
                }
                language = {
                     ....
                }


For now, I just have several workflows, some of them to generate only the languages on which other languages depend, but this approach is getting slow and makes me write redundant code within the .mwe2 files.


I was wondering if there is a better way of doing this.

Thank you very much for your help!
Re: Running workflow for several languages [message #684146 is a reply to message #683984] Wed, 15 June 2011 05:21 Go to previous messageGo to next message
Tobias Kniep is currently offline Tobias KniepFriend
Messages: 13
Registered: June 2010
Junior Member
Hello Rafael,

you can just specify two generator components in one workflow.
Please bear in mind, however, that this does not seem to work correctly if you want to generate just one ui-Plugin for all your languages (code gets overwritten).

If you use a separate ui-Project for each language this works fine.

Best regards,
Tobias
Re: Running workflow for several languages [message #684342 is a reply to message #684146] Wed, 15 June 2011 13:06 Go to previous messageGo to next message
Rafael Angarita is currently offline Rafael AngaritaFriend
Messages: 94
Registered: November 2010
Member
Hello Tobias, thank you for your answer.

I use only one ui-Plugin for all my languages. I don't know if it is the right way to do it.
Re: Running workflow for several languages [message #684711 is a reply to message #684342] Thu, 16 June 2011 05:10 Go to previous message
Tobias Kniep is currently offline Tobias KniepFriend
Messages: 13
Registered: June 2010
Junior Member
I'd be interested to know the "standard way" as well.

We also used to have both our languages in one ui-Plugin. Due to the dependency problem you described above we had to generate the language in two passes (with two workflow files): first only the independent language and then both languages. Obviously, this is not very efficient/convenient.

Therefore, we switched to having two separate ui-Plugins. This works quite well.

Tobias
Previous Topic:[Xtext 2.0] Bug in PreferenceStoreAccessImpl?
Next Topic:Xtext editor integration
Goto Forum:
  


Current Time: Thu Apr 25 14:59:27 GMT 2024

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

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

Back to the top