Queue strategy on file (1)
There is a
Submitted by Zef Hemel on 7 July 2010 at 11:36queue-analysis
(which queues analysis for a particular file) andqueue-strategy
(which queues the execution of a strategy on a term) strategy now, but what I would like is to queue a particular strategy on a different file. A combination of both of these, as it were. I need this to trigger recompilation of files that depend on the file the user is editing.
Issue Log
Nathan designed the queuing interface. Maybe he could comment on this issue?
The simplest option would be to use
queue-strategy
, as it operates on a term and a project, not on any particular file. For example:<queue-strategy(|"compile-file", "Compiling..."> "another-file.mylang" compile-file = parse-file ; compile-and-write
If you really need a
queue-strategy
that gives you the AST (likequeue-analysis
), you’ll need a combination of both strategies. Basically you’ll re-implementorg.strategoxt.imp.runtime.services.StrategoObserverBackgroundUpdateJob
, changingobserver.update(parseController, monitor);
to
observer.invoke(strategyName, term, project);
Ah, so this is already possible. Good, I’ll look into it.
Log in to post comments