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: editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/correction/QuickFixProcessorImpl.java

Issue 293743003: Issue 18863. Quick fix for "create method" should work with hints. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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: editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/correction/QuickFixProcessorImpl.java
diff --git a/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/correction/QuickFixProcessorImpl.java b/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/correction/QuickFixProcessorImpl.java
index ba8cd67b96c8eaac344ba6b1a8638dbd42282985..d2ced3151dfda95f3173cc7f8e0530d52f38b52d 100644
--- a/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/correction/QuickFixProcessorImpl.java
+++ b/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/correction/QuickFixProcessorImpl.java
@@ -197,6 +197,7 @@ public class QuickFixProcessorImpl implements QuickFixProcessor {
HintCode.TYPE_CHECK_IS_NULL,
HintCode.UNNECESSARY_CAST,
HintCode.UNUSED_IMPORT,
+ HintCode.UNDEFINED_METHOD,
//
ParserErrorCode.EXPECTED_TOKEN,
ParserErrorCode.GETTER_WITH_PARAMETERS,
@@ -455,7 +456,8 @@ public class QuickFixProcessorImpl implements QuickFixProcessor {
if (errorCode == StaticTypeWarningCode.UNDEFINED_GETTER) {
addFix_createFunction_forFunctionType();
}
- if (errorCode == StaticTypeWarningCode.UNDEFINED_METHOD) {
+ if (errorCode == HintCode.UNDEFINED_METHOD
+ || errorCode == StaticTypeWarningCode.UNDEFINED_METHOD) {
addFix_undefinedMethod_useSimilar();
addFix_undefinedMethod_create();
addFix_undefinedFunction_create();
@@ -494,7 +496,7 @@ public class QuickFixProcessorImpl implements QuickFixProcessor {
|| errorCode == HintCode.DIVISION_OPTIMIZATION
|| errorCode == HintCode.TYPE_CHECK_IS_NOT_NULL || errorCode == HintCode.TYPE_CHECK_IS_NULL
|| errorCode == HintCode.UNNECESSARY_CAST || errorCode == ParserErrorCode.EXPECTED_TOKEN
- || errorCode == HintCode.UNUSED_IMPORT
+ || errorCode == HintCode.UNUSED_IMPORT || errorCode == HintCode.UNDEFINED_METHOD
|| errorCode == ParserErrorCode.GETTER_WITH_PARAMETERS
|| errorCode == StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
|| errorCode == StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS

Powered by Google App Engine
This is Rietveld 408576698