Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Errors in generator when adding xtend/xpand nature
Errors in generator when adding xtend/xpand nature [message #479046] Sat, 08 August 2009 10:20 Go to next message
Edwin Park is currently offline Edwin Park
Messages: 124
Registered: July 2009
Senior Member
Hi,

I installed M2T Xtext and created a new default Xtext project. When I am
in the org.xtext.example.mydsl.generator project trying to use code
completion in the the Template.xpt xpand template, I get a dialog asking
if I want to enable the Xtend nature to the project. If I say yes, the
xtend/xpand builder is putting error marks in the xtend and xpand files as
it does not seem to be able to find the imported myDsl model. If I run the
mwe workflow, however, it succeeds even though the editors are reporting
errors. Is there something else I need to do to get xtend/xpand to work
correctly when the nature is added? Note: this is with Xtext SDK
0.7.1.v200907171100 on macosx and Java 1.6.

Thanks,
Edwin
Re: Errors in generator when adding xtend/xpand nature [message #479241 is a reply to message #479046] Mon, 10 August 2009 08:39 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven Efftinge
Messages: 1755
Registered: July 2009
Senior Member
Hi Edwin,

this is a bit confusing, but the Xtend and Xpand files refer the ecore
file which is to be generated by the Xtext generator.
So after creating a new project, the first thing you have to do is to
start the workflow in the main project in order to get the language
infrastructure generated. After that you should be able to enable the
Xpand nature without getting error markers, because the referenced ecore
model has been generated.

The nature is disabled by default in order to avoid having markers in
the newly created projects.

Regards,
Sven

Edwin Park schrieb:
> Hi,
>
> I installed M2T Xtext and created a new default Xtext project. When I am
> in the org.xtext.example.mydsl.generator project trying to use code
> completion in the the Template.xpt xpand template, I get a dialog asking
> if I want to enable the Xtend nature to the project. If I say yes, the
> xtend/xpand builder is putting error marks in the xtend and xpand files
> as it does not seem to be able to find the imported myDsl model. If I
> run the mwe workflow, however, it succeeds even though the editors are
> reporting errors. Is there something else I need to do to get
> xtend/xpand to work correctly when the nature is added? Note: this is
> with Xtext SDK 0.7.1.v200907171100 on macosx and Java 1.6.
>
> Thanks,
> Edwin
>
>


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


--
Have you heard about XtextCON?
Go to: http://www.xtextcon.org
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: Errors in generator when adding xtend/xpand nature [message #479247 is a reply to message #479241] Mon, 10 August 2009 08:50 Go to previous message
Edwin Park is currently offline Edwin Park
Messages: 124
Registered: July 2009
Senior Member
Hi Sven,

I figured out the issue. I had run the workflow in the model project
before running the generator as you mentioned - the issue was that somehow
I had gotten into a state where my
settings/org.eclipse.xtend.shared.ui.prefs had an entry of
metamodelContributor= , which was turning off all metamodel contributions.
Once I removed that file everything is working properly.

Thanks,
Edwin
Previous Topic:Generating a JSP JET2 template
Next Topic:[Announce] M2T XPAND 0.7.2RC1 is available
Goto Forum:
  


Current Time: Sat Apr 19 11:53:40 EDT 2014

Powered by FUDForum. Page generated in 0.05317 seconds