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

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

Issue 396883002: Implementation for the 'search.findMemberReferences' 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
Index: pkg/analysis_server/lib/src/search/top_level_declarations.dart
diff --git a/pkg/analysis_server/lib/src/search/top_level_declarations.dart b/pkg/analysis_server/lib/src/search/top_level_declarations.dart
deleted file mode 100644
index b2eee2b0903a201b4705f9f140683d5906fe2cfc..0000000000000000000000000000000000000000
--- a/pkg/analysis_server/lib/src/search/top_level_declarations.dart
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// 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;
-
-import 'dart:async';
-
-import 'package:analysis_server/src/search/search_result.dart';
-import 'package:analysis_services/search/search_engine.dart';
-
-
-/**
- * A computer for `search.findTopLevelDeclarations` request results.
- */
-class TopLevelDeclarationsComputer {
- final SearchEngine searchEngine;
-
- TopLevelDeclarationsComputer(this.searchEngine);
-
- /**
- * Computes [SearchResult]s for top-level [element] declarations.
- */
- Future<List<SearchResult>> compute(String pattern) {
- var matchesFuture = searchEngine.searchTopLevelDeclarations(pattern);
- return matchesFuture.then((List<SearchMatch> matches) {
- return matches.map(toResult).toList();
- });
- }
-
- static SearchResult toResult(SearchMatch match) {
- return new SearchResult.fromMatch(match);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698