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

Side by Side Diff: pkg/analysis_server/lib/src/edit/edit_domain.dart

Issue 1015513003: Issue 22757. Create pubspec.yaml file change on project rename. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/refactoring/move_file.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library edit.domain; 5 library edit.domain;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/analysis_server.dart'; 9 import 'package:analysis_server/src/analysis_server.dart';
10 import 'package:analysis_server/src/collections.dart'; 10 import 'package:analysis_server/src/collections.dart';
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 if (units.isNotEmpty) { 484 if (units.isNotEmpty) {
485 refactoring = 485 refactoring =
486 new InlineMethodRefactoring(searchEngine, units[0], offset); 486 new InlineMethodRefactoring(searchEngine, units[0], offset);
487 } 487 }
488 } 488 }
489 if (kind == RefactoringKind.MOVE_FILE) { 489 if (kind == RefactoringKind.MOVE_FILE) {
490 ContextSourcePair contextSource = server.getContextSourcePair(file); 490 ContextSourcePair contextSource = server.getContextSourcePair(file);
491 engine.AnalysisContext context = contextSource.context; 491 engine.AnalysisContext context = contextSource.context;
492 Source source = contextSource.source; 492 Source source = contextSource.source;
493 refactoring = new MoveFileRefactoring( 493 refactoring = new MoveFileRefactoring(
494 server.resourceProvider.pathContext, searchEngine, context, source); 494 server.resourceProvider, searchEngine, context, source, file);
495 } 495 }
496 if (kind == RefactoringKind.RENAME) { 496 if (kind == RefactoringKind.RENAME) {
497 List<AstNode> nodes = server.getNodesAtOffset(file, offset); 497 List<AstNode> nodes = server.getNodesAtOffset(file, offset);
498 List<Element> elements = server.getElementsOfNodes(nodes, offset); 498 List<Element> elements = server.getElementsOfNodes(nodes, offset);
499 if (nodes.isNotEmpty && elements.isNotEmpty) { 499 if (nodes.isNotEmpty && elements.isNotEmpty) {
500 AstNode node = nodes[0]; 500 AstNode node = nodes[0];
501 Element element = elements[0]; 501 Element element = elements[0];
502 if (element is FieldFormalParameterElement) { 502 if (element is FieldFormalParameterElement) {
503 element = (element as FieldFormalParameterElement).field; 503 element = (element as FieldFormalParameterElement).field;
504 } 504 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 } 625 }
626 if (refactoring is RenameRefactoring) { 626 if (refactoring is RenameRefactoring) {
627 RenameRefactoring renameRefactoring = refactoring; 627 RenameRefactoring renameRefactoring = refactoring;
628 RenameOptions renameOptions = params.options; 628 RenameOptions renameOptions = params.options;
629 renameRefactoring.newName = renameOptions.newName; 629 renameRefactoring.newName = renameOptions.newName;
630 return renameRefactoring.checkNewName(); 630 return renameRefactoring.checkNewName();
631 } 631 }
632 return new RefactoringStatus(); 632 return new RefactoringStatus();
633 } 633 }
634 } 634 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/refactoring/move_file.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698