| 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 return completions; | 276 return completions; |
| 277 }); | 277 }); |
| 278 } | 278 } |
| 279 | 279 |
| 280 static Future<List<String>> _completeFunction(Debugger debugger, | 280 static Future<List<String>> _completeFunction(Debugger debugger, |
| 281 Match match) { | 281 Match match) { |
| 282 Isolate isolate = debugger.isolate; | 282 Isolate isolate = debugger.isolate; |
| 283 var base = match.group(1); | 283 var base = match.group(1); |
| 284 var qualifier = match.group(2); | 284 var qualifier = match.group(2); |
| 285 base = (base == null ? '' : base); | 285 base = (base == null ? '' : base); |
| 286 | 286 |
| 287 if (qualifier == null) { | 287 if (qualifier == null) { |
| 288 return _lookupClass(isolate, base, allowPrefix:true).then((classes) { | 288 return _lookupClass(isolate, base, allowPrefix:true).then((classes) { |
| 289 var completions = []; | 289 var completions = []; |
| 290 | 290 |
| 291 // Complete top-level function names. | 291 // Complete top-level function names. |
| 292 var functions = _lookupFunction(isolate, base, allowPrefix:true); | 292 var functions = _lookupFunction(isolate, base, allowPrefix:true); |
| 293 var funcNames = functions.map((f) => f.name).toList(); | 293 var funcNames = functions.map((f) => f.name).toList(); |
| 294 funcNames.sort(); | 294 funcNames.sort(); |
| 295 completions.addAll(funcNames); | 295 completions.addAll(funcNames); |
| 296 | 296 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 return 'invalid source location (${errorMessage})'; | 357 return 'invalid source location (${errorMessage})'; |
| 358 } | 358 } |
| 359 | 359 |
| 360 Script script; | 360 Script script; |
| 361 int line; | 361 int line; |
| 362 int col; | 362 int col; |
| 363 ServiceFunction function; | 363 ServiceFunction function; |
| 364 String errorMessage; | 364 String errorMessage; |
| 365 bool get valid => (errorMessage == null); | 365 bool get valid => (errorMessage == null); |
| 366 } | 366 } |
| OLD | NEW |