| Summary: | [Xbase] XbaseScopeProvider does not extend AbstractDeclarativScopeProvider | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Holger Schill <Holger.Schill> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | btickets, carlo.mueller-reichenwallner, christian.dietrich.opensource, mail, moritz.eysholdt, schellhammer.e |
| Version: | 2.1.0 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Holger Schill
would it be an option to configure the XbaseScopeProvider as the delegate of your own DeclarativeScopeProvider? see: org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.setDelegate(IScopeProvider) I do not think that this is an option because the delegate should be XbaseImportedNamespaceScopeProvider. Otherwise the importing stuff would not work any more. XbaseImportedNamespaceScopeProvider would have to remain the delegate of XbaseScopeProvider. My Idea was about prepending another scope provider to the chain of scope providers - and not about replacing existing scope providers. I solved the problem already but my intension of this bug was that everybody who extends Xbase has to rethink about this issue. So I think we should solved this at a higher level. The reported bug (declarative scoping is not invoked when the language extends Xbase) still seems to be present in Xtext version 2.6.0. This is unfortunate, since the documentation kind of suggests extending Xbase and mentions declarative scoping as the only way to create context-aware scoping behaviour, but does not mention that this combination does not work. Could you please describe how you solved the problem, as you mentioned? Thanks a lot, ERIC I did the whole impl in the getScope method and disptached myself. Please note that if you follow the xbase way of life the scoping is implicitly done through the JvmModelInferrer. That was not the case when I created the bug. Maybe we can close this one. The scoping that follows 'canonically' from the model was ok from the start. I needed additional scoping, and in this situation encountered the bug that the descriptive scoping did not work. It's probably not the original bug description you entered here, but the described effect seems to be quite similar. Is there another bug we could link this effect to? The intention of the original bug was exactly about that problem. I just manted to mention if the "life" the xbase way the scoping is implicitly done through the JvmModelInferrer that you implement. So you have scoping under control with that mechanism. since AbstractDeclarativeScopeProvider is no longer the default recommended way to do scoping i consider this as obsoltete, what do you think? Since nobody objected ill close this bug as wontfix |