Interface TemplateFilterService


  • public interface TemplateFilterService
    Protocol for a data template filter service.
    Since:
    1.21
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static TemplateFilterService NULL
      A filter service that provides no filtering.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.function.Predicate<? super Template> getTemplateFilter​(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EReference reference)
      Obtain a template filter applicable to templates provided for the given reference of an owner object in the editor.
    • Method Detail

      • getTemplateFilter

        java.util.function.Predicate<? super Template> getTemplateFilter​(org.eclipse.emf.ecore.EObject owner,
                                                                         org.eclipse.emf.ecore.EReference reference)
        Obtain a template filter applicable to templates provided for the given reference of an owner object in the editor.
        Parameters:
        owner - the object owning a reference to be assigned from a template
        reference - a reference feature of the owner that is to be assigned from a template. If the reference is a containment then the owner would be the container of the template
        Returns:
        a predicate with which to filter templates (only templates satisfying the predicate are retained), or else null to opt out of filtering