Chromium Code Reviews| OLD | NEW | 
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 script_inset_element; | 5 library script_inset_element; | 
| 6 | 6 | 
| 7 import 'dart:async'; | 7 import 'dart:async'; | 
| 8 import 'dart:html'; | 8 import 'dart:html'; | 
| 9 import 'observatory_element.dart'; | 9 import 'observatory_element.dart'; | 
| 10 import 'service_ref.dart'; | 10 import 'service_ref.dart'; | 
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 656 inspectLink(script.library)); | 656 inspectLink(script.library)); | 
| 657 anno.line = line.line; | 657 anno.line = line.line; | 
| 658 anno.columnStart = match.start + 8; | 658 anno.columnStart = match.start + 8; | 
| 659 anno.columnStop = match.end; | 659 anno.columnStop = match.end; | 
| 660 annotations.add(anno); | 660 annotations.add(anno); | 
| 661 } | 661 } | 
| 662 } | 662 } | 
| 663 } | 663 } | 
| 664 | 664 | 
| 665 Library resolveDependency(String relativeUri) { | 665 Library resolveDependency(String relativeUri) { | 
| 666 // This isn't really correct: we need to ask the embedder to do the | |
| 667 // uri canonicalization for us, but Observatory isn't in a position | |
| 668 // to invoke the library tag handler. Handle the most common cases. | |
| 666 var targetUri = Uri.parse(script.library.uri).resolve(relativeUri); | 669 var targetUri = Uri.parse(script.library.uri).resolve(relativeUri); | 
| 667 for (Library l in script.isolate.libraries) { | 670 for (Library l in script.isolate.libraries) { | 
| 668 if (targetUri.toString() == l.uri) { | 671 if (targetUri.toString() == l.uri) { | 
| 669 return l; | 672 return l; | 
| 670 } | 673 } | 
| 671 } | 674 } | 
| 675 if (targetUri.scheme == 'package') { | |
| 
 
floitsch
2015/11/17 01:42:31
I guess this will get worse when we have package-m
 
rmacnak
2015/11/17 01:53:07
Yeah. Maybe the flutter embedder could canonicaliz
 
 | |
| 676 targetUri = "packages/${targetUri.path}"; | |
| 677 for (Library l in script.isolate.libraries) { | |
| 678 if (targetUri.toString() == l.uri) { | |
| 679 return l; | |
| 680 } | |
| 681 } | |
| 682 } | |
| 683 | |
| 672 Logger.root.info("Could not resolve library dependency: $relativeUri"); | 684 Logger.root.info("Could not resolve library dependency: $relativeUri"); | 
| 673 return null; | 685 return null; | 
| 674 } | 686 } | 
| 675 | 687 | 
| 676 void addDependencyAnnotations() { | 688 void addDependencyAnnotations() { | 
| 677 // TODO(rmacnak): Use a real scanner. | 689 // TODO(rmacnak): Use a real scanner. | 
| 678 var patterns = [ | 690 var patterns = [ | 
| 679 new RegExp("import '(.*)'"), | 691 new RegExp("import '(.*)'"), | 
| 680 new RegExp('import "(.*)"'), | 692 new RegExp('import "(.*)"'), | 
| 681 new RegExp("export '(.*)'"), | 693 new RegExp("export '(.*)'"), | 
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1027 @CustomTag('source-inset') | 1039 @CustomTag('source-inset') | 
| 1028 class SourceInsetElement extends PolymerElement { | 1040 class SourceInsetElement extends PolymerElement { | 
| 1029 SourceInsetElement.created() : super.created(); | 1041 SourceInsetElement.created() : super.created(); | 
| 1030 | 1042 | 
| 1031 @published SourceLocation location; | 1043 @published SourceLocation location; | 
| 1032 @published String height = null; | 1044 @published String height = null; | 
| 1033 @published int currentPos; | 1045 @published int currentPos; | 
| 1034 @published bool inDebuggerContext = false; | 1046 @published bool inDebuggerContext = false; | 
| 1035 @published ObservableList variables; | 1047 @published ObservableList variables; | 
| 1036 } | 1048 } | 
| OLD | NEW |