Chromium Code Reviews| 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 library dart._debugger; | 5 library dart._debugger; |
| 6 | 6 |
| 7 import 'dart:_foreign_helper' show JS; | 7 import 'dart:_foreign_helper' show JS; |
| 8 import 'dart:_runtime' as dart; | 8 import 'dart:_runtime' as dart; |
| 9 import 'dart:core'; | 9 import 'dart:core'; |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 502 } | 502 } |
| 503 | 503 |
| 504 return properties.toList(); | 504 return properties.toList(); |
| 505 } | 505 } |
| 506 } | 506 } |
| 507 | 507 |
| 508 /// Formatter for module Dart Library objects. | 508 /// Formatter for module Dart Library objects. |
| 509 class LibraryModuleFormatter implements Formatter { | 509 class LibraryModuleFormatter implements Formatter { |
| 510 String libraryName; | 510 String libraryName; |
| 511 | 511 |
| 512 accept(object, config) { | 512 accept(object, config) => dart.getDartLibraryName(object) != null; |
| 513 libraryName = dart.getDartLibraryName(object); | |
| 514 return libraryName != null; | |
| 515 } | |
| 516 | 513 |
| 517 bool hasChildren(object) => true; | 514 bool hasChildren(object) => true; |
| 518 | 515 |
| 519 String preview(object) { | 516 String preview(object) { |
| 520 var libraryNames = libraryName.split('/'); | 517 var libraryNames = libraryName.split('/'); |
|
Jacob
2016/08/02 23:57:43
This seems broken. Should we lookup the library na
bmilligan
2016/08/03 00:03:55
I think this was leftover from before I was using
| |
| 521 // Library names are received with a repeat directory name, so strip the | 518 // Library names are received with a repeat directory name, so strip the |
| 522 // last directory entry here to make the path cleaner. For example, the | 519 // last directory entry here to make the path cleaner. For example, the |
| 523 // library "third_party/dart/utf/utf" shoud display as | 520 // library "third_party/dart/utf/utf" shoud display as |
| 524 // "third_party/dart/utf/". | 521 // "third_party/dart/utf/". |
| 525 if (libraryNames.length > 1) { | 522 if (libraryNames.length > 1) { |
| 526 libraryNames[libraryNames.length - 1] = ''; | 523 libraryNames[libraryNames.length - 1] = ''; |
| 527 } | 524 } |
| 528 return 'Library Module: ${libraryNames.join('/')}'; | 525 return 'Library Module: ${libraryNames.join('/')}'; |
| 529 } | 526 } |
| 530 | 527 |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 843 return children; | 840 return children; |
| 844 } | 841 } |
| 845 } | 842 } |
| 846 | 843 |
| 847 /// This entry point is automatically invoked by the code generated by | 844 /// This entry point is automatically invoked by the code generated by |
| 848 /// Dart Dev Compiler | 845 /// Dart Dev Compiler |
| 849 registerDevtoolsFormatter() { | 846 registerDevtoolsFormatter() { |
| 850 var formatters = [_devtoolsFormatter]; | 847 var formatters = [_devtoolsFormatter]; |
| 851 JS('', 'dart.global.devtoolsFormatters = #', formatters); | 848 JS('', 'dart.global.devtoolsFormatters = #', formatters); |
| 852 } | 849 } |
| OLD | NEW |