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

Unified Diff: pkg/analysis_server/lib/src/services/correction/name_suggestion.dart

Issue 969113002: Reformat (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/services/correction/name_suggestion.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart b/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
index e3b36cf7dc385cafbe5f598305b571b9cd380a6d..c9e4ef6a72d94bfae73ac0e65a65d55b74fa76a2 100644
--- a/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
+++ b/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
@@ -8,7 +8,6 @@ import 'package:analysis_server/src/services/correction/strings.dart';
import 'package:analyzer/src/generated/ast.dart';
import 'package:analyzer/src/generated/element.dart';
-
List<String> _KNOWN_METHOD_NAME_PREFIXES = ['get', 'is', 'to'];
/**
@@ -92,8 +91,8 @@ List<String> getVariableNameSuggestionsForExpression(DartType expectedType,
/**
* Returns possible names for a [String] variable with [text] value.
*/
-List<String> getVariableNameSuggestionsForText(String text,
- Set<String> excluded) {
+List<String> getVariableNameSuggestionsForText(
+ String text, Set<String> excluded) {
// filter out everything except of letters and white spaces
{
StringBuffer sb = new StringBuffer();
@@ -130,7 +129,7 @@ List<String> getVariableNameSuggestionsForText(String text,
void _addAll(Set<String> excluded, Set<String> result, Iterable<String> toAdd) {
for (String item in toAdd) {
// add name based on "item", but not "excluded"
- for (int suffix = 1; ; suffix++) {
+ for (int suffix = 1;; suffix++) {
// prepare name, just "item" or "item2", "item3", etc
String name = item;
if (suffix > 1) {
@@ -219,7 +218,6 @@ String _getBaseNameFromExpression(Expression expression) {
return name;
}
-
String _getBaseNameFromLocationInParent(Expression expression) {
// value in named expression
if (expression.parent is NamedExpression) {

Powered by Google App Engine
This is Rietveld 408576698