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

Unified Diff: pkg/analysis_services/lib/src/refactoring/rename_library.dart

Issue 484733003: Import analysis_services.dart into analysis_server.dart. (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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_services/lib/src/refactoring/rename_library.dart
diff --git a/pkg/analysis_services/lib/src/refactoring/rename_library.dart b/pkg/analysis_services/lib/src/refactoring/rename_library.dart
deleted file mode 100644
index f4235b16699363660660fe8cf619db6333545ce8..0000000000000000000000000000000000000000
--- a/pkg/analysis_services/lib/src/refactoring/rename_library.dart
+++ /dev/null
@@ -1,61 +0,0 @@
-// 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.
-
-library services.src.refactoring.rename_library;
-
-import 'dart:async';
-
-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/naming_conventions.dart';
-import 'package:analysis_services/src/refactoring/rename.dart';
-import 'package:analyzer/src/generated/element.dart';
-
-
-/**
- * A [Refactoring] for renaming [LibraryElement]s.
- */
-class RenameLibraryRefactoringImpl extends RenameRefactoringImpl {
- RenameLibraryRefactoringImpl(SearchEngine searchEngine,
- LibraryElement element)
- : super(searchEngine, element);
-
- @override
- LibraryElement get element => super.element as LibraryElement;
-
- @override
- String get refactoringName {
- return "Rename Library";
- }
-
- @override
- Future<RefactoringStatus> checkFinalConditions() {
- RefactoringStatus result = new RefactoringStatus();
- return new Future.value(result);
- }
-
- @override
- RefactoringStatus checkNewName() {
- RefactoringStatus result = super.checkNewName();
- result.addStatus(validateLibraryName(newName));
- return result;
- }
-
- @override
- Future<Change> createChange() {
- Change change = new Change(refactoringName);
- // update declaration
- addDeclarationEdit(change, element);
- // update references
- return searchEngine.searchReferences(element).then((refMatches) {
- List<SourceReference> references = getSourceReferences(refMatches);
- for (SourceReference reference in references) {
- addReferenceEdit(change, reference);
- }
- return change;
- });
- }
-}

Powered by Google App Engine
This is Rietveld 408576698