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

Unified Diff: pkg/analysis_server/lib/src/search/member_declarations.dart

Issue 397883004: Implementation of the 'search.findMemberDeclarations' API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/search/search_domain.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/search/member_declarations.dart
diff --git a/pkg/analysis_server/lib/src/search/top_level_declarations.dart b/pkg/analysis_server/lib/src/search/member_declarations.dart
similarity index 61%
copy from pkg/analysis_server/lib/src/search/top_level_declarations.dart
copy to pkg/analysis_server/lib/src/search/member_declarations.dart
index b2eee2b0903a201b4705f9f140683d5906fe2cfc..2367601657c3b4691b7ebf02c66ea0c79617cbe8 100644
--- a/pkg/analysis_server/lib/src/search/top_level_declarations.dart
+++ b/pkg/analysis_server/lib/src/search/member_declarations.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library search.top_level_declarations;
+library search.member_declarations;
import 'dart:async';
@@ -11,18 +11,18 @@ import 'package:analysis_services/search/search_engine.dart';
/**
- * A computer for `search.findTopLevelDeclarations` request results.
+ * A computer for `search.findMemberDeclarations` request results.
*/
-class TopLevelDeclarationsComputer {
+class MemberDeclarationsComputer {
final SearchEngine searchEngine;
- TopLevelDeclarationsComputer(this.searchEngine);
+ MemberDeclarationsComputer(this.searchEngine);
/**
- * Computes [SearchResult]s for top-level [element] declarations.
+ * Computes [SearchResult]s for declarations of members whose name is equal to [name].
*/
- Future<List<SearchResult>> compute(String pattern) {
- var matchesFuture = searchEngine.searchTopLevelDeclarations(pattern);
+ Future<List<SearchResult>> compute(String name) {
+ var matchesFuture = searchEngine.searchMemberDeclarations(name);
return matchesFuture.then((List<SearchMatch> matches) {
return matches.map(toResult).toList();
});
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/search/search_domain.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698