import org.simantics.sysdyn.ui.handlers.FindSearchTrim;\r
import org.simantics.sysdyn.ui.handlers.FindSearchTrim.Scope;\r
import org.simantics.workbench.search.NamedResource;\r
+import org.simantics.workbench.search.SearchQuery;\r
import org.simantics.workbench.search.SearchResult;\r
import org.simantics.workbench.search.Searching;\r
\r
* @author Tuukka Lehtonen\r
* @author Tuomas Miettinen\r
*/\r
-public class ModulesSearchFunction extends FunctionImpl5<IProgressMonitor, ReadGraph, Resource, String, Integer, Collection<SearchResult>> {\r
+public class ModulesSearchFunction extends FunctionImpl5<IProgressMonitor, ReadGraph, Resource, SearchQuery, Integer, Collection<SearchResult>> {\r
\r
private final int MAX_RESULTS = 50000;\r
\r
@Override\r
- public Collection<SearchResult> apply(IProgressMonitor monitor, ReadGraph graph, Resource model, String query, Integer maxResults) {\r
+ public Collection<SearchResult> apply(IProgressMonitor monitor, ReadGraph graph, Resource model, SearchQuery query, Integer maxResults) {\r
try {\r
// Check whether only currently open diagram is searched\r
- String filteredQuery = query.replace(FindSearchTrim.CURRENT_DIAGRAM_OPTION, "");\r
+ String filteredQuery = query.getQuery().replace(FindSearchTrim.CURRENT_DIAGRAM_OPTION, "");\r
Collection<Map<String, Object>> results = Searching.performSearch(graph,\r
Layer0X.getInstance(graph).Dependencies, model, filteredQuery, MAX_RESULTS);\r
\r