extending scoping for Xbase 2.4.0 [message #1041653] |
Mon, 15 April 2013 07:21  |
Eclipse User |
|
|
|
Hi
as far as I understand to provide a custom scoping for Xbase 2.4.0 one
has to extend XbaseBatchScopeProvider and then use this binding
@Override
public Class<? extends XbaseBatchScopeProvider>
bindXbaseBatchScopeProvider() {
return MyScopeProvider.class;
}
however, the content assist seems to rely on IScopeProvider which is
bound to XbaseWithAnnotationsScopeProvider which has no relation with
XbaseBatchScopeProvider and indeed my modifications to scoping are not
used by the content assist...
is it a known feature or a bug?
thanks in advance
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
|
|
|
|
|
|
Re: extending scoping for Xbase 2.4.0 [message #1698775 is a reply to message #1698533] |
Wed, 17 June 2015 13:34  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04832 seconds