Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Ecore defaultValue for EByteArray or EFloat with multiplicities
Ecore defaultValue for EByteArray or EFloat with multiplicities [message #1226878] Thu, 02 January 2014 19:29 Go to next message
Klaus Meiner is currently offline Klaus Meiner
Messages: 6
Registered: January 2014
Junior Member
Hi,

I have a question regarding to the default values in an ecore model:

Is it possible to set a default value for an attribute of type
EByteArray 
(with upper and lower bound = 3) or for an attribute of type
EFloat
(with upper and lower bound = 3)?

When I try that I get only something like:

The default value literal ... must be a valid literal of the attribute's type.



Thanks, Meiner.
Re: Ecore defaultValue for EByteArray or EFloat with multiplicities [message #1227105 is a reply to message #1226878] Fri, 03 January 2014 10:02 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25918
Registered: July 2009
Senior Member
No, you can't specify default values for multi-valued features. In both
these cases, I suspect you should be defining an EDataType to represent
a byte[] or float "tuple" and then you're dealing again with a
single-valued feature which can have a default value.

On 03/01/2014 2:22 PM, Klaus Meiner wrote:
> Hi,
>
> I have a question regarding to the default values in an ecore model:
>
> Is it possible to set a default value for an attribute of type
> EByteArray (with upper and lower bound = 3) or for an attribute of
> type EFloat (with upper and lower bound = 3)?
>
> When I try that I get only something like:
>
> The default value literal ... must be a valid literal of the
> attribute's type.
>
>
> Thanks, Meiner.
Previous Topic:[EMF] [CDO] ResourceSet, EPackage registry question
Next Topic:[CDO] Connection Aware URI, how to use it in a ResourceSet
Goto Forum:
  


Current Time: Thu Jul 24 16:06:52 EDT 2014

Powered by FUDForum. Page generated in 0.02671 seconds