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

Side by Side Diff: pkg/analysis_server/lib/src/services/refactoring/refactoring.dart

Issue 603753002: Issue 21071. Generate posix-style relative URIs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweak for isRelative check 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 unified diff | Download patch | Annotate | Revision Log
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 services.refactoring; 5 library services.refactoring;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/protocol.dart' show 9 import 'package:analysis_server/src/protocol.dart' show
10 RefactoringMethodParameter, SourceChange; 10 RefactoringMethodParameter, SourceChange;
(...skipping 10 matching lines...) Expand all
21 import 'package:analysis_server/src/services/refactoring/rename_label.dart'; 21 import 'package:analysis_server/src/services/refactoring/rename_label.dart';
22 import 'package:analysis_server/src/services/refactoring/rename_library.dart'; 22 import 'package:analysis_server/src/services/refactoring/rename_library.dart';
23 import 'package:analysis_server/src/services/refactoring/rename_local.dart'; 23 import 'package:analysis_server/src/services/refactoring/rename_local.dart';
24 import 'package:analysis_server/src/services/refactoring/rename_unit_member.dart '; 24 import 'package:analysis_server/src/services/refactoring/rename_unit_member.dart ';
25 import 'package:analysis_server/src/services/search/search_engine.dart'; 25 import 'package:analysis_server/src/services/search/search_engine.dart';
26 import 'package:analyzer/src/generated/ast.dart'; 26 import 'package:analyzer/src/generated/ast.dart';
27 import 'package:analyzer/src/generated/element.dart'; 27 import 'package:analyzer/src/generated/element.dart';
28 import 'package:analyzer/src/generated/engine.dart'; 28 import 'package:analyzer/src/generated/engine.dart';
29 import 'package:analyzer/src/generated/source.dart'; 29 import 'package:analyzer/src/generated/source.dart';
30 import 'package:analysis_server/src/services/refactoring/convert_getter_to_metho d.dart'; 30 import 'package:analysis_server/src/services/refactoring/convert_getter_to_metho d.dart';
31 import 'package:path/path.dart' as pathos;
31 32
32 33
33 /** 34 /**
34 * [Refactoring] to convert getters into normal [MethodDeclaration]s. 35 * [Refactoring] to convert getters into normal [MethodDeclaration]s.
35 */ 36 */
36 abstract class ConvertGetterToMethodRefactoring implements Refactoring { 37 abstract class ConvertGetterToMethodRefactoring implements Refactoring {
37 /** 38 /**
38 * Returns a new [ConvertMethodToGetterRefactoring] instance for converting 39 * Returns a new [ConvertMethodToGetterRefactoring] instance for converting
39 * [element] and all the corresponding hierarchy elements. 40 * [element] and all the corresponding hierarchy elements.
40 */ 41 */
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 } 283 }
283 284
284 285
285 /** 286 /**
286 * [Refactoring] to move/rename a file. 287 * [Refactoring] to move/rename a file.
287 */ 288 */
288 abstract class MoveFileRefactoring implements Refactoring { 289 abstract class MoveFileRefactoring implements Refactoring {
289 /** 290 /**
290 * Returns a new [MoveFileRefactoring] instance. 291 * Returns a new [MoveFileRefactoring] instance.
291 */ 292 */
292 factory MoveFileRefactoring(SearchEngine searchEngine, 293 factory MoveFileRefactoring(pathos.Context pathContext,
293 AnalysisContext context, Source source) { 294 SearchEngine searchEngine, AnalysisContext context, Source source) {
294 return new MoveFileRefactoringImpl(searchEngine, context, source); 295 return new MoveFileRefactoringImpl(
296 pathContext,
297 searchEngine,
298 context,
299 source);
295 } 300 }
296 301
297 /** 302 /**
298 * The new file path to which the given file is being moved. 303 * The new file path to which the given file is being moved.
299 */ 304 */
300 void set newFile(String newName); 305 void set newFile(String newName);
301 } 306 }
302 307
303 308
304 /** 309 /**
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 * Validates that the [newName] is a valid identifier and is appropriate for 416 * Validates that the [newName] is a valid identifier and is appropriate for
412 * the type of the [Element] being renamed. 417 * the type of the [Element] being renamed.
413 * 418 *
414 * It does not perform all the checks (such as checking for conflicts with any 419 * It does not perform all the checks (such as checking for conflicts with any
415 * existing names in any of the scopes containing the current name), as many 420 * existing names in any of the scopes containing the current name), as many
416 * of these checkes require search engine. Use [checkFinalConditions] for this 421 * of these checkes require search engine. Use [checkFinalConditions] for this
417 * level of checking. 422 * level of checking.
418 */ 423 */
419 RefactoringStatus checkNewName(); 424 RefactoringStatus checkNewName();
420 } 425 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698