Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » modeling external libraries
modeling external libraries [message #905429] Thu, 30 August 2012 11:18 Go to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
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
Re: modeling external libraries [message #905442 is a reply to message #905429] Thu, 30 August 2012 11:49 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Sounds like what I do in Geppetto. There, the target platform is defined
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
>
Re: modeling external libraries [message #905447 is a reply to message #905442] Thu, 30 August 2012 11:57 Go to previous messageGo to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Thank you, Henrik!

Gepetto is a gold mine, but just as the regular ones, it helps a lot to know where to look! Smile

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
Re: modeling external libraries [message #905491 is a reply to message #905447] Thu, 30 August 2012 13:28 Go to previous message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
On 2012-30-08 13:57, Vlad Dumitrescu wrote:
> 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...

Regards
- henrik
Previous Topic:EMF-Text or Xtext?
Next Topic:quick fix that uses templates?
Goto Forum:
  


Current Time: Sat Apr 20 01:25:52 GMT 2024

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

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

Back to the top