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/analysis_server.dart

Issue 1741663003: Remove more methods from context manager callbacks (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/context_manager.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/analysis_server.dart
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index fe03e64a0228bbd7761390c7d0b98ac4051bd9ba..cb66929cd6f14b9e61dcc1ec00503244ca61fd01 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -332,6 +332,7 @@ class AnalysisServer {
ServerContextManagerCallbacks contextManagerCallbacks =
new ServerContextManagerCallbacks(this, resourceProvider);
contextManager.callbacks = contextManagerCallbacks;
+ contextManager.onComputingPackageMap.listen(_computingPackageMap);
_noErrorNotification = options.noErrorNotification;
AnalysisEngine.instance.logger = new AnalysisLogger(this);
_onAnalysisStartedController = new StreamController.broadcast();
@@ -614,23 +615,6 @@ class AnalysisServer {
return elements;
}
-// TODO(brianwilkerson) Add the following method after 'prioritySources' has
-// been added to InternalAnalysisContext.
-// /**
-// * Return a list containing the full names of all of the sources that are
-// * priority sources.
-// */
-// List<String> getPriorityFiles() {
-// List<String> priorityFiles = new List<String>();
-// folderMap.values.forEach((ContextDirectory directory) {
-// InternalAnalysisContext context = directory.context;
-// context.prioritySources.forEach((Source source) {
-// priorityFiles.add(source.fullName);
-// });
-// });
-// return priorityFiles;
-// }
-
/**
* Return an analysis error info containing the array of all of the errors and
* the line info associated with [file].
@@ -657,6 +641,23 @@ class AnalysisServer {
return context.getErrors(source);
}
+// TODO(brianwilkerson) Add the following method after 'prioritySources' has
+// been added to InternalAnalysisContext.
+// /**
+// * Return a list containing the full names of all of the sources that are
+// * priority sources.
+// */
+// List<String> getPriorityFiles() {
+// List<String> priorityFiles = new List<String>();
+// folderMap.values.forEach((ContextDirectory directory) {
+// InternalAnalysisContext context = directory.context;
+// context.prioritySources.forEach((Source source) {
+// priorityFiles.add(source.fullName);
+// });
+// });
+// return priorityFiles;
+// }
+
/**
* Returns resolved [AstNode]s at the given [offset] of the given [file].
*
@@ -1333,6 +1334,14 @@ class AnalysisServer {
});
}
+ void _computingPackageMap(bool computing) {
+ if (serverServices.contains(ServerService.STATUS)) {
+ PubStatus pubStatus = new PubStatus(computing);
+ ServerStatusParams params = new ServerStatusParams(pub: pubStatus);
+ sendNotification(params.toNotification());
+ }
+ }
+
/**
* Return a set of all contexts whose associated folder is contained within,
* or equal to, one of the resources in the given list of [resources].
@@ -1516,16 +1525,6 @@ class ServerContextManagerCallbacks extends ContextManagerCallbacks {
}
@override
- void beginComputePackageMap() {
- _computingPackageMap(true);
- }
-
- @override
- void endComputePackageMap() {
- _computingPackageMap(false);
- }
-
- @override
void removeContext(Folder folder, List<String> flushedFiles) {
AnalysisContext context = analysisServer.folderMap.remove(folder);
sendAnalysisNotificationFlushResults(analysisServer, flushedFiles);
@@ -1568,14 +1567,6 @@ class ServerContextManagerCallbacks extends ContextManagerCallbacks {
analysisServer.schedulePerformAnalysisOperation(context);
}
- void _computingPackageMap(bool computing) {
- if (analysisServer.serverServices.contains(ServerService.STATUS)) {
- PubStatus pubStatus = new PubStatus(computing);
- ServerStatusParams params = new ServerStatusParams(pub: pubStatus);
- analysisServer.sendNotification(params.toNotification());
- }
- }
-
/**
* Set up a [SourceFactory] that resolves packages as appropriate for the
* given [disposition].
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/context_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698