Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » How to create Arrays in UML2?
How to create Arrays in UML2? [message #472865] Sun, 06 May 2007 22:41 Go to next message
Pradeep is currently offline PradeepFriend
Messages: 54
Registered: July 2009
Member
Hi,

How do I specify a simple array in UML2 and then in EMF.


class A {

int[] myArray;

}

If I set "upper" property to Star, It's kind of converting it to EList.


Thanks
Pradeep
Re: How to create Arrays in UML2? [message #472873 is a reply to message #472865] Tue, 08 May 2007 12:23 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Pradeep,

Not sure if this is what you're looking for, but there is a code generator
option called 'Array Accessors' which will generate array-oriented accessors
for your features. Otherwise, there's no way to indicate that a UML property
is an array (or a list, for that matter) - this is typically considered an
implementation detail...

Kenn

"Pradeep" <eclipseuser123@yahoo.com> wrote in message
news:f1lljg$f87$1@build.eclipse.org...
> Hi,
>
> How do I specify a simple array in UML2 and then in EMF.
>
>
> class A {
>
> int[] myArray;
>
> }
>
> If I set "upper" property to Star, It's kind of converting it to EList.
>
>
> Thanks
> Pradeep
>
>
Re: How to create Arrays in UML2? [message #472874 is a reply to message #472873] Tue, 08 May 2007 12:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33217
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020502020708010009060208
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Kenn,

This would result in Integer [] not int[]. Can't he define a data type
with a stereo type that lets him specify int[] as the instance class
name? (I.e., something just like we have for Ecore's EByteArray.)


Kenn Hussey wrote:
> Pradeep,
>
> Not sure if this is what you're looking for, but there is a code generator
> option called 'Array Accessors' which will generate array-oriented accessors
> for your features. Otherwise, there's no way to indicate that a UML property
> is an array (or a list, for that matter) - this is typically considered an
> implementation detail...
>
> Kenn
>
> "Pradeep" <eclipseuser123@yahoo.com> wrote in message
> news:f1lljg$f87$1@build.eclipse.org...
>
>> Hi,
>>
>> How do I specify a simple array in UML2 and then in EMF.
>>
>>
>> class A {
>>
>> int[] myArray;
>>
>> }
>>
>> If I set "upper" property to Star, It's kind of converting it to EList.
>>
>>
>> Thanks
>> Pradeep
>>
>>
>>
>
>
>


--------------020502020708010009060208
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">
</head>
<body bgcolor="#ffffff" text="#000000">
Kenn,<br>
<br>
This would result in Integer [] not int[].&nbsp; Can't he define a data type
with a stereo type that lets him specify int[] as the instance class
name?&nbsp; (I.e., something just like we have for Ecore's EByteArray.)<br>
<br>
<br>
Kenn Hussey wrote:
<blockquote cite="midf1pq3c$hhd$1@build.eclipse.org" type="cite">
<pre wrap="">Pradeep,

Not sure if this is what you're looking for, but there is a code generator
option called 'Array Accessors' which will generate array-oriented accessors
for your features. Otherwise, there's no way to indicate that a UML property
is an array (or a list, for that matter) - this is typically considered an
implementation detail...

Kenn

"Pradeep" <a class="moz-txt-link-rfc2396E" href="mailto:eclipseuser123@yahoo.com">&lt;eclipseuser123@yahoo.com&gt;</a> wrote in message
<a class="moz-txt-link-freetext" href="news:f1lljg$f87$1@build.eclipse.org">news:f1lljg$f87$1@build.eclipse.org</a>...
</pre>
<blockquote type="cite">
<pre wrap="">Hi,

How do I specify a simple array in UML2 and then in EMF.


class A {

int[] myArray;

}

If I set "upper" property to Star, It's kind of converting it to EList.


Thanks
Pradeep


</pre>
</blockquote>
<pre wrap=""><!---->

</pre>
</blockquote>
<br>
</body>
</html>

--------------020502020708010009060208--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to create Arrays in UML2? [message #472875 is a reply to message #472873] Tue, 08 May 2007 12:35 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Pradeep,

In addition to Kenn's sugestion, one thought might be to use template
bindings to a generic list or array. For the formal parameter of the list
you could substitue the UML primitive type integer. That won't exactly
produce the result you are looking for but could be one way to create a list
of integers.

Cheers,

- James.

"Kenn Hussey" <khussey@ca.ibm.com> wrote in message
news:f1pq3c$hhd$1@build.eclipse.org...
> Pradeep,
>
> Not sure if this is what you're looking for, but there is a code generator
> option called 'Array Accessors' which will generate array-oriented
> accessors for your features. Otherwise, there's no way to indicate that a
> UML property is an array (or a list, for that matter) - this is typically
> considered an implementation detail...
>
> Kenn
>
> "Pradeep" <eclipseuser123@yahoo.com> wrote in message
> news:f1lljg$f87$1@build.eclipse.org...
>> Hi,
>>
>> How do I specify a simple array in UML2 and then in EMF.
>>
>>
>> class A {
>>
>> int[] myArray;
>>
>> }
>>
>> If I set "upper" property to Star, It's kind of converting it to EList.
>>
>>
>> Thanks
>> Pradeep
>>
>>
>
>
Re: How to create Arrays in UML2? [message #472876 is a reply to message #472874] Tue, 08 May 2007 13:06 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0244_01C79150.2693A550
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Ooops, I overlooked that subtlety (thanks, Ed). Yes, of course that's =
possible using the EDataType stereotype.

Kenn
"Ed Merks" <merks@ca.ibm.com> wrote in message =
news:f1pqgg$i3j$1@build.eclipse.org...
Kenn,

This would result in Integer [] not int[]. Can't he define a data =
type with a stereo type that lets him specify int[] as the instance =
class name? (I.e., something just like we have for Ecore's EByteArray.)


Kenn Hussey wrote:=20
Pradeep,

Not sure if this is what you're looking for, but there is a code =
generator=20
option called 'Array Accessors' which will generate array-oriented =
accessors=20
for your features. Otherwise, there's no way to indicate that a UML =
property=20
is an array (or a list, for that matter) - this is typically considered =
an=20
implementation detail...

Kenn

"Pradeep" <eclipseuser123@yahoo.com> wrote in message=20
news:f1lljg$f87$1@build.eclipse.org...
Hi,

How do I specify a simple array in UML2 and then in EMF.


class A {

int[] myArray;

}

If I set "upper" property to Star, It's kind of converting it to EList.


Thanks
Pradeep


=20

=20

------=_NextPart_000_0244_01C79150.2693A550
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-1>
<META content=3D"MSHTML 6.00.2900.3059" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Ooops, I overlooked that subtlety =
(thanks, Ed).=20
Yes, of course that's possible using the EDataType =
stereotype.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Ed Merks" &lt;<A =
href=3D"mailto:merks@ca.ibm.com">merks@ca.ibm.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:f1pqgg$i3j$1@build.eclipse.org">news:f1pqgg$i3j$1@build.ecli=
pse.org</A>...</DIV>Kenn,<BR><BR>This=20
would result in Integer [] not int[].&nbsp; Can't he define a data =
type with a=20
stereo type that lets him specify int[] as the instance class =
name?&nbsp;=20
(I.e., something just like we have for Ecore's =
EByteArray.)<BR><BR><BR>Kenn=20
Hussey wrote:=20
<BLOCKQUOTE cite=3Dmidf1pq3c$hhd$1@build.eclipse.org =
type=3D"cite"><PRE wrap=3D"">Pradeep,

Not sure if this is what you're looking for, but there is a code =
generator=20
option called 'Array Accessors' which will generate array-oriented =
accessors=20
for your features. Otherwise, there's no way to indicate that a UML =
property=20
is an array (or a list, for that matter) - this is typically considered =
an=20
implementation detail...

Kenn

"Pradeep" <A class=3Dmoz-txt-link-rfc2396E =
href=3D"mailto:eclipseuser123@yahoo.com">&lt;eclipseuser123@yahoo.com&gt;=
</A> wrote in message=20
<A class=3Dmoz-txt-link-freetext =
href=3D"news:f1lljg$f87$1@build.eclipse.org">news:f1lljg$f87$1@build.ecli=
pse.org</A>...
</PRE>
<BLOCKQUOTE type=3D"cite"><PRE wrap=3D"">Hi,

How do I specify a simple array in UML2 and then in EMF.


class A {

int[] myArray;

}

If I set "upper" property to Star, It's kind of converting it to EList.


Thanks
Pradeep


</PRE></BLOCKQUOTE><PRE wrap=3D""><!---->

</PRE></BLOCKQUOTE><BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0244_01C79150.2693A550--
Re: How to create Arrays in UML2? [message #472878 is a reply to message #472876] Tue, 08 May 2007 23:32 Go to previous message
Pradeep is currently offline PradeepFriend
Messages: 54
Registered: July 2009
Member
This is a multi-part message in MIME format.

------=_NextPart_000_0096_01C7918E.77BE1D00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Thanks Ed. That worked.


Pradeep
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:f1pskf$va8$1@build.eclipse.org...
Ooops, I overlooked that subtlety (thanks, Ed). Yes, of course that's =
possible using the EDataType stereotype.

Kenn
"Ed Merks" <merks@ca.ibm.com> wrote in message =
news:f1pqgg$i3j$1@build.eclipse.org...
Kenn,

This would result in Integer [] not int[]. Can't he define a data =
type with a stereo type that lets him specify int[] as the instance =
class name? (I.e., something just like we have for Ecore's EByteArray.)


Kenn Hussey wrote:=20
Pradeep,

Not sure if this is what you're looking for, but there is a code =
generator=20
option called 'Array Accessors' which will generate array-oriented =
accessors=20
for your features. Otherwise, there's no way to indicate that a UML =
property=20
is an array (or a list, for that matter) - this is typically considered =
an=20
implementation detail...

Kenn

"Pradeep" <eclipseuser123@yahoo.com> wrote in message=20
news:f1lljg$f87$1@build.eclipse.org...
Hi,

How do I specify a simple array in UML2 and then in EMF.


class A {

int[] myArray;

}

If I set "upper" property to Star, It's kind of converting it to EList.


Thanks
Pradeep


=20

=20

------=_NextPart_000_0096_01C7918E.77BE1D00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-1>
<META content=3D"MSHTML 6.00.6000.16414" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>Thanks Ed. That worked.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Pradeep</FONT></DIV></FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote in =
message=20
<A=20
=
href=3D"news:f1pskf$va8$1@build.eclipse.org">news:f1pskf$va8$1@build.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Ooops, I overlooked that subtlety =
(thanks, Ed).=20
Yes, of course that's possible using the EDataType =
stereotype.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Ed Merks" &lt;<A=20
href=3D"mailto:merks@ca.ibm.com">merks@ca.ibm.com</A>&gt; wrote in =
message <A=20
=
href=3D"news:f1pqgg$i3j$1@build.eclipse.org">news:f1pqgg$i3j$1@build.ecli=
pse.org</A>...</DIV>Kenn,<BR><BR>This=20
would result in Integer [] not int[].&nbsp; Can't he define a data =
type with=20
a stereo type that lets him specify int[] as the instance class =
name?&nbsp;=20
(I.e., something just like we have for Ecore's =
EByteArray.)<BR><BR><BR>Kenn=20
Hussey wrote:=20
<BLOCKQUOTE cite=3Dmidf1pq3c$hhd$1@build.eclipse.org =
type=3D"cite"><PRE wrap=3D"">Pradeep,

Not sure if this is what you're looking for, but there is a code =
generator=20
option called 'Array Accessors' which will generate array-oriented =
accessors=20
for your features. Otherwise, there's no way to indicate that a UML =
property=20
is an array (or a list, for that matter) - this is typically considered =
an=20
implementation detail...

Kenn

"Pradeep" <A class=3Dmoz-txt-link-rfc2396E =
href=3D"mailto:eclipseuser123@yahoo.com">&lt;eclipseuser123@yahoo.com&gt;=
</A> wrote in message=20
<A class=3Dmoz-txt-link-freetext =
href=3D"news:f1lljg$f87$1@build.eclipse.org">news:f1lljg$f87$1@build.ecli=
pse.org</A>...
</PRE>
<BLOCKQUOTE type=3D"cite"><PRE wrap=3D"">Hi,

How do I specify a simple array in UML2 and then in EMF.


class A {

int[] myArray;

}

If I set "upper" property to Star, It's kind of converting it to EList.


Thanks
Pradeep


</PRE></BLOCKQUOTE><PRE wrap=3D""><!---->

</PRE></BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BODY ></HTML>

------=_NextPart_000_0096_01C7918E.77BE1D00--
Re: How to create Arrays in UML2? [message #614508 is a reply to message #472865] Tue, 08 May 2007 12:23 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Pradeep,

Not sure if this is what you're looking for, but there is a code generator
option called 'Array Accessors' which will generate array-oriented accessors
for your features. Otherwise, there's no way to indicate that a UML property
is an array (or a list, for that matter) - this is typically considered an
implementation detail...

Kenn

"Pradeep" <eclipseuser123@yahoo.com> wrote in message
news:f1lljg$f87$1@build.eclipse.org...
> Hi,
>
> How do I specify a simple array in UML2 and then in EMF.
>
>
> class A {
>
> int[] myArray;
>
> }
>
> If I set "upper" property to Star, It's kind of converting it to EList.
>
>
> Thanks
> Pradeep
>
>
Re: How to create Arrays in UML2? [message #614512 is a reply to message #472873] Tue, 08 May 2007 12:30 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33217
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020502020708010009060208
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Kenn,

This would result in Integer [] not int[]. Can't he define a data type
with a stereo type that lets him specify int[] as the instance class
name? (I.e., something just like we have for Ecore's EByteArray.)


Kenn Hussey wrote:
> Pradeep,
>
> Not sure if this is what you're looking for, but there is a code generator
> option called 'Array Accessors' which will generate array-oriented accessors
> for your features. Otherwise, there's no way to indicate that a UML property
> is an array (or a list, for that matter) - this is typically considered an
> implementation detail...
>
> Kenn
>
> "Pradeep" <eclipseuser123@yahoo.com> wrote in message
> news:f1lljg$f87$1@build.eclipse.org...
>
>> Hi,
>>
>> How do I specify a simple array in UML2 and then in EMF.
>>
>>
>> class A {
>>
>> int[] myArray;
>>
>> }
>>
>> If I set "upper" property to Star, It's kind of converting it to EList.
>>
>>
>> Thanks
>> Pradeep
>>
>>
>>
>
>
>


--------------020502020708010009060208
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">
</head>
<body bgcolor="#ffffff" text="#000000">
Kenn,<br>
<br>
This would result in Integer [] not int[].&nbsp; Can't he define a data type
with a stereo type that lets him specify int[] as the instance class
name?&nbsp; (I.e., something just like we have for Ecore's EByteArray.)<br>
<br>
<br>
Kenn Hussey wrote:
<blockquote cite="midf1pq3c$hhd$1@build.eclipse.org" type="cite">
<pre wrap="">Pradeep,

Not sure if this is what you're looking for, but there is a code generator
option called 'Array Accessors' which will generate array-oriented accessors
for your features. Otherwise, there's no way to indicate that a UML property
is an array (or a list, for that matter) - this is typically considered an
implementation detail...

Kenn

"Pradeep" <a class="moz-txt-link-rfc2396E" href="mailto:eclipseuser123@yahoo.com">&lt;eclipseuser123@yahoo.com&gt;</a> wrote in message
<a class="moz-txt-link-freetext" href="news:f1lljg$f87$1@build.eclipse.org">news:f1lljg$f87$1@build.eclipse.org</a>...
</pre>
<blockquote type="cite">
<pre wrap="">Hi,

How do I specify a simple array in UML2 and then in EMF.


class A {

int[] myArray;

}

If I set "upper" property to Star, It's kind of converting it to EList.


Thanks
Pradeep


</pre>
</blockquote>
<pre wrap=""><!---->

</pre>
</blockquote>
<br>
</body>
</html>

--------------020502020708010009060208--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to create Arrays in UML2? [message #614514 is a reply to message #472873] Tue, 08 May 2007 12:35 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Pradeep,

In addition to Kenn's sugestion, one thought might be to use template
bindings to a generic list or array. For the formal parameter of the list
you could substitue the UML primitive type integer. That won't exactly
produce the result you are looking for but could be one way to create a list
of integers.

Cheers,

- James.

"Kenn Hussey" <khussey@ca.ibm.com> wrote in message
news:f1pq3c$hhd$1@build.eclipse.org...
> Pradeep,
>
> Not sure if this is what you're looking for, but there is a code generator
> option called 'Array Accessors' which will generate array-oriented
> accessors for your features. Otherwise, there's no way to indicate that a
> UML property is an array (or a list, for that matter) - this is typically
> considered an implementation detail...
>
> Kenn
>
> "Pradeep" <eclipseuser123@yahoo.com> wrote in message
> news:f1lljg$f87$1@build.eclipse.org...
>> Hi,
>>
>> How do I specify a simple array in UML2 and then in EMF.
>>
>>
>> class A {
>>
>> int[] myArray;
>>
>> }
>>
>> If I set "upper" property to Star, It's kind of converting it to EList.
>>
>>
>> Thanks
>> Pradeep
>>
>>
>
>
Re: How to create Arrays in UML2? [message #614517 is a reply to message #472874] Tue, 08 May 2007 13:06 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0244_01C79150.2693A550
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Ooops, I overlooked that subtlety (thanks, Ed). Yes, of course that's =
possible using the EDataType stereotype.

Kenn
"Ed Merks" <merks@ca.ibm.com> wrote in message =
news:f1pqgg$i3j$1@build.eclipse.org...
Kenn,

This would result in Integer [] not int[]. Can't he define a data =
type with a stereo type that lets him specify int[] as the instance =
class name? (I.e., something just like we have for Ecore's EByteArray.)


Kenn Hussey wrote:=20
Pradeep,

Not sure if this is what you're looking for, but there is a code =
generator=20
option called 'Array Accessors' which will generate array-oriented =
accessors=20
for your features. Otherwise, there's no way to indicate that a UML =
property=20
is an array (or a list, for that matter) - this is typically considered =
an=20
implementation detail...

Kenn

"Pradeep" <eclipseuser123@yahoo.com> wrote in message=20
news:f1lljg$f87$1@build.eclipse.org...
Hi,

How do I specify a simple array in UML2 and then in EMF.


class A {

int[] myArray;

}

If I set "upper" property to Star, It's kind of converting it to EList.


Thanks
Pradeep


=20

=20

------=_NextPart_000_0244_01C79150.2693A550
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-1>
<META content=3D"MSHTML 6.00.2900.3059" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Ooops, I overlooked that subtlety =
(thanks, Ed).=20
Yes, of course that's possible using the EDataType =
stereotype.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Ed Merks" &lt;<A =
href=3D"mailto:merks@ca.ibm.com">merks@ca.ibm.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:f1pqgg$i3j$1@build.eclipse.org">news:f1pqgg$i3j$1@build.ecli=
pse.org</A>...</DIV>Kenn,<BR><BR>This=20
would result in Integer [] not int[].&nbsp; Can't he define a data =
type with a=20
stereo type that lets him specify int[] as the instance class =
name?&nbsp;=20
(I.e., something just like we have for Ecore's =
EByteArray.)<BR><BR><BR>Kenn=20
Hussey wrote:=20
<BLOCKQUOTE cite=3Dmidf1pq3c$hhd$1@build.eclipse.org =
type=3D"cite"><PRE wrap=3D"">Pradeep,

Not sure if this is what you're looking for, but there is a code =
generator=20
option called 'Array Accessors' which will generate array-oriented =
accessors=20
for your features. Otherwise, there's no way to indicate that a UML =
property=20
is an array (or a list, for that matter) - this is typically considered =
an=20
implementation detail...

Kenn

"Pradeep" <A class=3Dmoz-txt-link-rfc2396E =
href=3D"mailto:eclipseuser123@yahoo.com">&lt;eclipseuser123@yahoo.com&gt;=
</A> wrote in message=20
<A class=3Dmoz-txt-link-freetext =
href=3D"news:f1lljg$f87$1@build.eclipse.org">news:f1lljg$f87$1@build.ecli=
pse.org</A>...
</PRE>
<BLOCKQUOTE type=3D"cite"><PRE wrap=3D"">Hi,

How do I specify a simple array in UML2 and then in EMF.


class A {

int[] myArray;

}

If I set "upper" property to Star, It's kind of converting it to EList.


Thanks
Pradeep


</PRE></BLOCKQUOTE><PRE wrap=3D""><!---->

</PRE></BLOCKQUOTE><BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0244_01C79150.2693A550--
Re: How to create Arrays in UML2? [message #615684 is a reply to message #472876] Tue, 08 May 2007 23:32 Go to previous message
Pradeep is currently offline PradeepFriend
Messages: 54
Registered: July 2009
Member
This is a multi-part message in MIME format.

------=_NextPart_000_0096_01C7918E.77BE1D00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Thanks Ed. That worked.


Pradeep
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:f1pskf$va8$1@build.eclipse.org...
Ooops, I overlooked that subtlety (thanks, Ed). Yes, of course that's =
possible using the EDataType stereotype.

Kenn
"Ed Merks" <merks@ca.ibm.com> wrote in message =
news:f1pqgg$i3j$1@build.eclipse.org...
Kenn,

This would result in Integer [] not int[]. Can't he define a data =
type with a stereo type that lets him specify int[] as the instance =
class name? (I.e., something just like we have for Ecore's EByteArray.)


Kenn Hussey wrote:=20
Pradeep,

Not sure if this is what you're looking for, but there is a code =
generator=20
option called 'Array Accessors' which will generate array-oriented =
accessors=20
for your features. Otherwise, there's no way to indicate that a UML =
property=20
is an array (or a list, for that matter) - this is typically considered =
an=20
implementation detail...

Kenn

"Pradeep" <eclipseuser123@yahoo.com> wrote in message=20
news:f1lljg$f87$1@build.eclipse.org...
Hi,

How do I specify a simple array in UML2 and then in EMF.


class A {

int[] myArray;

}

If I set "upper" property to Star, It's kind of converting it to EList.


Thanks
Pradeep


=20

=20

------=_NextPart_000_0096_01C7918E.77BE1D00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-1>
<META content=3D"MSHTML 6.00.6000.16414" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>Thanks Ed. That worked.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Pradeep</FONT></DIV></FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote in =
message=20
<A=20
=
href=3D"news:f1pskf$va8$1@build.eclipse.org">news:f1pskf$va8$1@build.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Ooops, I overlooked that subtlety =
(thanks, Ed).=20
Yes, of course that's possible using the EDataType =
stereotype.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Ed Merks" &lt;<A=20
href=3D"mailto:merks@ca.ibm.com">merks@ca.ibm.com</A>&gt; wrote in =
message <A=20
=
href=3D"news:f1pqgg$i3j$1@build.eclipse.org">news:f1pqgg$i3j$1@build.ecli=
pse.org</A>...</DIV>Kenn,<BR><BR>This=20
would result in Integer [] not int[].&nbsp; Can't he define a data =
type with=20
a stereo type that lets him specify int[] as the instance class =
name?&nbsp;=20
(I.e., something just like we have for Ecore's =
EByteArray.)<BR><BR><BR>Kenn=20
Hussey wrote:=20
<BLOCKQUOTE cite=3Dmidf1pq3c$hhd$1@build.eclipse.org =
type=3D"cite"><PRE wrap=3D"">Pradeep,

Not sure if this is what you're looking for, but there is a code =
generator=20
option called 'Array Accessors' which will generate array-oriented =
accessors=20
for your features. Otherwise, there's no way to indicate that a UML =
property=20
is an array (or a list, for that matter) - this is typically considered =
an=20
implementation detail...

Kenn

"Pradeep" <A class=3Dmoz-txt-link-rfc2396E =
href=3D"mailto:eclipseuser123@yahoo.com">&lt;eclipseuser123@yahoo.com&gt;=
</A> wrote in message=20
<A class=3Dmoz-txt-link-freetext =
href=3D"news:f1lljg$f87$1@build.eclipse.org">news:f1lljg$f87$1@build.ecli=
pse.org</A>...
</PRE>
<BLOCKQUOTE type=3D"cite"><PRE wrap=3D"">Hi,

How do I specify a simple array in UML2 and then in EMF.


class A {

int[] myArray;

}

If I set "upper" property to Star, It's kind of converting it to EList.


Thanks
Pradeep


</PRE></BLOCKQUOTE><PRE wrap=3D""><!---->

</PRE></BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BODY ></HTML>

------=_NextPart_000_0096_01C7918E.77BE1D00--
Previous Topic:Reloading one resource removes stereotypes from another
Next Topic:Pros and Cons of the uml2 plugin
Goto Forum:
  


Current Time: Mon Sep 23 19:42:11 GMT 2024

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

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

Back to the top