OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of debugger; | 5 part of debugger; |
6 | 6 |
7 class DebuggerLocation { | 7 class DebuggerLocation { |
8 DebuggerLocation.file(this.script, this.line, this.col); | 8 DebuggerLocation.file(this.script, this.line, this.col); |
9 DebuggerLocation.func(this.function); | 9 DebuggerLocation.func(this.function); |
10 DebuggerLocation.error(this.errorMessage); | 10 DebuggerLocation.error(this.errorMessage); |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 if (constructor != null) { | 226 if (constructor != null) { |
227 functions.add(constructor); | 227 functions.add(constructor); |
228 } | 228 } |
229 } | 229 } |
230 } else { | 230 } else { |
231 // Qualified name. | 231 // Qualified name. |
232 var functionName = qualifier.substring(1); | 232 var functionName = qualifier.substring(1); |
233 for (var cls in classes) { | 233 for (var cls in classes) { |
234 assert(cls.loaded); | 234 assert(cls.loaded); |
235 for (var function in cls.functions) { | 235 for (var function in cls.functions) { |
236 if (function.kind == FunctionKind.kConstructor) { | 236 if (function.kind == M.FunctionKind.constructor) { |
237 // Constructor names are class-qualified. | 237 // Constructor names are class-qualified. |
238 if (match.group(0) == function.name) { | 238 if (match.group(0) == function.name) { |
239 functions.add(function); | 239 functions.add(function); |
240 } | 240 } |
241 } else { | 241 } else { |
242 if (functionName == function.name) { | 242 if (functionName == function.name) { |
243 functions.add(function); | 243 functions.add(function); |
244 } | 244 } |
245 } | 245 } |
246 } | 246 } |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 classNames.sort(); | 307 classNames.sort(); |
308 completions.addAll(classNames); | 308 completions.addAll(classNames); |
309 | 309 |
310 return completions; | 310 return completions; |
311 }); | 311 }); |
312 } else { | 312 } else { |
313 return _lookupClass(isolate, base, allowPrefix:false).then((classes) { | 313 return _lookupClass(isolate, base, allowPrefix:false).then((classes) { |
314 var completions = []; | 314 var completions = []; |
315 for (var cls in classes) { | 315 for (var cls in classes) { |
316 for (var function in cls.functions) { | 316 for (var function in cls.functions) { |
317 if (function.kind == FunctionKind.kConstructor) { | 317 if (function.kind == M.FunctionKind.constructor) { |
318 if (function.name.startsWith(match.group(0))) { | 318 if (function.name.startsWith(match.group(0))) { |
319 completions.add(function.name); | 319 completions.add(function.name); |
320 } | 320 } |
321 } else { | 321 } else { |
322 if (function.qualifiedName.startsWith(match.group(0))) { | 322 if (function.qualifiedName.startsWith(match.group(0))) { |
323 completions.add(function.qualifiedName); | 323 completions.add(function.qualifiedName); |
324 } | 324 } |
325 } | 325 } |
326 } | 326 } |
327 } | 327 } |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 return 'invalid source location (${errorMessage})'; | 443 return 'invalid source location (${errorMessage})'; |
444 } | 444 } |
445 | 445 |
446 Script script; | 446 Script script; |
447 int line; | 447 int line; |
448 int col; | 448 int col; |
449 ServiceFunction function; | 449 ServiceFunction function; |
450 String errorMessage; | 450 String errorMessage; |
451 bool get valid => (errorMessage == null); | 451 bool get valid => (errorMessage == null); |
452 } | 452 } |
OLD | NEW |