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

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

Issue 923103004: Return RequestErrorCode.NO_INDEX_GENERATED for search/refactoring requests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
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 397390b91a8b5769eed5bd7f09b2997c356affb2..b5904f3826b472d65a33e50fe30a4a0d0fc11394 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -89,14 +89,14 @@ class AnalysisServer {
final ResourceProvider resourceProvider;
/**
- * The [Index] for this server.
+ * The [Index] for this server, may be `null` if indexing is disabled.
*/
final Index index;
/**
- * The [SearchEngine] for this server.
+ * The [SearchEngine] for this server, may be `null` if indexing is disabled.
*/
- SearchEngine searchEngine;
+ final SearchEngine searchEngine;
/**
* [ContextManager] which handles the mapping from analysis roots
@@ -242,11 +242,12 @@ class AnalysisServer {
* running a full analysis server.
*/
AnalysisServer(this.channel, this.resourceProvider,
- PackageMapProvider packageMapProvider, this.index,
+ PackageMapProvider packageMapProvider, Index _index,
AnalysisServerOptions analysisServerOptions, this.defaultSdk,
- this.instrumentationService, {this.rethrowExceptions: true}) {
+ this.instrumentationService, {this.rethrowExceptions: true})
+ : index = _index,
+ searchEngine = _index != null ? createSearchEngine(_index) : null {
_performance = performanceDuringStartup;
- searchEngine = createSearchEngine(index);
operationQueue = new ServerOperationQueue();
contextDirectoryManager =
new ServerContextManager(this, resourceProvider, packageMapProvider);
@@ -1103,6 +1104,7 @@ class AnalysisServerOptions {
bool enableIncrementalResolutionApi = false;
bool enableIncrementalResolutionValidation = false;
bool noErrorNotification = false;
+ bool noIndex = false;
String fileReadMode = 'as-is';
}
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/edit/edit_domain.dart » ('j') | pkg/analysis_server/lib/src/edit/edit_domain.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698