]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Escaped the search query (refs #4786).
authormiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 27 Mar 2014 08:30:25 +0000 (08:30 +0000)
committermiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 27 Mar 2014 08:30:25 +0000 (08:30 +0000)
Changed the version in the about text to 1.8 (refs #4695).

git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29205 ac1ea38d-2e2b-0410-8846-a27921b304fc

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

index dd1e065609b46fd1aeec16bc7865922ff71e072b..a6b3f78a614efb5d06fd4b61add692ba14a64cf1 100644 (file)
@@ -1,8 +1,8 @@
 about.text = Simantics System Dynamics\n\\r
 \n\\r
-Version 1.7.0\n\\r
+Version 1.8.0\n\\r
 \n\\r
-Copyright (c) 2013 Association for Decentralized Information Management in Industry THTH ry.\n\\r
+Copyright (c) 2014 Association for Decentralized Information Management in Industry THTH ry.\n\\r
 \n\\r
 Contributors:\n\\r
 VTT Technical Research Centre of Finland\n\\r
index edf5afea8c70daaacebbb4c2845f26c57e45ebed..bfed4278f9d367f7ec70cf1a815dcef0af44920b 100644 (file)
@@ -59,19 +59,20 @@ public class ModulesSearchFunction extends FunctionImpl5<IProgressMonitor, ReadG
     public SearchResult apply(IProgressMonitor monitor, ReadGraph graph, Resource model, SearchQuery query, Integer maxResults) {\r
         try {\r
                String origQuery = query.getOriginalQuery();\r
+               SearchQuery wildcardedQuery;\r
                if (!origQuery.isEmpty()) // Add asterisks for performSearch \r
-                       query.setOriginalQuery("*" + origQuery + "*");\r
+                       wildcardedQuery = query.withOriginalQuery("*" + origQuery + "*");\r
+               else\r
+                       wildcardedQuery = query.withOriginalQuery("*");\r
                \r
-               // Check whether only currently open diagram is searched\r
-               String filteredQuery = query.getQuery("Name","Types");\r
+               String filteredQuery = wildcardedQuery.escaped(false).getQuery("Name","Types");\r
                Collection<Map<String, Object>> results = Searching.performSearch(graph, \r
                                Layer0X.getInstance(graph).Dependencies, \r
                                model, \r
                                filteredQuery, \r
                                MAX_RESULTS);\r
 \r
-               query.setOriginalQuery(origQuery); // Restore the original query without *'s\r
-               \r
+               // Check whether only currently open diagram is searched\r
                if (!query.getSearchParams().contains(FindSearchTrim.CURRENT_DIAGRAM_OPTION))\r
                return generateSearchResults(graph, results, Scope.ALL_MODELS);\r
                else\r