Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324638 - [xtext] change in grammar does not trigger build of extending grammars
Summary: [xtext] change in grammar does not trigger build of extending grammars
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext Backlog (show other bugs)
Version: 1.0.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-07 06:30 EDT by Knut Wannheden CLA
Modified: 2012-11-14 05:27 EST (History)
2 users (show)

See Also:
sebastian.zarnekow: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Knut Wannheden CLA 2010-09-07 06:30:24 EDT
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.
Comment 1 Sven Efftinge CLA 2010-09-07 16:38:05 EDT
Yes, we really should switch to platform:/resource URIs and make use of the builder infrastructure, etc.
Comment 2 Sebastian Zarnekow CLA 2010-10-04 04:48:13 EDT
see comment #2
Comment 3 Sebastian Zarnekow CLA 2010-10-04 04:48:38 EDT
(In reply to comment #2)
> see comment #2

actually I tried to refer to comment #1
Comment 4 Sebastian Zarnekow CLA 2010-12-13 17:21:27 EST
The cheap solution would be to override #isAffected for xtext grammars.
Comment 5 Sebastian Zarnekow CLA 2011-11-10 08:28:23 EST
Grammars are not listen for changed ecore packages either (no imported names for the package URI)