Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Number format exception in genrated editor for feature with ExtendetMetaData
Number format exception in genrated editor for feature with ExtendetMetaData [message #425706] Fri, 05 December 2008 11:20 Go to next message
Torsten Link is currently offline Torsten LinkFriend
Messages: 51
Registered: July 2009
Member
Hello,

in my model I have a feature EInt with an annotation
ExtendedMetaData with a details entry
totalDigits -> 11

when now editing this feature in the editor
I am allowed to enter 10 digits. With entering the
11th digits I get the number format exception.

When changing the totalDigits to an other number
I can enter totalDigits-1.

By the way, where can I look up which entries
for ExtendetMetaData are possible?


Thank you


Torsten Link
Re: Number format exception in genrated editor for feature with ExtendetMetaData [message #425711 is a reply to message #425706] Fri, 05 December 2008 11:50 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30911
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010102040904070400000805
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Torsten,

Comments below.

Torsten Link wrote:
> Hello,
>
> in my model I have a feature EInt with an annotation
> ExtendedMetaData with a details entry
> totalDigits -> 11
>
Such an EAnnotation only makes sense on an EDataType and will be
ignored when it's on a feature.
> when now editing this feature in the editor
> I am allowed to enter 10 digits.
How many digits can an int represent?
> With entering the
> 11th digits I get the number format exception.
>
If you see a number format exception, that's produced by Java because
the number cannot be parsed. If you total digits thing was having an
impact, you'd see a nice message of the form "The value '...." must have
at most 5 digits.
> When changing the totalDigits to an other number
> I can enter totalDigits-1.
>
I'm doubtful of this claim. I think this is assumed behavior, not
actual behavior, given that the annotation actually has no impact where
you put it.
> By the way, where can I look up which entries
> for ExtendetMetaData are possible?
>
This document describes the annotations produced from a schema and while
you can add those annotations to any model, they can only be used in the
same context in which they would appear if your model had started out as
a schema.

XML Schema to Ecore Mapping
< http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf>

>
> Thank you
>
>
> Torsten Link
>

--------------010102040904070400000805
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Torsten,<br>
<br>
Comments below. <br>
<br>
Torsten Link wrote:
<blockquote cite="mid:hdfn06-cb8.ln1@link-lap.qatools.de" type="cite">
<pre wrap="">Hello,

in my model I have a feature EInt with an annotation
ExtendedMetaData with a details entry
totalDigits -&gt; 11
</pre>
</blockquote>
Such an EAnnotation only&nbsp; makes sense on an EDataType and will be
ignored when it's on a feature.<br>
<blockquote cite="mid:hdfn06-cb8.ln1@link-lap.qatools.de" type="cite">
<pre wrap="">
when now editing this feature in the editor
I am allowed to enter 10 digits. </pre>
</blockquote>
How many digits can an int represent?<br>
<blockquote cite="mid:hdfn06-cb8.ln1@link-lap.qatools.de" type="cite">
<pre wrap="">With entering the
11th digits I get the number format exception.
</pre>
</blockquote>
If you see a number format exception, that's produced by Java because
the number cannot be parsed.&nbsp; If you total digits thing was having an
impact, you'd see a nice message of the form "The value '...." must
have at most 5 digits.<br>
<blockquote cite="mid:hdfn06-cb8.ln1@link-lap.qatools.de" type="cite">
<pre wrap="">
When changing the totalDigits to an other number
I can enter totalDigits-1.
</pre>
</blockquote>
I'm doubtful of this claim.&nbsp; I think this is assumed behavior, not
actual behavior, given that the annotation actually has no impact where
you put it.<br>
<blockquote cite="mid:hdfn06-cb8.ln1@link-lap.qatools.de" type="cite">
<pre wrap="">
By the way, where can I look up which entries
for ExtendetMetaData are possible?
</pre>
</blockquote>
This document describes the annotations produced from a schema and
while you can add those annotations to any model, they can only be used
in the same context in which they would appear if your model had
started out as a schema.<br>
<blockquote><a
href=" http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf">XML
Schema to Ecore Mapping</a></blockquote>
<blockquote cite="mid:hdfn06-cb8.ln1@link-lap.qatools.de" type="cite">
<pre wrap="">

Thank you


Torsten Link
</pre>
</blockquote>
</body>
</html>

--------------010102040904070400000805--
Re: Number format exception in genrated editor for feature with ExtendetMetaData [message #425720 is a reply to message #425711] Fri, 05 December 2008 13:21 Go to previous message
Torsten Link is currently offline Torsten LinkFriend
Messages: 51
Registered: July 2009
Member
Hi Ed,

sorry it was accidently that this behavior appear.
The first Time with 10 Digits I enter a number starting
with 9, than I increase the digits and start my number with
1. So it is the Integer which causes the problem.

Thanks

Ed Merks wrote:

> Torsten,
>
> Comments below.
>
> Torsten Link wrote:
>> Hello,
>>
>> in my model I have a feature EInt with an annotation
>> ExtendedMetaData with a details entry
>> totalDigits -> 11
>>
> Such an EAnnotation only makes sense on an EDataType and will be
> ignored when it's on a feature.
>> when now editing this feature in the editor
>> I am allowed to enter 10 digits.
> How many digits can an int represent?
>> With entering the
>> 11th digits I get the number format exception.
>>
> If you see a number format exception, that's produced by Java because
> the number cannot be parsed. If you total digits thing was having an
> impact, you'd see a nice message of the form "The value '...." must have
> at most 5 digits.
>> When changing the totalDigits to an other number
>> I can enter totalDigits-1.
>>
> I'm doubtful of this claim. I think this is assumed behavior, not
> actual behavior, given that the annotation actually has no impact where
> you put it.
>> By the way, where can I look up which entries
>> for ExtendetMetaData are possible?
>>
> This document describes the annotations produced from a schema and while
> you can add those annotations to any model, they can only be used in the
> same context in which they would appear if your model had started out as
> a schema.
>
> XML Schema to Ecore Mapping
>
< http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf>
>
>>
>> Thank you
>>
>>
>> Torsten Link
>>
Previous Topic:How to cross reference between models.
Next Topic:ExtendedMetaData and inheritance
Goto Forum:
  


Current Time: Wed Feb 26 16:23:32 GMT 2020

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

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

Back to the top