Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(615)

Side by Side Diff: lib/runtime/messages_widget.dart

Issue 1266483003: format with dart_style 0.2.0-rc.3 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « bin/edit_files.dart ('k') | lib/src/analysis_context.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 /// This library provides a single function called injectLogs which when called 5 /// This library provides a single function called injectLogs which when called
6 /// will request a logs json file and build a small widget out of them which 6 /// will request a logs json file and build a small widget out of them which
7 /// groups the logs by level. 7 /// groups the logs by level.
8 library polymer.build.log_injector; 8 library polymer.build.log_injector;
9 9
10 import 'dart:convert'; 10 import 'dart:convert';
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 sb.write(_escape(context.substring(span.end.column))); 66 sb.write(_escape(context.substring(span.end.column)));
67 } else { 67 } else {
68 sb.write(_escape(span.text)); 68 sb.write(_escape(span.text));
69 } 69 }
70 sb.write('</span></div></div>'); 70 sb.write('</span></div></div>');
71 } 71 }
72 sb.write('</div>'); 72 sb.write('</div>');
73 73
74 var logElement = new Element.html('$sb', 74 var logElement = new Element.html('$sb',
75 validator: new NodeValidatorBuilder.common() 75 validator: new NodeValidatorBuilder.common()
76 ..allowNavigation(new _OpenUriPolicy())); 76 ..allowNavigation(new _OpenUriPolicy()));
77 contentItem.append(logElement); 77 contentItem.append(logElement);
78 var messageElement = logElement.querySelector('div.text'); 78 var messageElement = logElement.querySelector('div.text');
79 messageElement.onClick.listen((e) { 79 messageElement.onClick.listen((e) {
80 if (e.target == messageElement) { 80 if (e.target == messageElement) {
81 messageElement.classes.toggle('expanded'); 81 messageElement.classes.toggle('expanded');
82 } 82 }
83 }); 83 });
84 } 84 }
85 }); 85 });
86 86
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 class _Visitor extends RecursiveSummaryVisitor { 123 class _Visitor extends RecursiveSummaryVisitor {
124 final Map<String, List<MessageSummary>> messagesByLevel = {}; 124 final Map<String, List<MessageSummary>> messagesByLevel = {};
125 125
126 @override 126 @override
127 void visitMessage(MessageSummary message) { 127 void visitMessage(MessageSummary message) {
128 var level = message.level.toLowerCase(); 128 var level = message.level.toLowerCase();
129 messagesByLevel.putIfAbsent(level, () => []); 129 messagesByLevel.putIfAbsent(level, () => []);
130 messagesByLevel[level].add(message); 130 messagesByLevel[level].add(message);
131 } 131 }
132 } 132 }
OLDNEW
« no previous file with comments | « bin/edit_files.dart ('k') | lib/src/analysis_context.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698