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

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

Issue 847663005: Send notifications using separate server operations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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/computer/computer_outline.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 14d2480e7f5a492332f6b60ee96458f65dec40cb..a8a491bdfa5eb7f72d0314e5787d22a499377977 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -198,7 +198,7 @@ class AnalysisServer {
AnalysisServerOptions analysisServerOptions, this.defaultSdk,
this.instrumentationService, {this.rethrowExceptions: true}) {
searchEngine = createSearchEngine(index);
- operationQueue = new ServerOperationQueue(this);
+ operationQueue = new ServerOperationQueue();
contextDirectoryManager =
new ServerContextManager(this, resourceProvider, packageMapProvider);
contextDirectoryManager.defaultOptions.incremental = true;
@@ -539,14 +539,6 @@ class AnalysisServer {
}
/**
- * Returns `true` if the given [AnalysisContext] is a priority one.
- */
- bool isPriorityContext(AnalysisContext context) {
- // TODO(scheglov) implement support for priority sources/contexts
- return false;
- }
-
- /**
* Returns a [Future] completing when [file] has been completely analyzed, in
* particular, all its errors have been computed. The future is completed
* with an [AnalysisDoneReason] indicating what caused the file's analysis to
@@ -649,7 +641,8 @@ class AnalysisServer {
*/
void schedulePerformAnalysisOperation(AnalysisContext context) {
_onAnalysisStartedController.add(context);
- scheduleOperation(new PerformAnalysisOperation(context, false));
+ bool isPriority = _isPriorityContext(context);
+ scheduleOperation(new PerformAnalysisOperation(context, isPriority, false));
}
/**
@@ -785,11 +778,7 @@ class AnalysisServer {
break;
case AnalysisService.OUTLINE:
LineInfo lineInfo = context.getLineInfo(source);
- sendAnalysisNotificationOutline(
- this,
- source,
- lineInfo,
- dartUnit);
+ sendAnalysisNotificationOutline(this, file, lineInfo, dartUnit);
break;
case AnalysisService.OVERRIDES:
sendAnalysisNotificationOverrides(this, file, dartUnit);
@@ -934,6 +923,14 @@ class AnalysisServer {
}
/**
+ * Returns `true` if the given [AnalysisContext] is a priority one.
+ */
+ bool _isPriorityContext(AnalysisContext context) {
+ // TODO(scheglov) implement support for priority sources/contexts
+ return false;
+ }
+
+ /**
* Schedules [performOperation] exection.
*/
void _schedulePerformOperation() {
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/computer/computer_outline.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698