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

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

Issue 738673002: Use shorter DartElementLocation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
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.index; 5 library services.index;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analyzer/src/generated/ast.dart'; 9 import 'package:analyzer/src/generated/ast.dart';
10 import 'package:analyzer/src/generated/element.dart'; 10 import 'package:analyzer/src/generated/element.dart';
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 * An [Element] which is used to index references to the name without specifying 314 * An [Element] which is used to index references to the name without specifying
315 * a concrete kind of this name - field, method or something else. 315 * a concrete kind of this name - field, method or something else.
316 */ 316 */
317 class NameElement extends ElementImpl { 317 class NameElement extends ElementImpl {
318 NameElement(String name) : super("name:${name}", -1); 318 NameElement(String name) : super("name:${name}", -1);
319 319
320 @override 320 @override
321 ElementKind get kind => ElementKind.NAME; 321 ElementKind get kind => ElementKind.NAME;
322 322
323 @override 323 @override
324 bool operator ==(Object other) {
325 return other is NameElement && other.name == name;
326 }
327
328 @override
324 accept(ElementVisitor visitor) => null; 329 accept(ElementVisitor visitor) => null;
325 } 330 }
326 331
327 332
328 /** 333 /**
329 * Relationship between an element and a location. Relationships are identified 334 * Relationship between an element and a location. Relationships are identified
330 * by a globally unique identifier. 335 * by a globally unique identifier.
331 */ 336 */
332 class Relationship { 337 class Relationship {
333 /** 338 /**
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 static final UniverseElement INSTANCE = new UniverseElement._(); 375 static final UniverseElement INSTANCE = new UniverseElement._();
371 376
372 UniverseElement._() : super("--universe--", -1); 377 UniverseElement._() : super("--universe--", -1);
373 378
374 @override 379 @override
375 ElementKind get kind => ElementKind.UNIVERSE; 380 ElementKind get kind => ElementKind.UNIVERSE;
376 381
377 @override 382 @override
378 accept(ElementVisitor visitor) => null; 383 accept(ElementVisitor visitor) => null;
379 } 384 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698