Package jetbrains.mps.smodel.search
Class ConceptAndSuperConceptsScope
- java.lang.Object
 - 
- jetbrains.mps.scope.Scope
 - 
- jetbrains.mps.smodel.search.ConceptAndSuperConceptsScope
 
 
 
- 
public class ConceptAndSuperConceptsScope extends Scope
 
- 
- 
Constructor Summary
Constructors Constructor Description ConceptAndSuperConceptsScope(SNode topConcept) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterable<SNode>getAvailableElements(String prefix)Returns all available elements in the scope.List<SNode>getNodes(Condition<SNode> condition)StringgetReferenceText(SNode anchor, SNode target)Creates textual reference for scope element.SNoderesolve(SNode anchor, String refText)Resolves element by reference text. 
 - 
 
- 
- 
Method Detail
- 
resolve
public SNode resolve(SNode anchor, String refText)
Description copied from class:ScopeResolves element by reference text. Invariant: getReferenceText(contextNode, resolve(contextNode, refText)) == refText 
- 
getAvailableElements
public Iterable<SNode> getAvailableElements(@Nullable String prefix)
Description copied from class:ScopeReturns all available elements in the scope.- Specified by:
 getAvailableElementsin classScope- Parameters:
 prefix- (if not null) filters out elements whose reference text doesn't start with prefix- Returns:
 - list of nodes in the scope
 
 
- 
getReferenceText
public String getReferenceText(SNode anchor, SNode target)
Description copied from class:ScopeCreates textual reference for scope element. If element has no textual representation for the reference, returns null. Invariant: resolve(contextNode, getReferenceText(contextNode, node)) == node- Specified by:
 getReferenceTextin classScope- Parameters:
 anchor- source node for the reference, or its nearest parent node (if source node is unavailable)target- element from the current scope (contains(node) == true)- Returns:
 - reference text for the node element in the current scope
 
 
 - 
 
 -