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

Unified Diff: pkg/analysis_server/lib/src/services/completion/optype.dart

Issue 806473007: Add support for completion of case labels. (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
Index: pkg/analysis_server/lib/src/services/completion/optype.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/optype.dart b/pkg/analysis_server/lib/src/services/completion/optype.dart
index c4d0cfec7b2f4a133c7600e40dc67de0df02b314..ef2902bc63ca2e76bb71523df82c819643447cf6 100644
--- a/pkg/analysis_server/lib/src/services/completion/optype.dart
+++ b/pkg/analysis_server/lib/src/services/completion/optype.dart
@@ -42,6 +42,11 @@ class OpType {
bool includeStatementLabelSuggestions = false;
/**
+ * Indicates whether case labels should be suggested.
+ */
+ bool includeCaseLabelSuggestions = false;
+
+ /**
* Determine the suggestions that should be made based upon the given
* [CompletionTarget] and [offset].
*/
@@ -206,6 +211,7 @@ class _OpTypeAstVisitor extends GeneralizingAstVisitor {
void visitContinueStatement(ContinueStatement node) {
if (node.label == null || identical(entity, node.label)) {
optype.includeStatementLabelSuggestions = true;
+ optype.includeCaseLabelSuggestions = true;
}
}

Powered by Google App Engine
This is Rietveld 408576698