Interface ISlicedScope

All Known Implementing Classes:
CachedLightSimpleScope, CompositeScope, LightFilteringScope, LightSelectableBasedScope, NonShadowedSelectableBasedScope, NullSlicedScope, PlatformSimpleScope

public interface ISlicedScope
Special interface for expanding functionality of IScope for index slices. See IIndexSlice
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.eclipse.xtext.scoping.IScope
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Iterable<org.eclipse.xtext.resource.IEObjectDescription>
    Obtain all elements from the scope.
    Iterable<org.eclipse.xtext.resource.IEObjectDescription>
    getElements(org.eclipse.emf.ecore.EObject object, Collection<ISliceFilter> slices)
    Finds all descriptions that match the given instance.
    Iterable<org.eclipse.xtext.resource.IEObjectDescription>
    getElements(org.eclipse.xtext.naming.QualifiedName name, Collection<ISliceFilter> slices)
    Find all descriptions that match the given name.
    org.eclipse.xtext.resource.IEObjectDescription
    getSingleElement(org.eclipse.xtext.naming.QualifiedName name, Collection<ISliceFilter> slices)
    Finds the first description that matches the given name.
  • Field Details

    • NULLSCOPE

      static final org.eclipse.xtext.scoping.IScope NULLSCOPE
  • Method Details

    • getSingleElement

      org.eclipse.xtext.resource.IEObjectDescription getSingleElement(org.eclipse.xtext.naming.QualifiedName name, Collection<ISliceFilter> slices)
      Finds the first description that matches the given name.
      Parameters:
      name - the name of the to-be-found element. May not be null.
      slices - list of predicates corresponding to the index slices, can't be null
      Returns:
      the first element that matches the name. May be null.
    • getElements

      Iterable<org.eclipse.xtext.resource.IEObjectDescription> getElements(org.eclipse.xtext.naming.QualifiedName name, Collection<ISliceFilter> slices)
      Find all descriptions that match the given name.
      Parameters:
      name - the name of the to-be-found elements. May not be null.
      slices - list of predicates corresponding to the index slices, can't be null
      Returns:
      all elements that match the name. Never null.
    • getAllElements

      Iterable<org.eclipse.xtext.resource.IEObjectDescription> getAllElements(Collection<ISliceFilter> slices)
      Obtain all elements from the scope. Implementors a free to throw an UnsupportedOperationException if the scope cannot be enumerated.
      Parameters:
      slices - list of predicates corresponding to the index slices, can't be null
      Returns:
      all elements of the scope. Never null.
      Throws:
      UnsupportedOperationException - if the scope cannot be enumerated.
    • getElements

      Iterable<org.eclipse.xtext.resource.IEObjectDescription> getElements(org.eclipse.emf.ecore.EObject object, Collection<ISliceFilter> slices)
      Finds all descriptions that match the given instance.
      Parameters:
      object - the instance whose descriptions should be obtained. May not be null.
      slices - list of predicates corresponding to the index slices, can't be null
      Returns:
      all elements that match the instance. Never null.