Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix SD-1772 - Goto dialog: add back using dot notation

  • Loading branch information...
commit 12546f8bd9fe8186e503d046540ed0b99c9da820 1 parent 95a5831
@siegfriedpammer siegfriedpammer authored
Showing with 17 additions and 6 deletions.
  1. +17 −6 src/Main/Base/Project/Src/Gui/Dialogs/GotoDialog.cs
View
23 src/Main/Base/Project/Src/Gui/Dialogs/GotoDialog.cs
@@ -241,28 +241,39 @@ void ShowLineNumberItem(string text)
ArrayList SearchClasses(string text)
{
+ int dotPos = text.IndexOf('.');
+ string needle = text;
+ string member = "";
+ if (dotPos > 0) {
+ needle = text.Substring(0, dotPos).Trim();
+ member = text.Substring(dotPos + 1).Trim();
+ }
ArrayList list = new ArrayList();
if (ProjectService.OpenSolution != null) {
foreach (IProject project in ProjectService.OpenSolution.Projects) {
IProjectContent projectContent = ParserService.GetProjectContent(project);
if (projectContent != null) {
- AddClasses(text, list, projectContent.Classes);
+ AddClasses(needle, member, list, projectContent.Classes);
}
}
}
return list;
}
- void AddClasses(string text, ArrayList list, IEnumerable<IClass> classes)
+ void AddClasses(string classPart, string memberPart, ArrayList list, IEnumerable<IClass> classes)
{
foreach (IClass c in classes) {
string className = c.Name;
- if (className.Length >= text.Length) {
- if (className.IndexOf(text, StringComparison.OrdinalIgnoreCase) >= 0) {
- list.Add(c);
+ if (className.Length >= classPart.Length) {
+ if (className.IndexOf(classPart, StringComparison.OrdinalIgnoreCase) >= 0) {
+ if (memberPart.Length > 0) {
+ AddAllMembersMatchingText(c, memberPart);
+ } else {
+ list.Add(c);
+ }
}
}
- AddClasses(text, list, c.InnerClasses);
+ AddClasses(classPart, memberPart, list, c.InnerClasses);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.