Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Ecore to JvmTypes mapping
Ecore to JvmTypes mapping [message #699830] Fri, 22 July 2011 11:44 Go to next message
Eclipse UserFriend
Originally posted by:

Hi,

I'm still working on inferring a Jvm model for an Ecore model and have
come to EDataTypes. I use an injected TypeReferences object to get
references to the JvmDeclaredType corresponding to the EDataType's
instanceClassName. However, the getTypeForName method takes a class name
and its parameters as its arguments, hence, I must parse parameterized
types like java.util.List<java.lang.String> myself. I'm sure there is a
method somewhere that already does this, but where?

Hallvard
Re: Ecore to JvmTypes mapping [message #700265 is a reply to message #699830] Sat, 23 July 2011 04:54 Go to previous messageGo to next message
Mirko Raner is currently offline Mirko RanerFriend
Messages: 104
Registered: July 2009
Location: New York City, NY
Senior Member
Not sure whether this fits your needs, but EcoreValidator.EGenericTypeBuilder.handleInstanceTypeName(...) apparently does exactly that. It returns an EGenericType, though.

HTH,

Mirko
Re: Ecore to JvmTypes mapping [message #700388 is a reply to message #700265] Sat, 23 July 2011 10:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by:

On 23.07.11 06.54, Mirko Raner wrote:
> Not sure whether this fits your needs, but
> EcoreValidator.EGenericTypeBuilder.handleInstanceTypeName(...)
> apparently does exactly that. It returns an EGenericType, though.

Yes, I need the corresponding parser for JvmType. I guess I can get some
inspiration from the source.

Hallvard
Re: Ecore to JvmTypes mapping [message #700508 is a reply to message #700388] Sat, 23 July 2011 15:03 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31834
Registered: July 2009
Senior Member
Hallvard,

I think it does exactly what you'd need, i.e., it creates the full
structure that you can navigate. EDataType instances are created to
represent the qualified names.


On 23/07/2011 3:10 AM, Hallvard Trætteberg wrote:
> On 23.07.11 06.54, Mirko Raner wrote:
>> Not sure whether this fits your needs, but
>> EcoreValidator.EGenericTypeBuilder.handleInstanceTypeName(...)
>> apparently does exactly that. It returns an EGenericType, though.
>
> Yes, I need the corresponding parser for JvmType. I guess I can get
> some inspiration from the source.
>
> Hallvard


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Ecore to JvmTypes mapping [message #700668 is a reply to message #700508] Sat, 23 July 2011 21:13 Go to previous message
Eclipse UserFriend
Originally posted by:

On 23.07.11 17.03, Ed Merks wrote:
>
> I think it does exactly what you'd need, i.e., it creates the full
> structure that you can navigate. EDataType instances are created to
> represent the qualified names.

You mean traverse this Ecore structure and create the corresponding Jvm
structure? That should be simpler than parsing manually, if the
structures are isomorphic (which they should, since they represent the
same thing).

Hallvard
Previous Topic:[Xtext2] Extending XbaseCompiler
Next Topic:How do I get a IEObjectDescription from EObject?
Goto Forum:
  


Current Time: Fri Apr 16 03:50:36 GMT 2021

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

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

Back to the top