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

Unified Diff: pkg/analysis_server/lib/src/edit/edit_domain.dart

Issue 583193005: Integration of MOVE_FILE into the server and a couple of fixes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/lib/src/generated_protocol.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/edit/edit_domain.dart
diff --git a/pkg/analysis_server/lib/src/edit/edit_domain.dart b/pkg/analysis_server/lib/src/edit/edit_domain.dart
index 746dad34d61ab982183af23ab185c27f753235ff..f912d5163b20a01dbd93c676d3441b877fe8efe7 100644
--- a/pkg/analysis_server/lib/src/edit/edit_domain.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_domain.dart
@@ -293,6 +293,11 @@ class _RefactoringManager {
new InlineMethodRefactoring(searchEngine, units[0], offset);
}
}
+ if (kind == RefactoringKind.MOVE_FILE) {
+ engine.AnalysisContext context = server.getAnalysisContext(file);
+ Source source = server.getSource(file);
+ refactoring = new MoveFileRefactoring(searchEngine, context, source);
+ }
if (kind == RefactoringKind.RENAME) {
List<AstNode> nodes = server.getNodesAtOffset(file, offset);
List<Element> elements = server.getElementsAtOffset(file, offset);
@@ -406,6 +411,12 @@ class _RefactoringManager {
inlineRefactoring.inlineAll = inlineOptions.inlineAll;
return new RefactoringStatus();
}
+ if (refactoring is MoveFileRefactoring) {
+ MoveFileRefactoring moveRefactoring = this.refactoring;
+ MoveFileOptions moveOptions = params.options;
+ moveRefactoring.newFile = moveOptions.newFile;
+ return new RefactoringStatus();
+ }
if (refactoring is RenameRefactoring) {
RenameRefactoring renameRefactoring = refactoring;
RenameOptions renameOptions = params.options;
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/lib/src/generated_protocol.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698