Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Teneo] Error when storing EAttribute
[Teneo] Error when storing EAttribute [message #916606] Wed, 19 September 2012 08:17 Go to next message
Appasamy Thirugnana is currently offline Appasamy ThirugnanaFriend
Messages: 27
Registered: September 2012
Junior Member
When I try to store the EAttribute( Name) of 'Writer' in sample Library Ecore provided I get the following error.

Exception in thread "main" java.lang.RuntimeException: The feature 'name' is not a valid changeable feature

Code:

writer.eSet(writer.getEStructuralFeature("name"), "Appasamy");


Also the changeable attribute of "name" is set to true. Still I am getting this error.

Please help in solving this. Thanks

[Updated on: Wed, 19 September 2012 08:33]

Report message to a moderator

Re: [Teneo] Error when storing EAttribute [message #916617 is a reply to message #916606] Wed, 19 September 2012 08:32 Go to previous messageGo to next message
Appasamy Thirugnana is currently offline Appasamy ThirugnanaFriend
Messages: 27
Registered: September 2012
Junior Member
[Updated description]

[Updated on: Wed, 19 September 2012 08:33]

Report message to a moderator

Re: [Teneo] Error when storing EAttribute [message #916629 is a reply to message #916617] Wed, 19 September 2012 08:49 Go to previous messageGo to next message
Appasamy Thirugnana is currently offline Appasamy ThirugnanaFriend
Messages: 27
Registered: September 2012
Junior Member
Sorry for spaming. It's my mistake and I found it.

writer.eSet(writer.getEStructuralFeature("name"), "Appasamy");

writer is of type EClass. I should create like this to solve this


writerObj.eSet(writerClass.getEStructuralFeature("name"), "Appasamy");

Re: [Teneo] Error when storing EAttribute [message #916744 is a reply to message #916629] Wed, 19 September 2012 11:59 Go to previous message
Mark Rowe is currently offline Mark RoweFriend
Messages: 23
Registered: January 2012
Junior Member
Hi, don't be sorry. Posting questions and answers like this is good for those of us who are learning!! Maybe I will google this point in a year's time and your answer will be right here!
Previous Topic:Sharing EMF objects between views
Next Topic:Docs and examples for EMF Fragment Paths?
Goto Forum:
  


Current Time: Thu Nov 27 09:53:36 GMT 2014

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

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