Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » extending scoping for Xbase 2.4.0
extending scoping for Xbase 2.4.0 [message #1041653] Mon, 15 April 2013 11:21 Go to next message
Lorenzo Bettini is currently offline Lorenzo Bettini
Messages: 1351
Registered: July 2009
Senior Member
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 #1041675 is a reply to message #1041653] Mon, 15 April 2013 12:02 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian Zarnekow
Messages: 2829
Registered: July 2009
Senior Member
Hi Lorenzo,

2.4 was primarily an Xtend release. The APIs are not yet fully converted
in Xbase thus there's the inconvenient situation that scoping and
content assist have to be implemented separatly - via the
XbaseBatchScopeProvider and the XbaseScopeProvider.

Best regards,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 15.04.13 13:21, schrieb Lorenzo Bettini:
> 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
>
Re: extending scoping for Xbase 2.4.0 [message #1041691 is a reply to message #1041675] Mon, 15 April 2013 12:20 Go to previous message
Lorenzo Bettini is currently offline Lorenzo Bettini
Messages: 1351
Registered: July 2009
Senior Member
On 04/15/2013 02:02 PM, Sebastian Zarnekow wrote:
> Hi Lorenzo,
>
> 2.4 was primarily an Xtend release. The APIs are not yet fully converted
> in Xbase thus there's the inconvenient situation that scoping and
> content assist have to be implemented separatly - via the
> XbaseBatchScopeProvider and the XbaseScopeProvider.
>
> Best regards,
> Sebastian

OK, so for the moment it's better to factor out scoping functionalities
in a separate class and use this one both in a custom
XbaseBatchScopeProvider and in a custom XbaseScopeProvider

thanks
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Previous Topic:Extend xbase expressions
Next Topic:checking type conformance in Xbase 2.4
Goto Forum:
  


Current Time: Wed Sep 17 05:38:00 GMT 2014

Powered by FUDForum. Page generated in 0.11381 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software