|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Chaining of code generators [message #1690595 is a reply to message #1690592] |
Sun, 29 March 2015 18:07 |
Patrice Brendamour Messages: 24 Registered: March 2015 |
Junior Member |
|
|
That's what I thought.. but that would require that I know which A-file changed so I can check whether the B-file candidate is using something from that file (I don't want to build every B-file when ONE A-file changes).
Or, for that matter, to even know that an A-file changed. Neither one seems to be possible (or I just don't see it...)
[Updated on: Sun, 29 March 2015 18:08] Report message to a moderator
|
|
|
|
|
|
Re: Chaining of code generators [message #1690599 is a reply to message #1690598] |
Sun, 29 March 2015 18:55 |
|
Hi,
i still do not get your problem: if you do a build on file a the isaffected for file b will be called during that build. and if isaffected returns true, the file b will be build as well
here is the stacktrace from my example
MyDslBRDM.isAffected(Collection<Delta>, IResourceDescription, IResourceDescriptions) line: 16
ClusteringBuilderState.queueAffectedResources(Set<URI>, IResourceDescriptions, CurrentDescriptions, Collection<Delta>, Collection<Delta>, BuildData, IProgressMonitor) line: 534
ClusteringBuilderState.doUpdate(BuildData, ResourceDescriptionsData, IProgressMonitor) line: 306
ClusteringBuilderState(AbstractBuilderState).update(BuildData, IProgressMonitor) line: 115
XtextBuilder.doBuild(ToBeBuilt, IProgressMonitor, IXtextBuilderParticipant$BuildType) line: 242
XtextBuilder.incrementalBuild(IResourceDelta, IProgressMonitor) line: 222
XtextBuilder.build(int, Map, IProgressMonitor) line: 117
since i have no idea whats going on in your case why this is not happening i cannot give you futher hints
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
|
|
Re: Chaining of code generators [message #1690605 is a reply to message #1690604] |
Sun, 29 March 2015 19:54 |
|
Hi,
please try it with this simple dsls and compare the observations with yours:
grammar org.xtext.example.mydsla.MyDslA with org.eclipse.xtext.common.Terminals
generate myDslA "http://www.xtext.org/example/mydsla/MyDslA"
Model:
Packages+=Package*
;
Package:
"package" name=ID
definitions+=Definition*
;
Definition:
'define' name=ID;
grammar org.xtext.example.mydslb.MyDslB with org.eclipse.xtext.common.Terminals
generate myDslB "http://www.xtext.org/example/mydslb/MyDslB"
import "http://www.xtext.org/example/mydsla/MyDslA" as a
Model:
imports+=Import*
usages+=Usage*;
Import:
"import" importedNamespace=FQNWC
;
FQNWC:
ID ("." ID)* (".""*")?
;
Usage:
'use' def=[a::Definition] '!';
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05642 seconds