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

Side by Side Diff: runtime/observatory/lib/src/elements/script_inset.dart

Issue 1340073002: Fix static analysis warnings in Observatory (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 element.title = "Current execution"; 114 element.title = "Current execution";
115 } 115 }
116 } 116 }
117 117
118 class BreakpointAnnotation extends Annotation { 118 class BreakpointAnnotation extends Annotation {
119 Breakpoint bpt; 119 Breakpoint bpt;
120 int priority = 1; 120 int priority = 1;
121 121
122 BreakpointAnnotation(this.bpt) { 122 BreakpointAnnotation(this.bpt) {
123 var script = bpt.location.script; 123 var script = bpt.location.script;
124 if (bpt.location.tokenPos != null) { 124 var location = bpt.location;
125 var pos = bpt.location.tokenPos; 125 if (location.tokenPos != null) {
126 var pos = location.tokenPos;
126 line = script.tokenToLine(pos); 127 line = script.tokenToLine(pos);
127 columnStart = script.tokenToCol(pos) - 1; // tokenToCol is 1-origin. 128 columnStart = script.tokenToCol(pos) - 1; // tokenToCol is 1-origin.
128 } else { 129 } else if (location is UnresolvedSourceLocation) {
129 line = bpt.location.line; 130 line = location.line;
130 columnStart = bpt.location.column; 131 columnStart = location.column;
131 if (columnStart == null) { 132 if (columnStart == null) {
132 columnStart = 0; 133 columnStart = 0;
133 } 134 }
134 } 135 }
135 var length = script.guessTokenLength(line, columnStart); 136 var length = script.guessTokenLength(line, columnStart);
136 if (length == null) { 137 if (length == null) {
137 length = 1; 138 length = 1;
138 } 139 }
139 columnStop = columnStart + length; 140 columnStop = columnStart + length;
140 } 141 }
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 @CustomTag('source-inset') 1013 @CustomTag('source-inset')
1013 class SourceInsetElement extends PolymerElement { 1014 class SourceInsetElement extends PolymerElement {
1014 SourceInsetElement.created() : super.created(); 1015 SourceInsetElement.created() : super.created();
1015 1016
1016 @published SourceLocation location; 1017 @published SourceLocation location;
1017 @published String height = null; 1018 @published String height = null;
1018 @published int currentPos; 1019 @published int currentPos;
1019 @published bool inDebuggerContext = false; 1020 @published bool inDebuggerContext = false;
1020 @published ObservableList variables; 1021 @published ObservableList variables;
1021 } 1022 }
1022
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/debugger.dart ('k') | runtime/observatory/tests/ui/inspector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698