Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » subclassing ResourceImpl for Non-XML types
subclassing ResourceImpl for Non-XML types [message #418219] Sun, 06 April 2008 09:29 Go to next message
Eclipse UserFriend
Originally posted by: arazavi.swen.uwaterloo.ca

Hi Everyone,
I would like to model several non XML artifacts such as Java code, Property
Files etc in EMF. Is creating new subclasses of ResourceImpl resources an
effective and recommended way for marshalling and unmarshalling these
artifacts to EMF models ? Particularly for Java code, I understand that
JMerge is an already existing plugin that lets you *generate* java code from
EMF models, however what I have in mind is a, lets say JavaResourceIml that
upon load gives me an AST (or some higher level abstraction of the code like
JavaModel) modeled in EMF. My other question is if an EMF representation of
AST already exists.
Lots of Thanks
Ali
Re: subclassing ResourceImpl for Non-XML types [message #418221 is a reply to message #418219] Sun, 06 April 2008 11:54 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Ali,

Comments below.


Ali Razavi wrote:
> Hi Everyone,
> I would like to model several non XML artifacts such as Java code, Property
> Files etc in EMF.
There is an example Java model already available in the example zip file
of each our download.
> Is creating new subclasses of ResourceImpl resources an
> effective and recommended way for marshalling and unmarshalling these
> artifacts to EMF models ?
Definitely. Specializing doSave/doLoad is all that's needed.
> Particularly for Java code, I understand that
> JMerge is an already existing plugin that lets you *generate* java code from
> EMF models, however what I have in mind is a, lets say JavaResourceIml that
> upon load gives me an AST (or some higher level abstraction of the code like
> JavaModel) modeled in EMF. My other question is if an EMF representation of
> AST already exists.
>
Yes, but it's just an example and it's not up-to-date with Java 5.0. An
EMF model that wraps JDT's AST would be a cool project (but also a large
one).
> Lots of Thanks
> Ali
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:skipping containment references for serialisation
Next Topic:Interim Update Site not recognized by p2
Goto Forum:
  


Current Time: Thu Apr 25 12:53:09 GMT 2024

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

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

Back to the top