|
|
|
|
Re: extending scoping for Xbase 2.4.0 [message #1698775 is a reply to message #1698533] |
Wed, 17 June 2015 17:34 |
|
On 16/06/2015 16:09, Andreas Gudell wrote:
> Hi Lorenzo,
>
> do you have any idea how this works with xtext 2.8?
> I have the following ScopeProvider:
>
> public class MyScopeProvider extends XbaseBatchScopeProvider ...
>
> and bind this ScopeProvider in my Runtime-Module with
>
> @Override
> public Class<? extends IScopeProvider> bindIScopeProvider() {
> return MyScopeProvider.class;
> }
>
> The problem is, that it seems to be called only during ContentAssist,
> but not during the linking phase.
>
> Best regards,
> Andreas
>
Hi Andreas
you need to bind XbaseBatchScopeProvider:
@Override
public Class<? extends XbaseBatchScopeProvider>
bindXbaseBatchScopeProvider() {
return MyScopeProvider.class;
}
by the way, do you really need to customize the XbaseBatchScopeProvider?
Usually, you can customize scoping directly in the TypeComputer (e.g.,
add some variables to the scope)
cheers
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
Powered by
FUDForum. Page generated in 0.03887 seconds