subclassing ResourceImpl for Non-XML types [message #418219] |
Sun, 06 April 2008 09:29 |
Eclipse User |
|
|
|
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 |
Ed Merks 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/
|
|
|
Powered by
FUDForum. Page generated in 0.02649 seconds