Skip navigation links
Eclipse Platform
Oxygen (4.7)
org.eclipse.search.ui.text

Class TextSearchQueryProvider

    • Constructor Detail

      • TextSearchQueryProvider

        public TextSearchQueryProvider()
    • Method Detail

      • getPreferred

        public static TextSearchQueryProvider getPreferred()
        Returns the preferred query provider. The preferred query provider is typically configured by the product and defined by the search plug-in preference 'org.eclipse.search.textSearchQueryProvider'. It is not intended that query providers change at runtime, but clients should always use this method to access the query provider.
        Returns:
        the preferred TextSearchQueryProvider.
      • createQuery

        public abstract ISearchQuery createQuery(String selectedText)
                                          throws CoreException
        Create a query to search for the selected text in the workspace.
        Parameters:
        selectedText - the text to search for
        Returns:
        returns the created search query
        Throws:
        CoreException - a CoreException can be thrown when the query provider can not create a query for the given input.
      • createQuery

        public abstract ISearchQuery createQuery(String selectedText,
                                                 IResource[] resources)
                                          throws CoreException
        Create a query to search for the selected text in the given resources.
        Parameters:
        selectedText - the text to search for
        resources - the resources to search in
        Returns:
        returns the created search query
        Throws:
        CoreException - a CoreException can be thrown when the query provider can not create a query for the given input.
      • createQuery

        public abstract ISearchQuery createQuery(String selectedText,
                                                 IWorkingSet[] ws)
                                          throws CoreException
        Create a query to search for the selected text in the given working sets.
        Parameters:
        selectedText - the text to search for
        ws - the working sets to search in
        Returns:
        returns the created search query
        Throws:
        CoreException - a CoreException can be thrown when the query provider can not create a query for the given input.


Copyright (c) 2000, 2017 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.