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

Unified Diff: pkg/analysis_server/lib/analysis/index/index_dart.dart

Issue 1359113002: Use IndexContributor(s) in LocalIndex. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/analysis/index/index_dart.dart
diff --git a/pkg/analysis_server/lib/analysis/index/index_dart.dart b/pkg/analysis_server/lib/analysis/index/index_dart.dart
deleted file mode 100644
index ed1869fb50dfc3bfb31707159262c05ad2e466a2..0000000000000000000000000000000000000000
--- a/pkg/analysis_server/lib/analysis/index/index_dart.dart
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2015, 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 analysis_server.analysis.index.index_dart;
-
-import 'package:analysis_server/analysis/index/index_core.dart';
-import 'package:analyzer/src/generated/ast.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-
-/**
- * An [IndexContributor] that can be used to contribute relationships for Dart
- * files.
- *
- * Clients are expected to subtype this class when implementing plugins.
- */
-abstract class DartIndexContributor extends IndexContributor {
- @override
- void contributeTo(IndexStore store, AnalysisContext context, Source source) {
- if (!AnalysisEngine.isDartFileName(source.fullName)) {
- return;
- }
- List<Source> libraries = context.getLibrariesContaining(source);
- if (libraries.isEmpty) {
- return;
- }
- libraries.forEach((Source library) {
- CompilationUnit unit = context.resolveCompilationUnit2(source, library);
- if (unit != null) {
- internalContributeTo(store, unit);
- }
- });
- }
-
- /**
- * Contribute relationships to the given index [store] based on the given
- * fully resolved compilation[unit].
- */
- void internalContributeTo(IndexStore store, CompilationUnit unit);
-}
« no previous file with comments | « pkg/analysis_server/lib/analysis/index/index_core.dart ('k') | pkg/analysis_server/lib/analysis/index_core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698