Search in sources :

Example 1 with FileSearchQuery

use of org.eclipse.search.internal.ui.text.FileSearchQuery in project eclipse.platform.text by eclipse.

the class DefaultTextSearchQueryProvider method createQuery.

@Override
public ISearchQuery createQuery(TextSearchInput input) {
    FileTextSearchScope scope = input.getScope();
    String text = input.getSearchText();
    boolean regEx = input.isRegExSearch();
    boolean caseSensitive = input.isCaseSensitiveSearch();
    boolean wholeWord = input.isWholeWordSearch();
    boolean searchInBinaries = input.searchInBinaries();
    Assert.isLegal(!(wholeWord && regEx));
    return new FileSearchQuery(text, regEx, caseSensitive, wholeWord, searchInBinaries, scope);
}
Also used : FileSearchQuery(org.eclipse.search.internal.ui.text.FileSearchQuery) FileTextSearchScope(org.eclipse.search.ui.text.FileTextSearchScope)

Example 2 with FileSearchQuery

use of org.eclipse.search.internal.ui.text.FileSearchQuery in project eclipse.platform.text by eclipse.

the class AnnotationManagerTest method setUp.

@Before
public void setUp() {
    SearchTestPlugin.ensureWelcomePageClosed();
    EditorAnnotationManager.debugSetHighlighterType(EditorAnnotationManager.HIGHLIGHTER_ANNOTATION);
    String[] fileNamePattern = { "*.java" };
    FileTextSearchScope scope = FileTextSearchScope.newWorkspaceScope(fileNamePattern, false);
    // $NON-NLS-1$//$NON-NLS-2$
    fQuery1 = new FileSearchQuery("Test", false, true, scope);
    // $NON-NLS-1$//$NON-NLS-2$
    fQuery2 = new FileSearchQuery("Test", false, true, scope);
}
Also used : FileSearchQuery(org.eclipse.search.internal.ui.text.FileSearchQuery) FileTextSearchScope(org.eclipse.search.ui.text.FileTextSearchScope) Before(org.junit.Before)

Example 3 with FileSearchQuery

use of org.eclipse.search.internal.ui.text.FileSearchQuery in project eclipse.platform.text by eclipse.

the class FileSearchTests method performSearch.

private FileSearchResult performSearch(String[] fileNamePatterns, String pattern) {
    FileTextSearchScope scope = FileTextSearchScope.newSearchScope(new IResource[] { fProject }, fileNamePatterns, false);
    FileSearchQuery query = new FileSearchQuery(pattern, true, true, scope);
    query.run(null);
    return (FileSearchResult) query.getSearchResult();
}
Also used : FileSearchQuery(org.eclipse.search.internal.ui.text.FileSearchQuery) FileSearchResult(org.eclipse.search.internal.ui.text.FileSearchResult) FileTextSearchScope(org.eclipse.search.ui.text.FileTextSearchScope)

Example 4 with FileSearchQuery

use of org.eclipse.search.internal.ui.text.FileSearchQuery in project eclipse.platform.text by eclipse.

the class PositionTrackerTest method setUp.

@Before
public void setUp() throws Exception {
    String[] fileNamePatterns = { "*.java" };
    FileTextSearchScope scope = FileTextSearchScope.newWorkspaceScope(fileNamePatterns, false);
    fQuery1 = new FileSearchQuery("Test", false, true, scope);
}
Also used : FileSearchQuery(org.eclipse.search.internal.ui.text.FileSearchQuery) FileTextSearchScope(org.eclipse.search.ui.text.FileTextSearchScope) Before(org.junit.Before)

Example 5 with FileSearchQuery

use of org.eclipse.search.internal.ui.text.FileSearchQuery in project eclipse.platform.text by eclipse.

the class SortingTest method setUp.

@Before
public void setUp() throws Exception {
    String[] fileNamePatterns = { "*.java" };
    FileTextSearchScope scope = FileTextSearchScope.newWorkspaceScope(fileNamePatterns, false);
    fQuery1 = new FileSearchQuery("Test", false, true, scope);
}
Also used : FileSearchQuery(org.eclipse.search.internal.ui.text.FileSearchQuery) FileTextSearchScope(org.eclipse.search.ui.text.FileTextSearchScope) Before(org.junit.Before)

Aggregations

FileSearchQuery (org.eclipse.search.internal.ui.text.FileSearchQuery)7 FileTextSearchScope (org.eclipse.search.ui.text.FileTextSearchScope)7 Before (org.junit.Before)5 FileSearchResult (org.eclipse.search.internal.ui.text.FileSearchResult)1