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

Side by Side Diff: pkg/analysis_services/lib/src/refactoring/rename_local.dart

Issue 458063002: Initial work on refactorings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information.
7
8 library services.src.refactoring.rename_local;
9
10 import 'package:analysis_services/correction/change.dart';
11 import 'package:analysis_services/correction/status.dart';
12 import 'package:analysis_services/refactoring/progress_monitor.dart';
13 import 'package:analysis_services/refactoring/refactoring.dart';
14 import 'package:analysis_services/search/search_engine.dart';
15 import 'package:analysis_services/src/refactoring/rename.dart';
16 import 'package:analyzer/src/generated/element.dart';
17
18
19 /**
20 * A [Refactoring] for renaming [LocalElement]s.
21 */
22 class RenameLocalRefactoringImpl extends RenameRefactoringImpl {
23 RenameLocalRefactoringImpl(SearchEngine searchEngine, LocalElement element) :
24 super(
25 searchEngine,
26 element);
27
28 @override
29 LocalElement get element => super.element as LocalElement;
30
31 @override
32 String get refactoringName {
33 if (element is ParameterElement) {
34 return "Rename Parameter";
35 }
36 if (element is FunctionElement) {
37 return "Rename Local Function";
38 }
39 return "Rename Local Variable";
40 }
41
42 @override
43 RefactoringStatus checkFinalConditions(ProgressMonitor pm) {
44 // TODO: implement checkFinalConditions
45 }
46
47 // TODO: implement refactoringName
48 @override
49 Change createChange(ProgressMonitor pm) {
50 // TODO: implement createChange
51 }
52
53 @override
54 bool requiresPreview() {
Brian Wilkerson 2014/08/11 16:27:47 Do we have this in the API? If not, is there any p
scheglov 2014/08/11 18:06:25 No, we don't. But we probably should. It is useful
55 // TODO: implement requiresPreview
56 }
57 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698