use of org.eclipse.search.ui.ISearchResultViewPart in project eclipse.platform.text by eclipse.
the class SearchResultPageTest method testBasicDisplay.
@Test
@Ignore
public void testBasicDisplay() throws Exception {
NewSearchUI.runQueryInForeground(null, fQuery1);
ISearchResultViewPart view = NewSearchUI.getSearchResultView();
FileSearchPage page = (FileSearchPage) view.getActivePage();
page.setLayout(AbstractTextSearchViewPage.FLAG_LAYOUT_TREE);
checkViewerDisplay(page);
page.setLayout(AbstractTextSearchViewPage.FLAG_LAYOUT_FLAT);
checkViewerDisplay(page);
}
use of org.eclipse.search.ui.ISearchResultViewPart in project mdw-designer by CenturyLinkCloud.
the class SearchPage method search.
public boolean search(List<WorkflowProject> scopedProjects) {
try {
SearchQuery searchQuery = createSearchQuery();
ProgressMonitorDialog context = new MdwProgressMonitorDialog(getShell());
NewSearchUI.runQueryInForeground(context, searchQuery);
// this shouldn't be necessary according to the Eclipse API docs
NewSearchUI.activateSearchResultView();
ISearchResultViewPart part = NewSearchUI.getSearchResultView();
part.updateLabel();
SearchResultsPage page = (SearchResultsPage) part.getActivePage();
page.setSearchQuery(searchQuery);
page.setInput(searchQuery.getSearchResult(), null);
return true;
} catch (OperationCanceledException ex) {
setMessage("Search cancelled", IMessageProvider.INFORMATION);
return false;
} catch (Exception ex) {
PluginMessages.uiError(ex, getEntityTitle() + " Search");
return false;
}
}
use of org.eclipse.search.ui.ISearchResultViewPart in project mdw-designer by CenturyLinkCloud.
the class ToolboxWrapper method searchReferences.
private void searchReferences(ActivityImpl activityImpl) {
List<WorkflowProject> projects = new ArrayList<>();
projects.add(getProject());
Shell shell = MdwPlugin.getActiveWorkbenchWindow().getShell();
ProcessSearchQuery searchQuery = new ProcessSearchQuery(projects, SearchQuery.SearchType.CONTAINING_ENTITY, "*", true, shell);
searchQuery.setContainedEntityId(activityImpl.getId());
searchQuery.setContainedEntityName(activityImpl.getImplClassName());
try {
ProgressMonitorDialog context = new MdwProgressMonitorDialog(shell);
NewSearchUI.runQueryInForeground(context, searchQuery);
// this shouldn't be necessary according to the Eclipse API docs
NewSearchUI.activateSearchResultView();
ISearchResultViewPart part = NewSearchUI.getSearchResultView();
part.updateLabel();
SearchResultsPage page = (SearchResultsPage) part.getActivePage();
page.setSearchQuery(searchQuery);
page.setInput(searchQuery.getSearchResult(), null);
} catch (OperationCanceledException ex) {
MessageDialog.openInformation(shell, "Search Cancelled", "Search for usages cancelled.");
} catch (Exception ex) {
PluginMessages.uiError(shell, ex, "Search for Usages", getProject());
}
}
Aggregations