Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Scope Provider
Scope Provider [message #667371] Thu, 28 April 2011 11:50 Go to next message
n.lincke is currently offline n.linckeFriend
Messages: 11
Registered: April 2011
Junior Member
Hello everyone...

...perhaps it´s a stupid question and I am pretty sure that I over read something but:
How do I have to register a new scope provider(a class extended by AbstractDeclarativeScopeProvider)?

What I was trying to do, was to create a new scope provider to keep my source code organized - large class files are not that good readable... That means that I have the generated "MyDslScopeProvider" class and another one...

Is this even possible? I don't need it really, but it would be nice...


Re: Scope Provider [message #667436 is a reply to message #667371] Thu, 28 April 2011 18:23 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member

I guess you mean that your scope provider is to extend the abstract declarative one not the other way around.

For now, I claim that you cannot register two different scope providers that share the work (yes, yes, there are two registered scope providers, the local for referenced elements within the file and the global one for elements from the outside world); I mean two local scope providers. However, you can structure the already bound scope provider such that it delegates actual complicated computations to other well organised classes. You order the polymorphic dispatch methods according to a criterion you like (e.g. by the context type: elements visible from type X, or the referenced type: all scoping methods returning scopes containing only elements of type Y,...) and the functions themselves make heavy use of helper classes.

Re: Scope Provider [message #667524 is a reply to message #667371] Fri, 29 April 2011 11:23 Go to previous message
n.lincke is currently offline n.linckeFriend
Messages: 11
Registered: April 2011
Junior Member
Thanks for your replay Alex!

You was right with taht what I meant my new class exthend AbstractDeclarativeScopeProvider... my mistake!
I guess helper classes will also work to keep everything readable and organized - I just wanted to ask....
Previous Topic:Dynamic Model Evolution in xText based DSLs
Next Topic:Getting started with xtext and Xapnd --> MWE configuration
Goto Forum:

Current Time: Mon Jun 18 12:08:11 GMT 2018

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

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

Back to the top