| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 sourcemap.diff_view; | 5 library sourcemap.diff_view; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 | 10 |
| (...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 /// Compute a [CodeSource] for source span of [element]. | 879 /// Compute a [CodeSource] for source span of [element]. |
| 880 CodeSource codeSourceFromElement(Element element) { | 880 CodeSource codeSourceFromElement(Element element) { |
| 881 CodeKind kind; | 881 CodeKind kind; |
| 882 Uri uri; | 882 Uri uri; |
| 883 String name; | 883 String name; |
| 884 int begin; | 884 int begin; |
| 885 int end; | 885 int end; |
| 886 if (element.isLibrary) { | 886 if (element.isLibrary) { |
| 887 LibraryElement library = element; | 887 LibraryElement library = element; |
| 888 kind = CodeKind.LIBRARY; | 888 kind = CodeKind.LIBRARY; |
| 889 name = library.libraryOrScriptName; | 889 name = library.name; |
| 890 uri = library.entryCompilationUnit.script.resourceUri; | 890 uri = library.entryCompilationUnit.script.resourceUri; |
| 891 } else if (element.isClass) { | 891 } else if (element.isClass) { |
| 892 kind = CodeKind.CLASS; | 892 kind = CodeKind.CLASS; |
| 893 name = element.name; | 893 name = element.name; |
| 894 uri = element.compilationUnit.script.resourceUri; | 894 uri = element.compilationUnit.script.resourceUri; |
| 895 } else { | 895 } else { |
| 896 AstElement astElement = element.implementation; | 896 AstElement astElement = element.implementation; |
| 897 kind = CodeKind.MEMBER; | 897 kind = CodeKind.MEMBER; |
| 898 uri = astElement.compilationUnit.script.resourceUri; | 898 uri = astElement.compilationUnit.script.resourceUri; |
| 899 name = computeElementNameForSourceMaps(astElement); | 899 name = computeElementNameForSourceMaps(astElement); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 if (data.annotationType == AnnotationType.WITHOUT_SOURCE_INFO) { | 955 if (data.annotationType == AnnotationType.WITHOUT_SOURCE_INFO) { |
| 956 return new AnnotationData(tag: 'span', properties: { | 956 return new AnnotationData(tag: 'span', properties: { |
| 957 'title': annotation.title, | 957 'title': annotation.title, |
| 958 'class': '${ClassNames.marker} ' | 958 'class': '${ClassNames.marker} ' |
| 959 '${data.annotationType.className}' | 959 '${data.annotationType.className}' |
| 960 }); | 960 }); |
| 961 } | 961 } |
| 962 } | 962 } |
| 963 return null; | 963 return null; |
| 964 } | 964 } |
| OLD | NEW |