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

Unified Diff: pkg/analysis_server/lib/src/edit/edit_domain.dart

Issue 1152013002: Add support for specifying files needing analysis (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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/edit/edit_domain.dart
diff --git a/pkg/analysis_server/lib/src/edit/edit_domain.dart b/pkg/analysis_server/lib/src/edit/edit_domain.dart
index 8e11600a7c1544ab2f0787a4560bd5d2ee987e78..8bb2432dc8831a2d708538ce8898bb5637a68bc0 100644
--- a/pkg/analysis_server/lib/src/edit/edit_domain.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_domain.dart
@@ -11,7 +11,6 @@ import 'package:analysis_server/edit/fix/fix_core.dart';
import 'package:analysis_server/src/analysis_server.dart';
import 'package:analysis_server/src/collections.dart';
import 'package:analysis_server/src/constants.dart';
-import 'package:analysis_server/src/plugin/server_plugin.dart';
import 'package:analysis_server/src/protocol_server.dart' hide Element;
import 'package:analysis_server/src/services/correction/assist.dart';
import 'package:analysis_server/src/services/correction/fix.dart';
@@ -43,11 +42,6 @@ class EditDomainHandler implements RequestHandler {
final AnalysisServer server;
/**
- * The server plugin that defines the extension points used by this handler.
- */
- final ServerPlugin plugin;
-
- /**
* The [SearchEngine] for this server.
*/
SearchEngine searchEngine;
@@ -57,7 +51,7 @@ class EditDomainHandler implements RequestHandler {
/**
* Initialize a newly created handler to handle requests for the given [server].
*/
- EditDomainHandler(this.server, this.plugin) {
+ EditDomainHandler(this.server) {
searchEngine = server.searchEngine;
_newRefactoringManager();
}
@@ -138,8 +132,8 @@ class EditDomainHandler implements RequestHandler {
Source source = pair.source;
List<SourceChange> changes = <SourceChange>[];
if (context != null && source != null) {
- List<Assist> assists =
- computeAssists(plugin, context, source, params.offset, params.length);
+ List<Assist> assists = computeAssists(
+ server.serverPlugin, context, source, params.offset, params.length);
assists.forEach((Assist assist) {
changes.add(assist.change);
});
@@ -162,7 +156,8 @@ class EditDomainHandler implements RequestHandler {
for (engine.AnalysisError error in errorInfo.errors) {
int errorLine = lineInfo.getLocation(error.offset).lineNumber;
if (errorLine == requestLine) {
- List<Fix> fixes = computeFixes(plugin, unit.element.context, error);
+ List<Fix> fixes =
+ computeFixes(server.serverPlugin, unit.element.context, error);
if (fixes.isNotEmpty) {
AnalysisError serverError =
newAnalysisError_fromEngine(lineInfo, error);
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.dart ('k') | pkg/analysis_server/lib/src/plugin/server_plugin.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698