Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xtend]: definition of recursive extensions
[Xtend]: definition of recursive extensions [message #552249] Wed, 11 August 2010 12:47 Go to next message
El Arbi Aboussoror is currently offline El Arbi AboussororFriend
Messages: 90
Registered: June 2010
Member
Hello

I have an error on my ext file:
Couldn't find extension : getWebApp(c.eContainer)

I think it's related to:

DataTable getDataTable(Column col):
getDataTable(col.eContainer);
DataTable getDataTable(DataTable d):
d;
DataTable getDataTable(EObject e):
null;

I have also proble with the extend editor: it doesn't underline the wright line with the error.

Thanks
Re: [Xtend]: definition of recursive extensions [message #552256 is a reply to message #552249] Wed, 11 August 2010 13:04 Go to previous messageGo to next message
Darius Jockel is currently offline Darius JockelFriend
Messages: 63
Registered: July 2009
Member
ElArbi wrote on Wed, 11 August 2010 14:47
Hello

I have an error on my ext file:
Couldn't find extension : getWebApp(c.eContainer)

DataTable getDataTable(Column col):
getDataTable(col.eContainer);
DataTable getDataTable(DataTable d):
d;
DataTable getDataTable(EObject e):
null;


Copy & Paste error?
getWebApp != getDataTable
You need a extension like this:
getWebApp(Object o):
null;

Quote:

I have also proble with the extend editor: it doesn't underline the wright line with the error.


I have checked this with a little example. The extension is marked correct.
What does your editor do?

Regards
Darius
Re: [Xtend]: definition of recursive extensions [message #552693 is a reply to message #552256] Fri, 13 August 2010 08:17 Go to previous messageGo to next message
El Arbi Aboussoror is currently offline El Arbi AboussororFriend
Messages: 90
Registered: June 2010
Member
Excellent it works with Object e.g.:
DataTable getDataTable(Column col):
getDataTable(col.eContainer);
DataTable getDataTable(DataTable d):
d;
DataTable getDataTable(Object e):
null;


But why it is not working for EObject ?
Which metamodel is 'Object' from ?

thanks
Re: [Xtend]: definition of recursive extensions [message #552700 is a reply to message #552693] Fri, 13 August 2010 08:37 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
Hi,

Object is from the Xpand internal Typesystem.
EObject may not work since you may use ecore::EObject ??? but you have to use emf::EObject to get it working.
For analyzing the hierarchies the extensions .metaType and .metaType.superTypes may be useful.

Regards
Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Fri, 13 August 2010 08:40]

Report message to a moderator

Re: [Xtend]: definition of recursive extensions [message #553612 is a reply to message #552700] Wed, 18 August 2010 08:18 Go to previous messageGo to next message
El Arbi Aboussoror is currently offline El Arbi AboussororFriend
Messages: 90
Registered: June 2010
Member
You mean that the emf metamodel is not the ecore metamodel in eclipse?
Re: [Xtend]: definition of recursive extensions [message #553618 is a reply to message #553612] Wed, 18 August 2010 08:30 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
hi,

the namespace ecore is for working with the ecore itself: e.g. when processing an .ecore file as model and working with EClass EAttribute EReference and so on.

If you just want to refer to the parent of an instance these (e.g. an EClass Model) you have to use the namespace emf and therein emf::EObject - this is just a technical thing (cause every metaclass inherits from EObject)

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Wed, 18 August 2010 08:35]

Report message to a moderator

Previous Topic:[XPand / XText] Calling XPand template Generation from eclipse Plugin Event Handler
Next Topic:[JET] Output not placed under src
Goto Forum:
  


Current Time: Tue Apr 16 10:59:03 GMT 2024

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

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

Back to the top