Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 12546f8bd9fe8186e503d046540ed0b99c9da820 1 parent 95a5831
Siegfried Pammer authored February 11, 2012
23  src/Main/Base/Project/Src/Gui/Dialogs/GotoDialog.cs
@@ -241,28 +241,39 @@ void ShowLineNumberItem(string text)
241 241
 		
242 242
 		ArrayList SearchClasses(string text)
243 243
 		{
  244
+			int dotPos = text.IndexOf('.');
  245
+			string needle = text;
  246
+			string member = "";
  247
+			if (dotPos > 0) {
  248
+				needle = text.Substring(0, dotPos).Trim();
  249
+				member = text.Substring(dotPos + 1).Trim();
  250
+			}
244 251
 			ArrayList list = new ArrayList();
245 252
 			if (ProjectService.OpenSolution != null) {
246 253
 				foreach (IProject project in ProjectService.OpenSolution.Projects) {
247 254
 					IProjectContent projectContent = ParserService.GetProjectContent(project);
248 255
 					if (projectContent != null) {
249  
-						AddClasses(text, list, projectContent.Classes);
  256
+						AddClasses(needle, member, list, projectContent.Classes);
250 257
 					}
251 258
 				}
252 259
 			}
253 260
 			return list;
254 261
 		}
255 262
 		
256  
-		void AddClasses(string text, ArrayList list, IEnumerable<IClass> classes)
  263
+		void AddClasses(string classPart, string memberPart, ArrayList list, IEnumerable<IClass> classes)
257 264
 		{
258 265
 			foreach (IClass c in classes) {
259 266
 				string className = c.Name;
260  
-				if (className.Length >= text.Length) {
261  
-					if (className.IndexOf(text, StringComparison.OrdinalIgnoreCase) >= 0) {
262  
-						list.Add(c);
  267
+				if (className.Length >= classPart.Length) {
  268
+					if (className.IndexOf(classPart, StringComparison.OrdinalIgnoreCase) >= 0) {
  269
+						if (memberPart.Length > 0) {
  270
+							AddAllMembersMatchingText(c, memberPart);
  271
+						} else {
  272
+							list.Add(c);
  273
+						}
263 274
 					}
264 275
 				}
265  
-				AddClasses(text, list, c.InnerClasses);
  276
+				AddClasses(classPart, memberPart, list, c.InnerClasses);
266 277
 			}
267 278
 		}
268 279
 		

Git Notes

build

Build 4.2.0.8540 on master successful

0 notes on commit 12546f8

Please sign in to comment.
Something went wrong with that request. Please try again.