Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [XCore] default value
[XCore] default value [message #1052964] Wed, 01 May 2013 15:30 Go to next message
Martin  odloucký is currently offline Martin odloucký
Messages: 49
Registered: July 2010
Member
Hi,

is there a possiblity in XCore to create default values for references? A would like to do something like this

class A {
int x
}

class B {
contains A a = new A
}

If not, is there a possibility to do it somehow without touching the generated code?

thanks.
Re: [XCore] default value [message #1052983 is a reply to message #1052964] Wed, 01 May 2013 17:23 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26150
Registered: July 2009
Senior Member
Martin,

No, you can't set default values for EReferences. Best not to try that
even in hand modified.


On 01/05/2013 5:30 PM, Martin odloucký wrote:
> Hi,
> is there a possiblity in XCore to create default values for
> references? A would like to do something like this
>
> class A {
> int x
> }
>
> class B {
> contains A a = new A
> }
>
> If not, is there a possibility to do it somehow without touching the
> generated code?
>
> thanks.
Previous Topic:Saving EMF Resources
Next Topic:Initialize EMF node with default name
Goto Forum:
  


Current Time: Thu Oct 30 15:19:14 GMT 2014

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

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