Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Scope Provider
Scope Provider [message #667371] Thu, 28 April 2011 07:50 Go to next message
Eclipse UserFriend
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...

Thanks...



Re: Scope Provider [message #667436 is a reply to message #667371] Thu, 28 April 2011 14:23 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

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.

Alex
Re: Scope Provider [message #667524 is a reply to message #667371] Fri, 29 April 2011 07:23 Go to previous message
Eclipse UserFriend
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: Sat Jul 05 18:37:05 EDT 2025

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

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

Back to the top