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

Side by Side Diff: pkg/analysis_server/lib/src/services/correction/fix.dart

Issue 2813553006: Split error code to ease future improvements (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/correction/fix_internal.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/correction/fix_internal.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698