use of org.cytoscape.search.internal.SearchTaskFactory in project cytoscape-impl by cytoscape.
the class EnhancedSearchPanel method doSearching.
// Do searching based on the query string from user on text-field
private void doSearching() {
final String queryStr = tfSearchText.getText().trim();
// Ignore if the search term is empty
if (queryStr == null || queryStr.length() == 0)
return;
final CyApplicationManager appManager = serviceRegistrar.getService(CyApplicationManager.class);
final CyNetwork currentNetwork = appManager.getCurrentNetwork();
if (currentNetwork != null) {
final SearchTaskFactory factory = new SearchTaskFactory(searchMgr, queryStr, serviceRegistrar);
final DialogTaskManager taskMgr = serviceRegistrar.getService(DialogTaskManager.class);
taskMgr.execute(factory.createTaskIterator(currentNetwork));
} else {
logger.error("Could not find network for search");
}
}
Aggregations