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

Unified Diff: editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/correction/QuickFixProcessorImpl.java

Issue 241823002: Change UNDEFINED_FUNCTION from an error to a warning (issues 18274, 15315). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/CompileTimeErrorCode.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8ae02eb1c2b9c13b94218688f8c773b249b355cc..b84f08c9f48529fb9a289f66b162e37332666ef2 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
@@ -342,11 +342,6 @@ public class QuickFixProcessorImpl implements QuickFixProcessor {
if (errorCode == CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT) {
addFix_createConstructorSuperExplicit();
}
- if (errorCode == CompileTimeErrorCode.UNDEFINED_FUNCTION) {
- addFix_importLibrary_withFunction();
- addFix_undefinedFunction_useSimilar();
- addFix_undefinedFunction_create();
- }
if (errorCode == CompileTimeErrorCode.URI_DOES_NOT_EXIST) {
addFix_createPart();
addFix_addPackageDependency();
@@ -415,6 +410,11 @@ public class QuickFixProcessorImpl implements QuickFixProcessor {
if (errorCode == StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION) {
addFix_removeParentheses_inGetterInvocation();
}
+ if (errorCode == StaticTypeWarningCode.UNDEFINED_FUNCTION) {
+ addFix_importLibrary_withFunction();
+ addFix_undefinedFunction_useSimilar();
+ addFix_undefinedFunction_create();
+ }
if (errorCode == StaticTypeWarningCode.UNDEFINED_GETTER) {
addFix_createFunction_forFunctionType();
}
@@ -448,7 +448,6 @@ public class QuickFixProcessorImpl implements QuickFixProcessor {
|| errorCode == CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT
|| errorCode == CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
|| errorCode == CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
- || errorCode == CompileTimeErrorCode.UNDEFINED_FUNCTION
|| errorCode == CompileTimeErrorCode.URI_DOES_NOT_EXIST
|| errorCode == HintCode.DIVISION_OPTIMIZATION
|| errorCode == HintCode.TYPE_CHECK_IS_NOT_NULL || errorCode == HintCode.TYPE_CHECK_IS_NULL
@@ -468,6 +467,7 @@ public class QuickFixProcessorImpl implements QuickFixProcessor {
|| errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER
|| errorCode == StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER
|| errorCode == StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION
+ || errorCode == StaticTypeWarningCode.UNDEFINED_FUNCTION
|| errorCode == StaticTypeWarningCode.UNDEFINED_GETTER
|| errorCode == StaticTypeWarningCode.UNDEFINED_METHOD;
}
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/CompileTimeErrorCode.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698