| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 errorCode == | 63 errorCode == |
| 64 StaticWarningCode | 64 StaticWarningCode |
| 65 .NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS || | 65 .NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS || |
| 66 errorCode == StaticWarningCode.CAST_TO_NON_TYPE || | 66 errorCode == StaticWarningCode.CAST_TO_NON_TYPE || |
| 67 errorCode == StaticWarningCode.TYPE_TEST_WITH_UNDEFINED_NAME || | 67 errorCode == StaticWarningCode.TYPE_TEST_WITH_UNDEFINED_NAME || |
| 68 errorCode == StaticWarningCode.UNDEFINED_CLASS || | 68 errorCode == StaticWarningCode.UNDEFINED_CLASS || |
| 69 errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED || | 69 errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED || |
| 70 errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1 || | 70 errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1 || |
| 71 errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2 || | 71 errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2 || |
| 72 errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS || | 72 errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS || |
| 73 errorCode == StaticWarningCode.FUNCTION_WITHOUT_CALL || |
| 73 errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER || | 74 errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER || |
| 74 errorCode == | 75 errorCode == |
| 75 CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE || | 76 CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE || |
| 76 errorCode == CompileTimeErrorCode.INVALID_ANNOTATION || | 77 errorCode == CompileTimeErrorCode.INVALID_ANNOTATION || |
| 77 errorCode == CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT || | 78 errorCode == CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT || |
| 78 errorCode == CompileTimeErrorCode.PART_OF_NON_PART || | 79 errorCode == CompileTimeErrorCode.PART_OF_NON_PART || |
| 79 errorCode == | 80 errorCode == |
| 80 CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT || | 81 CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT || |
| 81 errorCode == CompileTimeErrorCode.URI_DOES_NOT_EXIST || | 82 errorCode == CompileTimeErrorCode.URI_DOES_NOT_EXIST || |
| 82 errorCode == HintCode.CAN_BE_NULL_AFTER_NULL_AWARE || | 83 errorCode == HintCode.CAN_BE_NULL_AFTER_NULL_AWARE || |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 static const CREATE_FILE = | 148 static const CREATE_FILE = |
| 148 const FixKind('CREATE_FILE', 50, "Create file '{0}'"); | 149 const FixKind('CREATE_FILE', 50, "Create file '{0}'"); |
| 149 static const CREATE_FUNCTION = | 150 static const CREATE_FUNCTION = |
| 150 const FixKind('CREATE_FUNCTION', 51, "Create function '{0}'"); | 151 const FixKind('CREATE_FUNCTION', 51, "Create function '{0}'"); |
| 151 static const CREATE_GETTER = | 152 static const CREATE_GETTER = |
| 152 const FixKind('CREATE_GETTER', 50, "Create getter '{0}'"); | 153 const FixKind('CREATE_GETTER', 50, "Create getter '{0}'"); |
| 153 static const CREATE_LOCAL_VARIABLE = | 154 static const CREATE_LOCAL_VARIABLE = |
| 154 const FixKind('CREATE_LOCAL_VARIABLE', 50, "Create local variable '{0}'"); | 155 const FixKind('CREATE_LOCAL_VARIABLE', 50, "Create local variable '{0}'"); |
| 155 static const CREATE_METHOD = | 156 static const CREATE_METHOD = |
| 156 const FixKind('CREATE_METHOD', 50, "Create method '{0}'"); | 157 const FixKind('CREATE_METHOD', 50, "Create method '{0}'"); |
| 158 static const CREATE_MISSING_METHOD_CALL = |
| 159 const FixKind('CREATE_MISSING_METHOD_CALL', 49, "Create method 'call'."); |
| 157 static const CREATE_MISSING_OVERRIDES = const FixKind( | 160 static const CREATE_MISSING_OVERRIDES = const FixKind( |
| 158 'CREATE_MISSING_OVERRIDES', 49, "Create {0} missing override(s)"); | 161 'CREATE_MISSING_OVERRIDES', 49, "Create {0} missing override(s)"); |
| 159 static const CREATE_NO_SUCH_METHOD = const FixKind( | 162 static const CREATE_NO_SUCH_METHOD = const FixKind( |
| 160 'CREATE_NO_SUCH_METHOD', 51, "Create 'noSuchMethod' method"); | 163 'CREATE_NO_SUCH_METHOD', 51, "Create 'noSuchMethod' method"); |
| 161 static const IMPORT_LIBRARY_PREFIX = const FixKind('IMPORT_LIBRARY_PREFIX', | 164 static const IMPORT_LIBRARY_PREFIX = const FixKind('IMPORT_LIBRARY_PREFIX', |
| 162 51, "Use imported library '{0}' with prefix '{1}'"); | 165 51, "Use imported library '{0}' with prefix '{1}'"); |
| 163 static const IMPORT_LIBRARY_PROJECT = | 166 static const IMPORT_LIBRARY_PROJECT = |
| 164 const FixKind('IMPORT_LIBRARY_PROJECT', 49, "Import library '{0}'"); | 167 const FixKind('IMPORT_LIBRARY_PROJECT', 49, "Import library '{0}'"); |
| 165 static const IMPORT_LIBRARY_SDK = | 168 static const IMPORT_LIBRARY_SDK = |
| 166 const FixKind('IMPORT_LIBRARY_SDK', 49, "Import library '{0}'"); | 169 const FixKind('IMPORT_LIBRARY_SDK', 49, "Import library '{0}'"); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 @override | 233 @override |
| 231 final AnalysisError error; | 234 final AnalysisError error; |
| 232 | 235 |
| 233 FixContextImpl(this.resourceProvider, this.analysisContext, this.error); | 236 FixContextImpl(this.resourceProvider, this.analysisContext, this.error); |
| 234 | 237 |
| 235 FixContextImpl.from(FixContext other) | 238 FixContextImpl.from(FixContext other) |
| 236 : resourceProvider = other.resourceProvider, | 239 : resourceProvider = other.resourceProvider, |
| 237 analysisContext = other.analysisContext, | 240 analysisContext = other.analysisContext, |
| 238 error = other.error; | 241 error = other.error; |
| 239 } | 242 } |
| OLD | NEW |