Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » startup action on project load
startup action on project load [message #903168] Wed, 22 August 2012 11:21 Go to next message
Bastian Barton is currently offline Bastian BartonFriend
Messages: 8
Registered: June 2012
Junior Member
Hi xTexters,

when opening an xtext/dsl project, is it possible to trigger some startup actions (eg parsing a config)?

cheers, BB
Re: startup action on project load [message #903174 is a reply to message #903168] Wed, 22 August 2012 11:56 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
On 2012-22-08 13:21, Bastian Barton wrote:
> Hi xTexters,
>
> when opening an xtext/dsl project, is it possible to trigger some
> startup actions (eg parsing a config)?
>
> cheers, BB

A builder would see that happening - or is that too late?

- henrik
Re: startup action on project load [message #903183 is a reply to message #903174] Wed, 22 August 2012 12:45 Go to previous messageGo to next message
Bastian Barton is currently offline Bastian BartonFriend
Messages: 8
Registered: June 2012
Junior Member
Hi, Henrik,

I need some lookup tables initialized before indexer or scopeProvider can be called.

I'm not sure if I know what a builder is and when it's getting active. Embarrassed

BB
Re: startup action on project load [message #903199 is a reply to message #903183] Wed, 22 August 2012 13:32 Go to previous message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
A Builder runs when resources change (added, removed, etc). You can hook
one in to be initializing indexes etc. Using this approach, the very
first build may happen before your builder runs, and you just need to
make sure you do not crash in that state. Your builder generates
whatever it needs and then schedules a rebuild.

You can probably hook into the actual opening of the project some way to
allow you to do stuff before the xtext builder(s) gets to execute.

Regards
- henrik

On 2012-22-08 14:45, Bastian Barton wrote:
> Hi, Henrik,
>
> I need some lookup tables initialized before indexer or scopeProvider
> can be called.
>
> I'm not sure if I know what a builder is and when it's getting active.
> :blush:
>
> BB
Previous Topic:Parsing Ambiguity Problem
Next Topic:Couldn't resolve reference
Goto Forum:
  


Current Time: Thu Dec 03 23:51:51 GMT 2020

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

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

Back to the top