Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Reference to implicit variable
Reference to implicit variable [message #821018] Wed, 14 March 2012 21:12
Adam Missing name is currently offline Adam Missing nameFriend
Messages: 12
Registered: December 2011
Junior Member
I'm trying to implement implicit variables, see this groovy snippet:
  
  names = someList.collect{String item -> item.toLowerCase()}
  names = someList.collect{it.toLowerCase()}

They are equivalent, the first case is explicit, the second implicit.

My idea is to handle it with a custom scope provider:

  MyScopeProvider extends AbstractDeclarativeScopeProvider {
    public IScope scope_Id(FeatureWithClojure owner, EReference ref) {
      // ?
    }
  }


My questions are:

  • Is this a correct approach? Or what else would you suggest?
  • How can I create a scope that already has the implicit variable "it" registered into it.


thank you, Adam
Previous Topic:Complex Cross Reference
Next Topic:Problem loading references before Eclipse clean
Goto Forum:
  


Current Time: Sat Apr 27 04:18:08 GMT 2024

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

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

Back to the top