]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
SearchTrim function to collect search results from multiple SearchResults (refs ...
authormiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 5 Jul 2013 11:45:13 +0000 (11:45 +0000)
committermiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 5 Jul 2013 11:45:13 +0000 (11:45 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@27695 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/function/ModulesSearchFunction.java

index d584a70e284e6f6d1a60e6731eb803fa888eaefc..ba8f42a177e447d9c2bedf124721852b8a324332 100644 (file)
@@ -30,6 +30,7 @@ import org.simantics.diagram.stubs.DiagramResource;
 import org.simantics.layer0.Layer0;\r
 import org.simantics.operation.Layer0X;\r
 import org.simantics.scl.runtime.function.FunctionImpl4;\r
+import org.simantics.scl.runtime.function.FunctionImpl5;\r
 import org.simantics.sysdyn.SysdynResource;\r
 import org.simantics.workbench.search.NamedResource;\r
 import org.simantics.workbench.search.QueryResult;\r
@@ -45,13 +46,13 @@ import freemarker.template.TemplateException;
  * \r
  * @author Tuukka Lehtonen\r
  */\r
-public class ModulesSearchFunction extends FunctionImpl4<IProgressMonitor, ReadGraph, String, Integer, Collection<SearchResult>> {\r
+public class ModulesSearchFunction extends FunctionImpl5<IProgressMonitor, ReadGraph, Resource, String, Integer, Collection<SearchResult>> {\r
 \r
     @Override\r
-    public Collection<SearchResult> apply(IProgressMonitor monitor, ReadGraph graph, String query, Integer maxResults) {\r
+    public Collection<SearchResult> apply(IProgressMonitor monitor, ReadGraph graph, Resource model, String query, Integer maxResults) {\r
         try {\r
             Collection<Map<String, Object>> results = Searching.performSearch(graph,\r
-                    Layer0X.getInstance(graph).Dependencies, query, maxResults);\r
+                    Layer0X.getInstance(graph).Dependencies, model, query, maxResults);\r
 \r
             return generateSearchResults(graph, results);\r
         } catch (DatabaseException e) {\r