Initial/Default values [message #477233] |
Thu, 10 April 2008 11:17  |
Eclipse User |
|
|
|
Is it possible to define a default/initial value for a "complex" (not
string, integer,...) type and get the code for the initialization.
I'm interested in 2 "complex" types:
- <PrimitiveType> <<eDataType>> java.util.Date
new Date(1/1/2000);
- <Class> Car
new Car(4); // wheels=4
I tried to use InstanceSpecification but get nothing.
Thank you.
|
|
|
Re: Initial/Default values [message #477237 is a reply to message #477233] |
Fri, 11 April 2008 13:27  |
Eclipse User |
|
|
|
It doesn't appear that this is supported currently. Converting
InstanceSpecifications to Ecore is definitely not handled.
You might consider custom code generation templates for now.
Cheers,
- James.
"Javi" <jfbriones@yahoo.com> wrote in message
news:19d64311544e9b0f572b851a73b8402a$1@www.eclipse.org...
> Is it possible to define a default/initial value for a "complex" (not
> string, integer,...) type and get the code for the initialization.
>
> I'm interested in 2 "complex" types:
> - <PrimitiveType> <<eDataType>> java.util.Date
> new Date(1/1/2000);
> - <Class> Car
> new Car(4); // wheels=4
>
> I tried to use InstanceSpecification but get nothing.
>
> Thank you.
>
>
>
>
|
|
|
Re: Initial/Default values [message #626395 is a reply to message #477233] |
Fri, 11 April 2008 13:27  |
Eclipse User |
|
|
|
It doesn't appear that this is supported currently. Converting
InstanceSpecifications to Ecore is definitely not handled.
You might consider custom code generation templates for now.
Cheers,
- James.
"Javi" <jfbriones@yahoo.com> wrote in message
news:19d64311544e9b0f572b851a73b8402a$1@www.eclipse.org...
> Is it possible to define a default/initial value for a "complex" (not
> string, integer,...) type and get the code for the initialization.
>
> I'm interested in 2 "complex" types:
> - <PrimitiveType> <<eDataType>> java.util.Date
> new Date(1/1/2000);
> - <Class> Car
> new Car(4); // wheels=4
>
> I tried to use InstanceSpecification but get nothing.
>
> Thank you.
>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02641 seconds