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

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

Issue 2812733002: Fix renaming that got dropped (Closed)
Patch Set: Created 3 years, 8 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/services/correction/assist.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart b/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart
index 73fe15ed155a325e5c6fee421bbb5128c03fce0a..f5b75d4bf3cca4ee2db91a4883b9519d59b467ef 100644
--- a/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart
+++ b/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart
@@ -29,8 +29,8 @@ import 'package:analyzer/src/generated/source.dart';
class DartStatementCompletion {
static const NO_COMPLETION =
const StatementCompletionKind('No_COMPLETION', 'No completion available');
- static const PLAIN_OLE_ENTER = const StatementCompletionKind(
- 'PLAIN_OLE_ENTER', "Insert a newline at the end of the current line");
+ static const SIMPLE_ENTER = const StatementCompletionKind(
+ 'SIMPLE_ENTER', "Insert a newline at the end of the current line");
static const SIMPLE_SEMICOLON = const StatementCompletionKind(
'SIMPLE_SEMICOLON', "Add a semicolon and newline");
static const COMPLETE_IF_STMT = const StatementCompletionKind(
@@ -171,10 +171,11 @@ class StatementCompletionProcessor {
}
}
+ // TODO(messick) Consider changing (some of) this to a visitor.
if (_complete_ifStatement() ||
_complete_whileStatement() ||
_complete_simpleSemicolon() ||
- _complete_plainOleEnter()) {
+ _complete_simpleEnter()) {
return completion;
}
return NO_COMPLETION;
@@ -276,7 +277,7 @@ class StatementCompletionProcessor {
return false;
}
- bool _complete_plainOleEnter() {
+ bool _complete_simpleEnter() {
int offset;
if (!errors.isEmpty) {
offset = selectionOffset;
@@ -286,7 +287,7 @@ class StatementCompletionProcessor {
_addInsertEdit(loc, indent + eol);
offset = loc + indent.length + eol.length;
}
- _setCompletionAt(DartStatementCompletion.PLAIN_OLE_ENTER, offset);
+ _setCompletionAt(DartStatementCompletion.SIMPLE_ENTER, offset);
return true;
}
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/correction/assist.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698