Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [xtend] Couldn't find operation 'setName(type::String)' for type 'cakefeed::BFBType'
[xtend] Couldn't find operation 'setName(type::String)' for type 'cakefeed::BFBType' [message #509961] Mon, 25 January 2010 17:02 Go to next message
No real name is currently offline No real nameFriend
Messages: 62
Registered: July 2009
Member
Hi,

I have a problem with xtend: I wrote the following transformations:

------------------------------------------------------------ ------------
1 import cakefeed;
2 import functionblocks;
3
4 create BFBDiagram toBFBDiagram(functionblocks::FBType fbtype):
5 this.setBFBType(fbtype.toBFBType()) //This method (setBFBType) is found
6 ;
7
8 create BFBType toBFBType(functionblocks::FBType fbtype):
9 this.setName(fbtype.name) //But this (setName) is not
10 ;
------------------------------------------------------------ ------------

I always get the message 'Couldn't find operation
'setName(type::String)' for type 'cakefeed::BFBType' in line 9. However,
in line 5 I do not have that problem.

Both models are exported correctly as far as I can tell. The
generated_package extensions are there, the projects with the ecore and
genmodels are in the dependencies, those projects export their generated
model code and the model folders are declared as source folders.

I have no idea what could be wrong here. Can you help me?

Thanks,
Matthias
Re: [xtend] Couldn't find operation 'setName(type::String)' for type 'cakefeed::BFBType' [message #510029 is a reply to message #509961] Tue, 26 January 2010 09:34 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
You'll have to use ecore::EString instead of your custom type::String in
your Ecore model.

Sven

Matthias Schmeling schrieb:
> Hi,
>
> I have a problem with xtend: I wrote the following transformations:
>
> ------------------------------------------------------------ ------------
> 1 import cakefeed;
> 2 import functionblocks;
> 3
> 4 create BFBDiagram toBFBDiagram(functionblocks::FBType fbtype):
> 5 this.setBFBType(fbtype.toBFBType()) //This method (setBFBType) is found
> 6 ;
> 7
> 8 create BFBType toBFBType(functionblocks::FBType fbtype):
> 9 this.setName(fbtype.name) //But this (setName) is not
> 10 ;
> ------------------------------------------------------------ ------------
>
> I always get the message 'Couldn't find operation
> 'setName(type::String)' for type 'cakefeed::BFBType' in line 9. However,
> in line 5 I do not have that problem.
>
> Both models are exported correctly as far as I can tell. The
> generated_package extensions are there, the projects with the ecore and
> genmodels are in the dependencies, those projects export their generated
> model code and the model folders are declared as source folders.
>
> I have no idea what could be wrong here. Can you help me?
>
> Thanks,
> Matthias


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: [xtend] Couldn't find operation 'setName(type::String)' for type 'cakefeed::BFBType' [message #510258 is a reply to message #510029] Wed, 27 January 2010 00:08 Go to previous message
No real name is currently offline No real nameFriend
Messages: 62
Registered: July 2009
Member
Hi Sven,

thank you for your quick reply. In my ecore model there is only one type
of String I can select for attributes and it is
EString[java.lang.String]. This is the type that is selected for
FBType.name. But I still get the error message.

Should there be more types of String available?

Sven Efftinge wrote:
> You'll have to use ecore::EString instead of your custom type::String in
> your Ecore model.
>
> Sven
>
> Matthias Schmeling schrieb:
>> Hi,
>>
>> I have a problem with xtend: I wrote the following transformations:
>>
>> ------------------------------------------------------------ ------------
>> 1 import cakefeed;
>> 2 import functionblocks;
>> 3
>> 4 create BFBDiagram toBFBDiagram(functionblocks::FBType fbtype):
>> 5 this.setBFBType(fbtype.toBFBType()) //This method (setBFBType) is
>> found
>> 6 ;
>> 7
>> 8 create BFBType toBFBType(functionblocks::FBType fbtype):
>> 9 this.setName(fbtype.name) //But this (setName) is not
>> 10 ;
>> ------------------------------------------------------------ ------------
>>
>> I always get the message 'Couldn't find operation
>> 'setName(type::String)' for type 'cakefeed::BFBType' in line 9.
>> However, in line 5 I do not have that problem.
>>
>> Both models are exported correctly as far as I can tell. The
>> generated_package extensions are there, the projects with the ecore
>> and genmodels are in the dependencies, those projects export their
>> generated model code and the model folders are declared as source
>> folders.
>>
>> I have no idea what could be wrong here. Can you help me?
>>
>> Thanks,
>> Matthias
>
>
Previous Topic:[JET] Break or continue for <c:iterate>
Next Topic:Is XSD adapter compatible with Xpand2 0.8M4?
Goto Forum:
  


Current Time: Tue Oct 15 16:08:37 GMT 2024

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

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

Back to the top