Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Initial/Default values
Initial/Default values [message #477233] Thu, 10 April 2008 15:17 Go to next message
Javi is currently offline JaviFriend
Messages: 8
Registered: July 2009
Junior Member
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 17:27 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
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 17:27 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
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.
>
>
>
>
Previous Topic:Using UML Standard profile with static profile
Next Topic:adding combinations of UML elements
Goto Forum:
  


Current Time: Sat Apr 20 03:49:36 GMT 2024

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

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

Back to the top