Home » Modeling » EMF » MapEntry and ecore
MapEntry and ecore [message #486820] |
Sat, 19 September 2009 13:48 |
|
Hi
I'm reading the EMF book (new edition), and I couldn't figure out how to
implement a MapEntry in the ecore file. In particular, I'm referring to
page 270, the IntToOrderMapEntry.
As far as I understand, there is no direct support for <<MapEntry>>
stereotype in ecore models, am I right? If so, I don't think this is
made explicit in the book...
then, how to define a MapEntry class in ecore?
thanks in advance
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
Re: MapEntry and ecore [message #486839 is a reply to message #486820] |
Sat, 19 September 2009 18:14 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------030000010605050603030903
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lorenzo,
Comments below.
Lorenzo Bettini wrote:
> Hi
>
> I'm reading the EMF book (new edition), and I couldn't figure out how
> to implement a MapEntry in the ecore file. In particular, I'm
> referring to page 270, the IntToOrderMapEntry.
>
> As far as I understand, there is no direct support for <<MapEntry>>
> stereotype in ecore models, am I right?
Ecore itself has no concept of stereotypes; that's just a Rose notation
for it.
> If so, I don't think this is made explicit in the book...
The first paragraph describes how it's represented in Ecore, i.e, an
EClass with the instance class name set to java.util.Map$Entry.
>
> then, how to define a MapEntry class in ecore?
This FAQ entry should help:
http://wiki.eclipse.org/index.php/EMF/FAQ#How_do_I_create_a_ Map_in_EMF.3F
>
> thanks in advance
> Lorenzo
>
--------------030000010605050603030903
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">
Lorenzo,<br>
<br>
Comments below.<br>
<br>
Lorenzo Bettini wrote:
<blockquote cite="mid:h92neu$2b4$1@build.eclipse.org" type="cite">Hi
<br>
<br>
I'm reading the EMF book (new edition), and I couldn't figure out how
to implement a MapEntry in the ecore file. In particular, I'm
referring to page 270, the IntToOrderMapEntry.
<br>
<br>
As far as I understand, there is no direct support for
<<MapEntry>> stereotype in ecore models, am I right?</blockquote>
Ecore itself has no concept of stereotypes; that's just a Rose notation
for it.<br>
<blockquote cite="mid:h92neu$2b4$1@build.eclipse.org" type="cite"> If
so, I don't think this is made explicit in the book...
<br>
</blockquote>
The first paragraph describes how it's represented in Ecore, i.e, an
EClass with the instance class name set to java.util.Map$Entry.<br>
<blockquote cite="mid:h92neu$2b4$1@build.eclipse.org" type="cite"><br>
then, how to define a MapEntry class in ecore? <br>
</blockquote>
This FAQ entry should help:<br>
<blockquote><a
href=" http://wiki.eclipse.org/index.php/EMF/FAQ#How_do_I_create_a_ Map_in_EMF.3F"> http://wiki.eclipse.org/index.php/EMF/FAQ#How_do_I_create_a_ Map_in_EMF.3F</a><br>
</blockquote>
<blockquote cite="mid:h92neu$2b4$1@build.eclipse.org" type="cite"><br>
thanks in advance
<br>
Lorenzo
<br>
<br>
</blockquote>
</body>
</html>
--------------030000010605050603030903--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: MapEntry and ecore [message #486864 is a reply to message #486839] |
Sun, 20 September 2009 10:39 |
|
Ed Merks wrote:
> Lorenzo,
>
> Comments below.
>
> Lorenzo Bettini wrote:
>> Hi
>>
>> I'm reading the EMF book (new edition), and I couldn't figure out how
>> to implement a MapEntry in the ecore file. In particular, I'm
>> referring to page 270, the IntToOrderMapEntry.
>>
>> As far as I understand, there is no direct support for <<MapEntry>>
>> stereotype in ecore models, am I right?
> Ecore itself has no concept of stereotypes; that's just a Rose notation
> for it.
I see... is there any plan to add it to ecore (or at least a way of
directly specifying a Map entry in ecore)?
>> If so, I don't think this is made explicit in the book...
> The first paragraph describes how it's represented in Ecore, i.e, an
> EClass with the instance class name set to java.util.Map$Entry.
>>
>> then, how to define a MapEntry class in ecore?
> This FAQ entry should help:
>
> http://wiki.eclipse.org/index.php/EMF/FAQ#How_do_I_create_a_ Map_in_EMF.3F
thanks! I should have checked it before... I trusted google which
however didn't point to the FAQs ;)
cheers
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
Re: MapEntry and ecore [message #486873 is a reply to message #486864] |
Sun, 20 September 2009 14:10 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Lorenzo,
Comments below.
Lorenzo Bettini wrote:
> Ed Merks wrote:
>> Lorenzo,
>>
>> Comments below.
>>
>> Lorenzo Bettini wrote:
>>> Hi
>>>
>>> I'm reading the EMF book (new edition), and I couldn't figure out
>>> how to implement a MapEntry in the ecore file. In particular, I'm
>>> referring to page 270, the IntToOrderMapEntry.
>>>
>>> As far as I understand, there is no direct support for <<MapEntry>>
>>> stereotype in ecore models, am I right?
>> Ecore itself has no concept of stereotypes; that's just a Rose
>> notation for it.
>
> I see... is there any plan to add it to ecore (or at least a way of
> directly specifying a Map entry in ecore)?
There is already a way to specify it.
>
>>> If so, I don't think this is made explicit in the book...
>> The first paragraph describes how it's represented in Ecore, i.e, an
>> EClass with the instance class name set to java.util.Map$Entry.
>>>
>>> then, how to define a MapEntry class in ecore?
>> This FAQ entry should help:
>>
>>
>> http://wiki.eclipse.org/index.php/EMF/FAQ#How_do_I_create_a_ Map_in_EMF.3F
>>
>
> thanks! I should have checked it before... I trusted google which
> however didn't point to the FAQs ;)
Sometimes the trick is to know what term to search, which of course
doesn't help when you don't know. :-P
>
> cheers
> Lorenzo
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: MapEntry and ecore [message #487004 is a reply to message #486873] |
Mon, 21 September 2009 12:45 |
|
Ed Merks wrote:
> Lorenzo,
>
> Comments below.
>
> Lorenzo Bettini wrote:
>> Ed Merks wrote:
>>> Lorenzo,
>>>
>>> Comments below.
>>>
>>> Lorenzo Bettini wrote:
>>>> Hi
>>>>
>>>> I'm reading the EMF book (new edition), and I couldn't figure out
>>>> how to implement a MapEntry in the ecore file. In particular, I'm
>>>> referring to page 270, the IntToOrderMapEntry.
>>>>
>>>> As far as I understand, there is no direct support for <<MapEntry>>
>>>> stereotype in ecore models, am I right?
>>> Ecore itself has no concept of stereotypes; that's just a Rose
>>> notation for it.
>>
>> I see... is there any plan to add it to ecore (or at least a way of
>> directly specifying a Map entry in ecore)?
> There is already a way to specify it.
sorry, I meant a more "direct" way, instead of specifying the class
instance and manually add the key and value fields...
cheers
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
Re: MapEntry and ecore [message #487008 is a reply to message #487004] |
Mon, 21 September 2009 13:11 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Lorenzo,
No, there are no plans to add non-essential features to Ecore itself.
Tools might well provide convenient notations, but that's it...
Lorenzo Bettini wrote:
> Ed Merks wrote:
>> Lorenzo,
>>
>> Comments below.
>>
>> Lorenzo Bettini wrote:
>>> Ed Merks wrote:
>>>> Lorenzo,
>>>>
>>>> Comments below.
>>>>
>>>> Lorenzo Bettini wrote:
>>>>> Hi
>>>>>
>>>>> I'm reading the EMF book (new edition), and I couldn't figure out
>>>>> how to implement a MapEntry in the ecore file. In particular, I'm
>>>>> referring to page 270, the IntToOrderMapEntry.
>>>>>
>>>>> As far as I understand, there is no direct support for
>>>>> <<MapEntry>> stereotype in ecore models, am I right?
>>>> Ecore itself has no concept of stereotypes; that's just a Rose
>>>> notation for it.
>>>
>>> I see... is there any plan to add it to ecore (or at least a way of
>>> directly specifying a Map entry in ecore)?
>> There is already a way to specify it.
>
> sorry, I meant a more "direct" way, instead of specifying the class
> instance and manually add the key and value fields...
>
> cheers
> Lorenzo
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: MapEntry and ecore [message #487582 is a reply to message #487008] |
Wed, 23 September 2009 16:11 |
|
Hi Ed
sorry again for not being clear: I actually meant whether tools will
provide a more "direct" way; and with tools I mean, e.g., the ecore tree
editor or the ecorediag editor (by the way, is the ecorediag editor part
of EMF now?).
cheers
Lorenzo
Ed Merks wrote:
> Lorenzo,
>
> No, there are no plans to add non-essential features to Ecore itself.
> Tools might well provide convenient notations, but that's it...
>
>
> Lorenzo Bettini wrote:
>> Ed Merks wrote:
>>> Lorenzo,
>>>
>>> Comments below.
>>>
>>> Lorenzo Bettini wrote:
>>>> Ed Merks wrote:
>>>>> Lorenzo,
>>>>>
>>>>> Comments below.
>>>>>
>>>>> Lorenzo Bettini wrote:
>>>>>> Hi
>>>>>>
>>>>>> I'm reading the EMF book (new edition), and I couldn't figure out
>>>>>> how to implement a MapEntry in the ecore file. In particular, I'm
>>>>>> referring to page 270, the IntToOrderMapEntry.
>>>>>>
>>>>>> As far as I understand, there is no direct support for
>>>>>> <<MapEntry>> stereotype in ecore models, am I right?
>>>>> Ecore itself has no concept of stereotypes; that's just a Rose
>>>>> notation for it.
>>>>
>>>> I see... is there any plan to add it to ecore (or at least a way of
>>>> directly specifying a Map entry in ecore)?
>>> There is already a way to specify it.
>>
>> sorry, I meant a more "direct" way, instead of specifying the class
>> instance and manually add the key and value fields...
>>
>> cheers
>> Lorenzo
>>
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
Re: MapEntry and ecore [message #487588 is a reply to message #487582] |
Wed, 23 September 2009 16:37 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Lorenzo,
Comments below.
Lorenzo Bettini wrote:
> Hi Ed
>
> sorry again for not being clear: I actually meant whether tools will
> provide a more "direct" way; and with tools I mean, e.g., the ecore
> tree editor or the ecorediag editor (by the way, is the ecorediag
> editor part of EMF now?).
The Ecore Tools project is part of EMFT. I don't plan to do anything
and I don't think Ecore Tools does either.
>
> cheers
> Lorenzo
>
> Ed Merks wrote:
>> Lorenzo,
>>
>> No, there are no plans to add non-essential features to Ecore
>> itself. Tools might well provide convenient notations, but that's it...
>>
>>
>> Lorenzo Bettini wrote:
>>> Ed Merks wrote:
>>>> Lorenzo,
>>>>
>>>> Comments below.
>>>>
>>>> Lorenzo Bettini wrote:
>>>>> Ed Merks wrote:
>>>>>> Lorenzo,
>>>>>>
>>>>>> Comments below.
>>>>>>
>>>>>> Lorenzo Bettini wrote:
>>>>>>> Hi
>>>>>>>
>>>>>>> I'm reading the EMF book (new edition), and I couldn't figure
>>>>>>> out how to implement a MapEntry in the ecore file. In
>>>>>>> particular, I'm referring to page 270, the IntToOrderMapEntry.
>>>>>>>
>>>>>>> As far as I understand, there is no direct support for
>>>>>>> <<MapEntry>> stereotype in ecore models, am I right?
>>>>>> Ecore itself has no concept of stereotypes; that's just a Rose
>>>>>> notation for it.
>>>>>
>>>>> I see... is there any plan to add it to ecore (or at least a way
>>>>> of directly specifying a Map entry in ecore)?
>>>> There is already a way to specify it.
>>>
>>> sorry, I meant a more "direct" way, instead of specifying the class
>>> instance and manually add the key and value fields...
>>>
>>> cheers
>>> Lorenzo
>>>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Goto Forum:
Current Time: Wed Apr 24 14:23:20 GMT 2024
Powered by FUDForum. Page generated in 0.03493 seconds
|