Skip to main content



      Home
Home » Modeling » EMF » [Xcore] How can I use *set* keyword
[Xcore] How can I use *set* keyword [message #894422] Mon, 09 July 2012 03:52 Go to next message
Eclipse UserFriend
consider below model:
class Person
{
	String firstName
	String lastName
	
	derived String fullName 
	get	{ 
		firstName + " " + lastName
	}
	set 	{
		var array = fullName.split(" ")
		firstName = array.get(0)
		lastName = array.get(1)
	}
}


Xcore generator seems to do not generate setter for feature in any case.

is it just reserved keyword?

I can define an operation for my purpose, but I don't want to increase pointless feature for readability.

And I want to define setter for non-derived feature too.
Because I want to fire notifications when derive feature value is invalid.


Thanks.
Re: [Xcore] How can I use *set* keyword [message #894441 is a reply to message #894422] Mon, 09 July 2012 05:10 Go to previous message
Eclipse UserFriend
Comments below.

On 09/07/2012 9:52 AM, Jeeeyul Lee wrote:
> consider below model:
>
> class Person
> {
> String firstName
> String lastName
>
> derived String fullName get { firstName + " " +
> lastName
> }
> set {
> var array = fullName.split(" ")
> firstName = array.get(0)
> lastName = array.get(1)
> }
> }
>
>
> Xcore generator seems to do not generate setter for feature in any case.
Yes, by default we make derived imply transient, volatile, and readonly
but haven't added keywords to specify the inverse of those things.
>
> is it just reserved keyword?
>
> I can define an operation for my purpose, but I don't want to increase
> pointless feature for readability.
>
> And I want to define setter for non-derived feature too.
That's not supported yet either.
> Because I want to fire notifications when derive feature value is
> invalid.
If you open a bugzilla, I'll explore what can be done for the next
release. Even derived multi-valued features are not working so nicely...
>
>
> Thanks.
Previous Topic:EMF Databinding
Next Topic:Copy and Paste from clipboard in EMF
Goto Forum:
  


Current Time: Sun Jul 13 09:44:56 EDT 2025

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

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

Back to the top