Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359369 - [Xbase] XbaseScopeProvider does not extend AbstractDeclarativScopeProvider
Summary: [Xbase] XbaseScopeProvider does not extend AbstractDeclarativScopeProvider
Status: CLOSED WONTFIX
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-29 04:59 EDT by Holger Schill CLA
Modified: 2017-02-09 05:28 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Schill CLA 2011-09-29 04:59:27 EDT
If a language extends Xbase and the ScopeProvider extends XbaseScopeProvider the declarativ methods like scope_Entity_ref(Entity e, EReference e) are no longer invoke because XBaseScopeProvider does not extend AbstractDeclarativScopeProvider.

Is there a way to avoid that?
Comment 1 Moritz Eysholdt CLA 2011-09-29 07:41:01 EDT
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)
Comment 2 Holger Schill CLA 2011-09-29 08:02:42 EDT
I do not think that this is an option because the delegate should be XbaseImportedNamespaceScopeProvider. Otherwise the importing stuff would not work any more.
Comment 3 Moritz Eysholdt CLA 2011-09-29 08:09:38 EDT
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.
Comment 4 Holger Schill CLA 2011-09-29 08:13:11 EDT
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.
Comment 5 Eric Schellhammer CLA 2014-09-04 04:55:36 EDT
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
Comment 6 Holger Schill CLA 2014-09-22 02:43:10 EDT
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.
Comment 7 Eric Schellhammer CLA 2014-09-22 06:52:52 EDT
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?
Comment 8 Holger Schill CLA 2014-09-22 07:00:22 EDT
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.
Comment 9 Christian Dietrich CLA 2016-08-30 00:49:34 EDT
since AbstractDeclarativeScopeProvider is no longer the default recommended way to do scoping i consider this as obsoltete, what do you think?
Comment 10 Christian Dietrich CLA 2017-02-09 05:28:14 EST
Since nobody objected ill close this bug as wontfix