Declare an array type [message #476673] |
Tue, 27 November 2007 20:25 |
Eclipse User |
|
|
|
Originally posted by: luciananegri81.yahoo.it
Hi,
I have add in Uml Metamodel (written through graphical interface
'Sample Ecore Model Editor') a metaclass where EAttribute is an Array
data type. Is it possible? How can I do?
Thanks
Luciana
|
|
|
|
Re: Declare an array type [message #476675 is a reply to message #476674] |
Tue, 27 November 2007 21:33 |
Eclipse User |
|
|
|
Originally posted by: luciananegri81.yahoo.it
Hi Ed,
in the metamodel I have only type <java.lan.string> and not
<java.lang.string[]>. Can I import the latter in any way?
thank you
Luciana
|
|
|
|
Re: Declare an array type [message #476677 is a reply to message #476676] |
Tue, 27 November 2007 22:57 |
Eclipse User |
|
|
|
Originally posted by: luciananegri81.yahoo.it
Hi,
I'm talking about Ecore.
I have try to declare a metaclass with an EReference with
molteplicity 0..* of type MyArray, but when I istance the model
I can't insert the value.
Now, I try to repeat everything.
Thank you very much.
Luciana
|
|
|
|
|
Re: Declare an array type [message #625574 is a reply to message #476673] |
Tue, 27 November 2007 20:58 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Luciana,
In Ecore itself you'd just define an EDataType whose instance class in
an array. E.g., the instance type of EByteArray is "byte[]". You
might define MyStringArray to have type "java.lang.String[]". I'm not
sure how to do that in UML...
Luciana wrote:
> Hi,
> I have add in Uml Metamodel (written through graphical interface
> 'Sample Ecore Model Editor') a metaclass where EAttribute is an Array
> data type. Is it possible? How can I do?
>
> Thanks
> Luciana
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Declare an array type [message #625575 is a reply to message #476674] |
Tue, 27 November 2007 21:33 |
Eclipse User |
|
|
|
Originally posted by: luciananegri81.yahoo.it
Hi Ed,
in the metamodel I have only type <java.lan.string> and not
<java.lang.string[]>. Can I import the latter in any way?
thank you
Luciana
|
|
|
Re: Declare an array type [message #625576 is a reply to message #476675] |
Tue, 27 November 2007 22:17 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Luciana,
I'm not even sure if you're talking about Ecore or UML. In either case,
I think you need to define your own EDataType or whatever it is in UML
because I don't think it will just exist for you already.
Luciana wrote:
> Hi Ed,
> in the metamodel I have only type <java.lan.string> and not
> <java.lang.string[]>. Can I import the latter in any way?
>
> thank you
> Luciana
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Declare an array type [message #625577 is a reply to message #476676] |
Tue, 27 November 2007 22:57 |
Eclipse User |
|
|
|
Originally posted by: luciananegri81.yahoo.it
Hi,
I'm talking about Ecore.
I have try to declare a metaclass with an EReference with
molteplicity 0..* of type MyArray, but when I istance the model
I can't insert the value.
Now, I try to repeat everything.
Thank you very much.
Luciana
|
|
|
Re: Declare an array type [message #625652 is a reply to message #476677] |
Wed, 28 November 2007 13:21 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------040508080200050305080605
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Luciana,
An EReference's eType must be an EClass so it sounds to me like you need
an EAttribute. Note also that by default, the EDataType you define
based on an array type will serialize using java.io.Serializeable which
is not human readable, so likely you will want to specialize the
createMyArrayFromString and converterMyArrayToString methods to use a
human readable result. Note that it's best to ask about Ecore on the
EMF newsgroup.
news://news.eclipse.org/eclipse.tools.emf
Luciana wrote:
> Hi,
> I'm talking about Ecore.
> I have try to declare a metaclass with an EReference with
> molteplicity 0..* of type MyArray, but when I istance the model I
> can't insert the value.
> Now, I try to repeat everything.
> Thank you very much.
> Luciana
>
--------------040508080200050305080605
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Luciana,<br>
<br>
An EReference's eType must be an EClass so it sounds to me like you
need an EAttribute.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03667 seconds