Skip to main content



      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 12:02 Go to next message
Eclipse UserFriend
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 04:34 Go to previous messageGo to next message
Eclipse UserFriend
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] Tue, 26 January 2010 19:08 Go to previous message
Eclipse UserFriend
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: Fri Jul 25 05:44:35 EDT 2025

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

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

Back to the top