Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » scoping: exclude items
scoping: exclude items [message #989489] Thu, 06 December 2012 13:22 Go to next message
Robert Wild is currently offline Robert WildFriend
Messages: 33
Registered: August 2012
Member
I have some crossreferences that basically work fine with the standard implementation for scoping. I just would like to exclude some scoping results the standard implementation returns.

I thought of something like this:
IScope scope_SomeType_someField(SomeType ctx, EReference ref) {
    //call a super method to get the results that would be displayed if this method wasn't here

    //remove some items from result
    
    return result;
}

I don't know which method I should call to get the standard results. I tried super.getScope() but that failed horribly.

I can get what I want using validation and contentAssist, but that seems silly if it can be done with scoping.

Is something like that possible? Which methods should I call?

Re: scoping: exclude items [message #989496 is a reply to message #989489] Thu, 06 December 2012 13:39 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi wrap delegateGetScope(CTX,ref) into a filteringscope

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: scoping: exclude items [message #989497 is a reply to message #989496] Thu, 06 December 2012 13:50 Go to previous message
Robert Wild is currently offline Robert WildFriend
Messages: 33
Registered: August 2012
Member
cool, thanks
Previous Topic:Ambiguous grammar
Next Topic:GlobalScope Import
Goto Forum:
  


Current Time: Thu Apr 25 17:00:07 GMT 2024

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

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

Back to the top