Community
Participate
Working Groups
Consider the example with a grammar B declaring grammar A as a used grammar (i.e. "grammar B with A"). A change made in grammar A should cause the builder to rebuild grammar B. This does currently not happen. An analysis shows that this is due to two separate problems: 1. When DefaultResourceDescriptionManager#isAffected() is called with B.xtext as a candidate the computed outgoingReferences contains a classpath URI for grammar A, whereas the delta pertains to A.xtext as a platform:/resource URI. Consequently there is no direct match causing B.xtext to be considered affected. 2. In a second attempt DefaultResourceDescriptionManager#isAffected() notices that A.xtext is visible to B.xtext and tries to match up the exported and imported names. This fails again because the imported names of B.xtext have not been set. This in turn is due to the fact that the XtextLinkingService does not use the ScopeProvider to establish the Grammar.usedGrammar link.
Yes, we really should switch to platform:/resource URIs and make use of the builder infrastructure, etc.
see comment #2
(In reply to comment #2) > see comment #2 actually I tried to refer to comment #1
The cheap solution would be to override #isAffected for xtext grammars.
Grammars are not listen for changed ecore packages either (no imported names for the package URI)