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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_services/lib/src/refactoring/rename_local.dart
diff --git a/pkg/analysis_services/lib/src/refactoring/rename_local.dart b/pkg/analysis_services/lib/src/refactoring/rename_local.dart
new file mode 100644
index 0000000000000000000000000000000000000000..ebe6288eaaf38959910888f9c8ce082517945931
--- /dev/null
+++ b/pkg/analysis_services/lib/src/refactoring/rename_local.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// This code was auto-generated, is not intended to be edited, and is subject to
+// significant change. Please see the README file for more information.
+
+library services.src.refactoring.rename_local;
+
+import 'package:analysis_services/correction/change.dart';
+import 'package:analysis_services/correction/status.dart';
+import 'package:analysis_services/refactoring/refactoring.dart';
+import 'package:analysis_services/search/search_engine.dart';
+import 'package:analysis_services/src/refactoring/rename.dart';
+import 'package:analyzer/src/generated/element.dart';
+
+
+/**
+ * A [Refactoring] for renaming [LocalElement]s.
+ */
+class RenameLocalRefactoringImpl extends RenameRefactoringImpl {
+ RenameLocalRefactoringImpl(SearchEngine searchEngine, LocalElement element) :
+ super(
+ searchEngine,
+ element);
+
+ @override
+ LocalElement get element => super.element as LocalElement;
+
+ @override
+ String get refactoringName {
+ if (element is ParameterElement) {
+ return "Rename Parameter";
+ }
+ if (element is FunctionElement) {
+ return "Rename Local Function";
+ }
+ return "Rename Local Variable";
+ }
+
+ @override
+ RefactoringStatus checkFinalConditions() {
+ // TODO: implement checkFinalConditions
+ }
+
+ // TODO: implement refactoringName
+ @override
+ Change createChange() {
+ // TODO: implement createChange
+ }
+
+ @override
+ bool requiresPreview() {
+ // TODO: implement requiresPreview
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698