mirror of
https://github.com/dart-lang/sdk
synced 2024-09-21 07:21:29 +00:00
Fix renaming that got dropped
R=brianwilkerson@google.com, scheglov@google.com Review-Url: https://codereview.chromium.org/2812733002 .
This commit is contained in:
parent
3dd42456e4
commit
3406c4c1be
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue