Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xtend] Autocomplete / code completion problems
[Xtend] Autocomplete / code completion problems [message #543448] Tue, 29 June 2010 13:25 Go to next message
Abdull is currently offline Abdull
Messages: 32
Registered: May 2010
Member
Hello everybody,

I'm using Eclipse Helios. I've created a workflow that registers ecore-based metamodels using the registerEcoreFile function (that is, I'm not using registerGeneratedEPackage).

Now I'm about to create an Xtend transformation. I've imported all the (meta)metamodel namespaces which I would like to use.

import ecore;
import mymetamodel;

I noticed that the Xtend editor does not autocomplete any identifiers of mymetamodel in any context - i.e. I would expect the editor to suggest possible attributes and associations for any class/object while I'm typing. As far as I remember, this worked a year ago when I was using registerGeneratedEPackage (but maybe I was just dreaming back then ;-).

Any ideas how to turn on autocomplete if I want to stick to registerEcoreFile?

Re: [Xtend] Autocomplete / code completion problems [message #543471 is a reply to message #543448] Tue, 29 June 2010 14:26 Go to previous messageGo to next message
Darius Jockel is currently offline Darius Jockel
Messages: 63
Registered: July 2009
Member
Hello Abdull,

the Editor do not care about the workflow configuration.
You have to configure the metamodel provider in the Xtend/Xpand properties.
If you use only emf then the EMF Metamodelcontributor should be selected (it is by default).

Please also ensure that the metamodels are on classpath.

Rergards
Darius
Re: [Xtend] Autocomplete / code completion problems [message #543686 is a reply to message #543471] Wed, 30 June 2010 10:01 Go to previous messageGo to next message
Abdull is currently offline Abdull
Messages: 32
Registered: May 2010
Member
I love this forum... codecompletion now works - thank you!

I've added the projects containing my metamodels using Project -> Properties -> Java Build Path -> Libraries tab -> Add Class Folder...

I guess it does not suffice to only have a .ecore file within the class folder to activate codecompletion. Probably, to activate codecompletion, a user always has to go through deriving from this .ecore file an EMF Generator Model, then "Generate Model Code", which results in generating Java files in the folder "src", packages "mymetamodel", "mymetamodel.impl", and "mymetamodel.util" ... right?
Re: [Xtend] Autocomplete / code completion problems [message #543980 is a reply to message #543686] Thu, 01 July 2010 09:11 Go to previous message
Darius Jockel is currently offline Darius Jockel
Messages: 63
Registered: July 2009
Member
Abdull wrote on Wed, 30 June 2010 12:01
I love this forum... codecompletion now works - thank you!


Thank youvery much Smile

Quote:

I guess it does not suffice to only have a .ecore file within the class folder to activate codecompletion. Probably, to activate codecompletion, a user always has to go through deriving from this .ecore file an EMF Generator Model, then "Generate Model Code", which results in generating Java files in the folder "src", packages "mymetamodel", "mymetamodel.impl", and "mymetamodel.util" ... right?

No the ecore is sufficient.

Reagrds
Darius
Previous Topic:[Acceleo] Import UML Profile to use in templates
Next Topic:[Xpand2, Xtend] Collection API small error
Goto Forum:
  


Current Time: Sat Oct 25 22:49:23 GMT 2014

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

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