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

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: Fixes for review comments 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/refactoring.dart';
13 import 'package:analysis_services/search/search_engine.dart';
14 import 'package:analysis_services/src/refactoring/rename.dart';
15 import 'package:analyzer/src/generated/element.dart';
16
17
18 /**
19 * A [Refactoring] for renaming [LocalElement]s.
20 */
21 class RenameLocalRefactoringImpl extends RenameRefactoringImpl {
22 RenameLocalRefactoringImpl(SearchEngine searchEngine, LocalElement element) :
23 super(
24 searchEngine,
25 element);
26
27 @override
28 LocalElement get element => super.element as LocalElement;
29
30 @override
31 String get refactoringName {
32 if (element is ParameterElement) {
33 return "Rename Parameter";
34 }
35 if (element is FunctionElement) {
36 return "Rename Local Function";
37 }
38 return "Rename Local Variable";
39 }
40
41 @override
42 RefactoringStatus checkFinalConditions() {
43 // TODO: implement checkFinalConditions
44 }
45
46 // TODO: implement refactoringName
47 @override
48 Change createChange() {
49 // TODO: implement createChange
50 }
51
52 @override
53 bool requiresPreview() {
54 // TODO: implement requiresPreview
55 }
56 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698