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

Side by Side Diff: pkg/analysis_server/lib/src/services/search/search_engine.dart

Issue 2409963004: Fix exception in checked mode (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | no next file » | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 services.search_engine; 5 library services.search_engine;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/visitor.dart'; 10 import 'package:analyzer/dart/element/visitor.dart';
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 return _element; 173 return _element;
174 } 174 }
175 175
176 /** 176 /**
177 * The absolute path of the file containing the match. 177 * The absolute path of the file containing the match.
178 */ 178 */
179 String get file => unitSource.fullName; 179 String get file => unitSource.fullName;
180 180
181 @override 181 @override
182 int get hashCode { 182 int get hashCode {
183 return JenkinsSmiHash.hash4(libraryUri, unitUri, kind, sourceRange); 183 return JenkinsSmiHash.hash4(libraryUri.hashCode, unitUri.hashCode,
184 kind.hashCode, sourceRange.hashCode);
184 } 185 }
185 186
186 /** 187 /**
187 * Return the [LibraryElement] for the [libraryUri] in the [context]. 188 * Return the [LibraryElement] for the [libraryUri] in the [context].
188 */ 189 */
189 LibraryElement get libraryElement { 190 LibraryElement get libraryElement {
190 _libraryElement ??= context.getLibraryElement(librarySource); 191 _libraryElement ??= context.getLibraryElement(librarySource);
191 return _libraryElement; 192 return _libraryElement;
192 } 193 }
193 194
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 if (element is ElementImpl) { 267 if (element is ElementImpl) {
267 if (element.codeOffset != null && 268 if (element.codeOffset != null &&
268 element.codeOffset <= offset && 269 element.codeOffset <= offset &&
269 offset <= element.codeOffset + element.codeLength) { 270 offset <= element.codeOffset + element.codeLength) {
270 containingElement = element; 271 containingElement = element;
271 super.visitElement(element); 272 super.visitElement(element);
272 } 273 }
273 } 274 }
274 } 275 }
275 } 276 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698