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

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

Issue 2965063002: Add a quick fix for missing new (issue 30077) (Closed)
Patch Set: Created 3 years, 5 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 import 'package:analysis_server/plugin/edit/fix/fix_core.dart'; 5 import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
6 import 'package:analysis_server/src/services/correction/fix_internal.dart'; 6 import 'package:analysis_server/src/services/correction/fix_internal.dart';
7 import 'package:analyzer/error/error.dart'; 7 import 'package:analyzer/error/error.dart';
8 import 'package:analyzer/file_system/file_system.dart'; 8 import 'package:analyzer/file_system/file_system.dart';
9 import 'package:analyzer/src/dart/analysis/driver.dart'; 9 import 'package:analyzer/src/dart/analysis/driver.dart';
10 import 'package:analyzer/src/error/codes.dart'; 10 import 'package:analyzer/src/error/codes.dart';
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 static const IMPORT_LIBRARY_PROJECT2 = 147 static const IMPORT_LIBRARY_PROJECT2 =
148 const FixKind('IMPORT_LIBRARY_PROJECT2', 48, "Import library '{0}'"); 148 const FixKind('IMPORT_LIBRARY_PROJECT2', 48, "Import library '{0}'");
149 static const IMPORT_LIBRARY_PROJECT3 = 149 static const IMPORT_LIBRARY_PROJECT3 =
150 const FixKind('IMPORT_LIBRARY_PROJECT3', 49, "Import library '{0}'"); 150 const FixKind('IMPORT_LIBRARY_PROJECT3', 49, "Import library '{0}'");
151 static const IMPORT_LIBRARY_SDK = 151 static const IMPORT_LIBRARY_SDK =
152 const FixKind('IMPORT_LIBRARY_SDK', 46, "Import library '{0}'"); 152 const FixKind('IMPORT_LIBRARY_SDK', 46, "Import library '{0}'");
153 static const IMPORT_LIBRARY_SHOW = 153 static const IMPORT_LIBRARY_SHOW =
154 const FixKind('IMPORT_LIBRARY_SHOW', 45, "Update library '{0}' import"); 154 const FixKind('IMPORT_LIBRARY_SHOW', 45, "Update library '{0}' import");
155 static const INSERT_SEMICOLON = 155 static const INSERT_SEMICOLON =
156 const FixKind('INSERT_SEMICOLON', 50, "Insert ';'"); 156 const FixKind('INSERT_SEMICOLON', 50, "Insert ';'");
157 static const INVOKE_CONSTRUCTOR_USING_NEW = const FixKind(
158 'INVOKE_CONSTRUCTOR_USING_NEW', 50, "Invoke constructor using 'new'");
157 static const LINT_ADD_OVERRIDE = 159 static const LINT_ADD_OVERRIDE =
158 const FixKind('LINT_ADD_OVERRIDE', 50, "Add '@override' annotation"); 160 const FixKind('LINT_ADD_OVERRIDE', 50, "Add '@override' annotation");
159 static const LINT_REMOVE_INTERPOLATION_BRACES = const FixKind( 161 static const LINT_REMOVE_INTERPOLATION_BRACES = const FixKind(
160 'LINT_REMOVE_INTERPOLATION_BRACES', 162 'LINT_REMOVE_INTERPOLATION_BRACES',
161 50, 163 50,
162 'Remove unnecessary interpolation braces'); 164 'Remove unnecessary interpolation braces');
163 static const MAKE_CLASS_ABSTRACT = 165 static const MAKE_CLASS_ABSTRACT =
164 const FixKind('MAKE_CLASS_ABSTRACT', 50, "Make class '{0}' abstract"); 166 const FixKind('MAKE_CLASS_ABSTRACT', 50, "Make class '{0}' abstract");
165 static const REMOVE_DEAD_CODE = 167 static const REMOVE_DEAD_CODE =
166 const FixKind('REMOVE_DEAD_CODE', 50, "Remove dead code"); 168 const FixKind('REMOVE_DEAD_CODE', 50, "Remove dead code");
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 @override 241 @override
240 final AnalysisError error; 242 final AnalysisError error;
241 243
242 FixContextImpl(this.resourceProvider, this.analysisDriver, this.error); 244 FixContextImpl(this.resourceProvider, this.analysisDriver, this.error);
243 245
244 FixContextImpl.from(FixContext other) 246 FixContextImpl.from(FixContext other)
245 : resourceProvider = other.resourceProvider, 247 : resourceProvider = other.resourceProvider,
246 analysisDriver = other.analysisDriver, 248 analysisDriver = other.analysisDriver,
247 error = other.error; 249 error = other.error;
248 } 250 }
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