Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumsmodeling external libraries
https://www.eclipse.org/forums/index.php/mv/msg/371061/905429/#msg_905429
I've been sidetracked from my Xtext project for a while and I am a little confused at the moment. Please accept my apologies if this has been asked before, because I only found a few references that went unanswered in the end.
How do fill the model with information about code that is located in external or system libraries? The information might not always be inside source code, but I might have to parse compiled files and merge with the corresponding debug information.
Hopefully I won't have to parse these libraries every time and the model for them can be persisted and reloaded quickly.
best regards,
Vlad
]]>Vlad Dumitrescu2012-08-30T11:18:56-00:00Re: modeling external libraries
https://www.eclipse.org/forums/index.php/mv/msg/371061/905442/#msg_905442
by a ruby application (puppet) as well as ruby source that are in the
projects.
What I do is to scan/parse the ruby application and create a "target
platform model" that I store in XMI. I then allow users to switch
between various versions of the target platform. This way they don't
need to have all the different runtime versions installed to be able to
develop/test against them.
I also scan ruby files in the workspace on the fly, and they are parsed
and built into target platform models as well (contributed the Xtext way).
I have a hidden project where I stick the target platform model in XMI
form, and I make this project visible to all other projects that have
the "puppet-nature". (This makes it "easy" for users to scan and include
additions to the target platform).
The code for this is in cloudsmith / geppeto @ github. Everything called
something with "pptp" is related if you want to check it out.
Hope that helps.
Regards
- henrik
On 2012-30-08 13:18, Vlad Dumitrescu wrote:
> Hi all!
>
> I've been sidetracked from my Xtext project for a while and I am a
> little confused at the moment. Please accept my apologies if this has
> been asked before, because I only found a few references that went
> unanswered in the end.
>
> How do fill the model with information about code that is located in
> external or system libraries? The information might not always be inside
> source code, but I might have to parse compiled files and merge with the
> corresponding debug information.
>
> Hopefully I won't have to parse these libraries every time and the model
> for them can be persisted and reloaded quickly.
>
> best regards,
> Vlad
>]]>Henrik Lindberg2012-08-30T11:49:51-00:00Re: modeling external libraries
https://www.eclipse.org/forums/index.php/mv/msg/371061/905447/#msg_905447
Gepetto is a gold mine, but just as the regular ones, it helps a lot to know where to look!
In short, you are delivering prebuilt XMI files containing the libraries?I will check out how you do that and how it is merged with the rest of the model.
best regards,
Vlad
]]>Vlad Dumitrescu2012-08-30T11:57:09-00:00Re: modeling external libraries
https://www.eclipse.org/forums/index.php/mv/msg/371061/905491/#msg_905491
> Thank you, Henrik!
>
> Gepetto is a gold mine, but just as the regular ones, it helps a lot to
> know where to look! :)
>
> In short, you are delivering prebuilt XMI files containing the
> libraries?I will check out how you do that and how it is merged with the
> rest of the model.
>
It is a bit ugly; the library model is built by a Junit test and I
manually copy the result to the pp.dsl project's targets/ folder and
check it in.
I have a class that syncs the hidden project on startup.
The rest is basically about wiring up the injectors/modules and adapting
the model to xtext (i.e. resource description and the like).
The implementation is a bit kludgy, as this was something I did early on
in the life of Geppetto, and I did not know better (I should have
separated out all the pptp logic into separate bundle with its own
registration etc. to make it cleaner). Ah well...