Fix renaming that got dropped

R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2812733002 .
This commit is contained in:
Steve Messick 2017-04-11 09:52:51 -07:00
parent 3dd42456e4
commit 3406c4c1be
2 changed files with 10 additions and 9 deletions

View file

@ -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;
}

View file

@ -125,10 +125,10 @@ class DartAssistKind {
const AssistKind("MOVE_FLUTTER_WIDGET_DOWN", 30, "Move widget down");
static const MOVE_FLUTTER_WIDGET_UP =
const AssistKind("MOVE_FLUTTER_WIDGET_UP", 30, "Move widget up");
static const REPARENT_FLUTTER_LIST = const AssistKind(
"REPARENT_FLUTTER_LIST", 30, "Wrap widget list with new widget");
static const REPARENT_FLUTTER_WIDGET = const AssistKind(
"REPARENT_FLUTTER_WIDGET", 30, "Wrap new-expression with new widget");
static const REPARENT_FLUTTER_LIST =
const AssistKind("REPARENT_FLUTTER_LIST", 30, "Wrap with new widget");
static const REPARENT_FLUTTER_WIDGET =
const AssistKind("REPARENT_FLUTTER_WIDGET", 30, "Wrap with new widget");
static const REMOVE_TYPE_ANNOTATION =
const AssistKind('REMOVE_TYPE_ANNOTATION', 29, "Remove type annotation");
static const REPLACE_CONDITIONAL_WITH_IF_ELSE = const AssistKind(