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

Unified Diff: pkg/analysis_server/lib/src/protocol.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/protocol.dart
diff --git a/pkg/analysis_server/lib/src/protocol.dart b/pkg/analysis_server/lib/src/protocol.dart
index 10aea74de164a84d68c06ce7869d33014ab7ae57..e5349433b8b7b9bfa4edd159b04cc0ff240e2d42 100644
--- a/pkg/analysis_server/lib/src/protocol.dart
+++ b/pkg/analysis_server/lib/src/protocol.dart
@@ -797,6 +797,17 @@ class Response {
error: new RequestError(RequestErrorCode.INVALID_REQUEST, 'Invalid request'));
/**
+ * Initialize a newly created instance to represent an error condition caused
+ * by a request that requires an index, but indexing is disabled.
+ */
+ Response.noIndexGenerated(Request request)
+ : this(
+ request.id,
+ error: new RequestError(
+ RequestErrorCode.NO_INDEX_GENERATED,
+ 'Indexing is disabled'));
+
+ /**
* Initialize a newly created instance to represent the
* REFACTORING_REQUEST_CANCELLED error condition.
*/

Powered by Google App Engine
This is Rietveld 408576698