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

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

Issue 17581003: Report NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT as CTEC. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: tweaks Created 7 years, 6 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/element/ClassElement.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 6d934ff266390835bd3d83590249e75f70083321..1e0cea38a1c33daaf321c0cb0c426eb5c844269e 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
@@ -369,6 +369,12 @@ public class QuickFixProcessorImpl implements QuickFixProcessor {
final InstrumentationBuilder instrumentation = Instrumentation.builder(this.getClass());
try {
ErrorCode errorCode = problem.getErrorCode();
+ if (errorCode == CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT) {
+ addFix_createConstructorSuperExplicit();
+ }
+ if (errorCode == CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT) {
+ addFix_createConstructorSuperImplicit();
+ }
if (errorCode == CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT) {
addFix_createConstructorSuperExplicit();
}
@@ -381,12 +387,6 @@ public class QuickFixProcessorImpl implements QuickFixProcessor {
if (errorCode == ParserErrorCode.GETTER_WITH_PARAMETERS) {
addFix_removeParameters_inGetterDeclaration();
}
- if (errorCode == StaticWarningCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT) {
- addFix_createConstructorSuperExplicit();
- }
- if (errorCode == StaticWarningCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT) {
- addFix_createConstructorSuperImplicit();
- }
if (errorCode == StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER) {
addFix_makeEnclosingClassAbstract();
}
@@ -447,12 +447,12 @@ public class QuickFixProcessorImpl implements QuickFixProcessor {
public boolean hasFix(AnalysisError problem) {
ErrorCode errorCode = problem.getErrorCode();
// System.out.println(errorCode.getClass() + " " + errorCode);
- return errorCode == CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
+ return errorCode == CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT
+ || errorCode == CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
+ || errorCode == CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT
|| errorCode == CompileTimeErrorCode.URI_DOES_NOT_EXIST
|| errorCode == ParserErrorCode.EXPECTED_TOKEN
|| errorCode == ParserErrorCode.GETTER_WITH_PARAMETERS
- || errorCode == StaticWarningCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT
- || errorCode == StaticWarningCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
|| errorCode == StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
|| errorCode == StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE
|| errorCode == StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/element/ClassElement.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698