Interface IResourceFilterDescription


  • public interface IResourceFilterDescription
    A description of a resource filter. A filter determines which file system objects will be visible when a local refresh is performed for an IContainer.
    Since:
    3.6
    See Also:
    IContainer.getFilters()
    Restriction:
    This interface is not intended to be implemented by clients.
    Restriction:
    This interface is not intended to be extended by clients.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int EXCLUDE_ALL
      Flag for resource filters indicating that the filter list excludes all the files matching the filters.
      static int FILES
      Flag for resource filters indicating that this filter applies to files.
      static int FOLDERS
      Flag for resource filters indicating that this filter applies to folders.
      static int INCLUDE_ONLY
      Flag for resource filters indicating that the filter list includes only the files matching the filters.
      static int INHERITABLE
      Flag for resource filters indicating that the container children of the path inherit from this filter as well.
    • Field Detail

      • INCLUDE_ONLY

        static final int INCLUDE_ONLY
        Flag for resource filters indicating that the filter list includes only the files matching the filters. All INCLUDE_ONLY filters are applied to the resource list with an logical OR operation.
        See Also:
        Constant Field Values
      • EXCLUDE_ALL

        static final int EXCLUDE_ALL
        Flag for resource filters indicating that the filter list excludes all the files matching the filters. All EXCLUDE_ALL filters are applied to the resource list with an logical AND operation.
        See Also:
        Constant Field Values
      • FILES

        static final int FILES
        Flag for resource filters indicating that this filter applies to files.
        See Also:
        Constant Field Values
      • FOLDERS

        static final int FOLDERS
        Flag for resource filters indicating that this filter applies to folders.
        See Also:
        Constant Field Values
      • INHERITABLE

        static final int INHERITABLE
        Flag for resource filters indicating that the container children of the path inherit from this filter as well.
        See Also:
        Constant Field Values
    • Method Detail

      • getFileInfoMatcherDescription

        FileInfoMatcherDescription getFileInfoMatcherDescription()
        Returns the description of the file info matcher corresponding to this resource filter.
        Returns:
        the file info matcher description for this resource filter
      • getResource

        IResource getResource()
        Return the resource towards which this filter is set.
        Returns:
        the resource towards which this filter is set
      • getType

        int getType()
        Return the filter type, either INCLUDE_ONLY or EXCLUDE_ALL
        Returns:
        (INCLUDE_ONLY or EXCLUDE_ALL) and/or INHERITABLE
      • delete

        void delete​(int updateFlags,
                    IProgressMonitor monitor)
             throws CoreException
        Deletes this filter description from its associated resource.

        The IResource.BACKGROUND_REFRESH update flag controls when changes to the resource hierarchy under this container resulting from the filter removal take effect. If this flag is specified, the resource hierarchy is updated in a separate thread after this method returns. If the flag is not specified, any resource changes resulting from the filter removal will occur before this method returns.

        This operation changes resources; these changes will be reported in a subsequent resource change event that will include an indication of any resources that have been added as a result of the filter removal.

        This operation is long-running; progress and cancellation are provided by the given progress monitor.

        Parameters:
        updateFlags - bit-wise or of update flag constants (IResource.BACKGROUND_REFRESH)
        monitor - a progress monitor, or null if progress reporting is not desired
        Throws:
        CoreException - if this filter could not be removed. Reasons include:
        • Resource changes are disallowed during certain types of resource change event notification. See IResourceChangeEvent for more details.
        OperationCanceledException - if the operation is canceled. Cancelation can occur even if no progress monitor is provided.
        See Also:
        IContainer.getFilters(), IContainer.createFilter(int, FileInfoMatcherDescription, int, IProgressMonitor)