Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@novell.com>2010-05-27 15:27:17 +0400
committerMike Krüger <mkrueger@novell.com>2010-05-27 15:27:17 +0400
commit4295988f90de81587fc00be61adc4d4477960a0f (patch)
tree87cf08ee8fee2af58cbe5d8d8feab49d0b617be8 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.NavigateToDialog
parent83eb20eb5735572d68245988f956af0c5c893754 (diff)
* MonoDevelop.Ide.NavigateToDialog/NavigateToDialog.cs: using fast
match for member searches. svn path=/trunk/monodevelop/; revision=158019
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.NavigateToDialog')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.NavigateToDialog/NavigateToDialog.cs16
1 files changed, 11 insertions, 5 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.NavigateToDialog/NavigateToDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.NavigateToDialog/NavigateToDialog.cs
index e7b39e46d9..23494165d0 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.NavigateToDialog/NavigateToDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.NavigateToDialog/NavigateToDialog.cs
@@ -310,6 +310,7 @@ namespace MonoDevelop.Ide.NavigateToDialog
public ResultsDataSource results = new ResultsDataSource ();
public bool IncludeFiles, IncludeTypes, IncludeMembers;
+ public bool UseFastMatch = false;
internal SearchResult CheckFile (ProjectFile file, string toMatch)
{
@@ -353,12 +354,17 @@ namespace MonoDevelop.Ide.NavigateToDialog
{
MatchResult savedMatch;
if (!savedMatches.TryGetValue (name, out savedMatch)) {
-// if (MonoDevelop.Ide.CodeCompletion.ListWidget.Matches (toMatch, name)) {
+ if (UseFastMatch) {
+ if (MonoDevelop.Ide.CodeCompletion.ListWidget.Matches (toMatch, name)) {
+ bool doesMatch = CalcMatchRank (name, toMatch, out matchRank);
+ savedMatch = new MatchResult (doesMatch, matchRank);
+ } else {
+ savedMatch = new MatchResult (false, int.MinValue);
+ }
+ } else {
bool doesMatch = CalcMatchRank (name, toMatch, out matchRank);
savedMatch = new MatchResult (doesMatch, matchRank);
-/* } else {
- savedMatch = new MatchResult (false, int.MinValue);
- }*/
+ }
savedMatches[name] = savedMatch;
}
@@ -384,7 +390,7 @@ namespace MonoDevelop.Ide.NavigateToDialog
newResult.pattern = arg.Key;
newResult.IncludeFiles = (NavigateToType & NavigateToType.Files) == NavigateToType.Files;
newResult.IncludeTypes = (NavigateToType & NavigateToType.Types) == NavigateToType.Types;
- newResult.IncludeMembers = (NavigateToType & NavigateToType.Members) == NavigateToType.Members;
+ newResult.UseFastMatch = newResult.IncludeMembers = (NavigateToType & NavigateToType.Members) == NavigateToType.Members;
foreach (SearchResult result in AllResults (worker, lastResult, newResult)) {
if (worker.CancellationPending)