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

Unified Diff: pkg/analysis_server/lib/src/operation/operation_analysis.dart

Issue 2937323003: Remove ability to disable new analysis driver (Closed)
Patch Set: Created 3 years, 6 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/operation/operation_analysis.dart
diff --git a/pkg/analysis_server/lib/src/operation/operation_analysis.dart b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
index 4021eb05e2a3afcbce7d61699b89790d355e2f2c..c87c16780395565cf323c55d73c27f5a59f6b634 100644
--- a/pkg/analysis_server/lib/src/operation/operation_analysis.dart
+++ b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
@@ -2,6 +2,8 @@
// 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.
+import 'dart:async';
+
import 'package:analysis_server/src/analysis_server.dart';
import 'package:analysis_server/src/computer/computer_highlights.dart';
import 'package:analysis_server/src/computer/computer_highlights2.dart';
@@ -12,7 +14,6 @@ import 'package:analysis_server/src/domains/analysis/navigation.dart';
import 'package:analysis_server/src/domains/analysis/occurrences.dart';
import 'package:analysis_server/src/operation/operation.dart';
import 'package:analysis_server/src/protocol_server.dart' as protocol;
-import 'package:analysis_server/src/services/dependencies/library_dependencies.dart';
import 'package:analysis_server/src/services/search/search_engine.dart';
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/ast/standard_resolution_map.dart';
@@ -38,14 +39,16 @@ runWithActiveContext(AnalysisContext context, f()) {
}
}
-scheduleImplementedNotification(
+Future<Null> scheduleImplementedNotification(
AnalysisServer server, Iterable<String> files) async {
SearchEngine searchEngine = server.searchEngine;
if (searchEngine == null) {
return;
}
for (String file in files) {
- CompilationUnitElement unitElement = server.getCompilationUnitElement(file);
+ CompilationUnit unit = await server.getResolvedCompilationUnit(file);
+ // This needs to be merged with another CL
+ CompilationUnitElement unitElement = null; //unit?.element;
if (unitElement != null) {
try {
ImplementedComputer computer =
@@ -133,17 +136,10 @@ void scheduleNotificationOperations(
void sendAnalysisNotificationAnalyzedFiles(AnalysisServer server) {
_sendNotification(server, () {
- Set<String> analyzedFiles;
- if (server.options.enableNewAnalysisDriver) {
- analyzedFiles = server.driverMap.values
- .map((driver) => driver.knownFiles)
- .expand((files) => files)
- .toSet();
- } else {
- LibraryDependencyCollector collector =
- new LibraryDependencyCollector(server.analysisContexts.toList());
- analyzedFiles = collector.collectLibraryDependencies();
- }
+ Set<String> analyzedFiles = server.driverMap.values
+ .map((driver) => driver.knownFiles)
+ .expand((files) => files)
+ .toSet();
Set<String> prevAnalyzedFiles = server.prevAnalyzedFiles;
if (prevAnalyzedFiles != null &&
prevAnalyzedFiles.length == analyzedFiles.length &&
« no previous file with comments | « pkg/analysis_server/lib/src/edit/edit_domain.dart ('k') | pkg/analysis_server/lib/src/search/search_domain.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698