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

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

Issue 969113002: Reformat (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | 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.search_engine; 5 library services.search_engine;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/services/index/index.dart'; 9 import 'package:analysis_server/src/services/index/index.dart';
10 import 'package:analysis_server/src/services/search/search_engine_internal.dart' ; 10 import 'package:analysis_server/src/services/search/search_engine_internal.dart' ;
11 import 'package:analyzer/src/generated/element.dart'; 11 import 'package:analyzer/src/generated/element.dart';
12 import 'package:analyzer/src/generated/java_core.dart'; 12 import 'package:analyzer/src/generated/java_core.dart';
13 import 'package:analyzer/src/generated/source.dart'; 13 import 'package:analyzer/src/generated/source.dart';
14 14
15
16 /** 15 /**
17 * Returns a new [SearchEngine] instance based on the given [Index]. 16 * Returns a new [SearchEngine] instance based on the given [Index].
18 */ 17 */
19 SearchEngine createSearchEngine(Index index) { 18 SearchEngine createSearchEngine(Index index) {
20 return new SearchEngineImpl(index); 19 return new SearchEngineImpl(index);
21 } 20 }
22 21
23
24 /** 22 /**
25 * Instances of the enum [MatchKind] represent the kind of reference that was 23 * Instances of the enum [MatchKind] represent the kind of reference that was
26 * found when a match represents a reference to an element. 24 * found when a match represents a reference to an element.
27 */ 25 */
28 class MatchKind { 26 class MatchKind {
29 /** 27 /**
30 * A declaration of an element. 28 * A declaration of an element.
31 */ 29 */
32 static const MatchKind DECLARATION = const MatchKind('DECLARATION'); 30 static const MatchKind DECLARATION = const MatchKind('DECLARATION');
33 31
(...skipping 23 matching lines...) Expand all
57 static const MatchKind REFERENCE = const MatchKind('REFERENCE'); 55 static const MatchKind REFERENCE = const MatchKind('REFERENCE');
58 56
59 final String name; 57 final String name;
60 58
61 const MatchKind(this.name); 59 const MatchKind(this.name);
62 60
63 @override 61 @override
64 String toString() => name; 62 String toString() => name;
65 } 63 }
66 64
67
68 /** 65 /**
69 * The interface [SearchEngine] defines the behavior of objects that can be used 66 * The interface [SearchEngine] defines the behavior of objects that can be used
70 * to search for various pieces of information. 67 * to search for various pieces of information.
71 */ 68 */
72 abstract class SearchEngine { 69 abstract class SearchEngine {
73 /** 70 /**
74 * Returns declarations of elements with the given name. 71 * Returns declarations of elements with the given name.
75 * 72 *
76 * [name] - the name being declared by the found matches. 73 * [name] - the name being declared by the found matches.
77 */ 74 */
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 buffer.write(", range="); 173 buffer.write(", range=");
177 buffer.write(sourceRange); 174 buffer.write(sourceRange);
178 buffer.write(", isResolved="); 175 buffer.write(", isResolved=");
179 buffer.write(isResolved); 176 buffer.write(isResolved);
180 buffer.write(", isQualified="); 177 buffer.write(", isQualified=");
181 buffer.write(isQualified); 178 buffer.write(isQualified);
182 buffer.write(")"); 179 buffer.write(")");
183 return buffer.toString(); 180 return buffer.toString();
184 } 181 }
185 } 182 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698