| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analysis_server.src.services.correction.fix; | 5 library analysis_server.src.services.correction.fix; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/plugin/edit/fix/fix_core.dart'; | 9 import 'package:analysis_server/plugin/edit/fix/fix_core.dart'; |
| 10 import 'package:analysis_server/src/plugin/server_plugin.dart'; | 10 import 'package:analysis_server/src/plugin/server_plugin.dart'; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 return fixes; | 45 return fixes; |
| 46 } | 46 } |
| 47 | 47 |
| 48 /** | 48 /** |
| 49 * Return true if this [errorCode] is likely to have a fix associated with it. | 49 * Return true if this [errorCode] is likely to have a fix associated with it. |
| 50 */ | 50 */ |
| 51 bool hasFix(ErrorCode errorCode) => | 51 bool hasFix(ErrorCode errorCode) => |
| 52 errorCode == StaticWarningCode.UNDEFINED_CLASS_BOOLEAN || | 52 errorCode == StaticWarningCode.UNDEFINED_CLASS_BOOLEAN || |
| 53 errorCode == StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER || | 53 errorCode == StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER || |
| 54 errorCode == StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS || | 54 errorCode == StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS || |
| 55 errorCode == StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED || |
| 55 errorCode == StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR || | 56 errorCode == StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR || |
| 56 errorCode == | 57 errorCode == |
| 57 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE || | 58 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE || |
| 58 errorCode == | 59 errorCode == |
| 59 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO || | 60 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO || |
| 60 errorCode == | 61 errorCode == |
| 61 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE || | 62 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE || |
| 62 errorCode == | 63 errorCode == |
| 63 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR || | 64 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR || |
| 64 errorCode == | 65 errorCode == |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 @override | 247 @override |
| 247 final AnalysisError error; | 248 final AnalysisError error; |
| 248 | 249 |
| 249 FixContextImpl(this.resourceProvider, this.analysisContext, this.error); | 250 FixContextImpl(this.resourceProvider, this.analysisContext, this.error); |
| 250 | 251 |
| 251 FixContextImpl.from(FixContext other) | 252 FixContextImpl.from(FixContext other) |
| 252 : resourceProvider = other.resourceProvider, | 253 : resourceProvider = other.resourceProvider, |
| 253 analysisContext = other.analysisContext, | 254 analysisContext = other.analysisContext, |
| 254 error = other.error; | 255 error = other.error; |
| 255 } | 256 } |
| OLD | NEW |