@@ -87,7 +87,7 @@ abstract class ExtractLocalRefactoring implements Refactoring {
87
87
* variable. The expression used to initiate the refactoring will always be
88
88
* replaced.
89
89
*/
90
- void set extractAll (bool extractAll);
90
+ set extractAll (bool extractAll);
91
91
92
92
/**
93
93
* The lengths of the expressions that would be replaced by a reference to the
@@ -100,7 +100,7 @@ abstract class ExtractLocalRefactoring implements Refactoring {
100
100
/**
101
101
* The name that the local variable should be given.
102
102
*/
103
- void set name (String name);
103
+ set name (String name);
104
104
105
105
/**
106
106
* The proposed names for the local variable.
@@ -157,14 +157,14 @@ abstract class ExtractMethodRefactoring implements Refactoring {
157
157
/**
158
158
* True if a getter should be created rather than a method.
159
159
*/
160
- void set createGetter (bool createGetter);
160
+ set createGetter (bool createGetter);
161
161
162
162
/**
163
163
* True if all occurrences of the expression or statements should be replaced
164
164
* by an invocation of the method. The expression or statements used to
165
165
* initiate the refactoring will always be replaced.
166
166
*/
167
- void set extractAll (bool extractAll);
167
+ set extractAll (bool extractAll);
168
168
169
169
/**
170
170
* The lengths of the expressions or statements that would be replaced by an
@@ -178,7 +178,7 @@ abstract class ExtractMethodRefactoring implements Refactoring {
178
178
/**
179
179
* The name that the method should be given.
180
180
*/
181
- void set name (String name);
181
+ set name (String name);
182
182
183
183
/**
184
184
* The proposed names for the method.
@@ -201,7 +201,7 @@ abstract class ExtractMethodRefactoring implements Refactoring {
201
201
/**
202
202
* The parameters that should be defined for the method.
203
203
*/
204
- void set parameters (List <RefactoringMethodParameter > parameters);
204
+ set parameters (List <RefactoringMethodParameter > parameters);
205
205
206
206
/**
207
207
* The proposed return type for the method.
@@ -211,7 +211,7 @@ abstract class ExtractMethodRefactoring implements Refactoring {
211
211
/**
212
212
* The return type that should be defined for the method.
213
213
*/
214
- void set returnType (String returnType);
214
+ set returnType (String returnType);
215
215
216
216
/**
217
217
* Validates that the [name] is a valid identifier and is appropriate for a
@@ -248,7 +248,7 @@ abstract class ExtractWidgetRefactoring implements Refactoring {
248
248
/**
249
249
* The name that the class should be given.
250
250
*/
251
- void set name (String name);
251
+ set name (String name);
252
252
253
253
/**
254
254
* Validates that the [name] is a valid identifier and is appropriate for a
@@ -313,13 +313,13 @@ abstract class InlineMethodRefactoring implements Refactoring {
313
313
* True if the method being inlined should be removed.
314
314
* It is an error if this field is `true` and [inlineAll] is `false` .
315
315
*/
316
- void set deleteSource (bool deleteSource);
316
+ set deleteSource (bool deleteSource);
317
317
318
318
/**
319
319
* True if all invocations of the method should be inlined, or false if only
320
320
* the invocation site used to create this refactoring should be inlined.
321
321
*/
322
- void set inlineAll (bool inlineAll);
322
+ set inlineAll (bool inlineAll);
323
323
324
324
/**
325
325
* True if the declaration of the method is selected.
@@ -352,7 +352,7 @@ abstract class MoveFileRefactoring implements Refactoring {
352
352
/**
353
353
* The new file path to which the given file is being moved.
354
354
*/
355
- void set newFile (String newName);
355
+ set newFile (String newName);
356
356
}
357
357
358
358
/**
@@ -436,14 +436,6 @@ class RefactoringWorkspace {
436
436
}
437
437
}
438
438
439
- class RenameRefactoringElement {
440
- final Element element;
441
- final int offset;
442
- final int length;
443
-
444
- RenameRefactoringElement (this .element, this .offset, this .length);
445
- }
446
-
447
439
/**
448
440
* Abstract [Refactoring] for renaming some [Element] .
449
441
*/
@@ -489,6 +481,33 @@ abstract class RenameRefactoring implements Refactoring {
489
481
return null ;
490
482
}
491
483
484
+ /**
485
+ * Returns the human-readable description of the kind of element being renamed
486
+ * (such as “class” or “function type alias”).
487
+ */
488
+ String get elementKindName;
489
+
490
+ /**
491
+ * Sets the new name for the [Element] .
492
+ */
493
+ set newName (String newName);
494
+
495
+ /**
496
+ * Returns the old name of the [Element] being renamed.
497
+ */
498
+ String get oldName;
499
+
500
+ /**
501
+ * Validates that the [newName] is a valid identifier and is appropriate for
502
+ * the type of the [Element] being renamed.
503
+ *
504
+ * It does not perform all the checks (such as checking for conflicts with any
505
+ * existing names in any of the scopes containing the current name), as many
506
+ * of these checks require search engine. Use [checkFinalConditions] for this
507
+ * level of checking.
508
+ */
509
+ RefactoringStatus checkNewName ();
510
+
492
511
/// Given a node/element, finds the best element to rename (for example
493
512
/// the class when on the `new` keyword).
494
513
static RenameRefactoringElement getElementToRename (
@@ -523,31 +542,12 @@ abstract class RenameRefactoring implements Refactoring {
523
542
524
543
return RenameRefactoringElement (element, offset, length);
525
544
}
545
+ }
526
546
527
- /**
528
- * Returns the human-readable description of the kind of element being renamed
529
- * (such as “class” or “function type alias”).
530
- */
531
- String get elementKindName;
532
-
533
- /**
534
- * Sets the new name for the [Element] .
535
- */
536
- void set newName (String newName);
537
-
538
- /**
539
- * Returns the old name of the [Element] being renamed.
540
- */
541
- String get oldName;
547
+ class RenameRefactoringElement {
548
+ final Element element;
549
+ final int offset;
550
+ final int length;
542
551
543
- /**
544
- * Validates that the [newName] is a valid identifier and is appropriate for
545
- * the type of the [Element] being renamed.
546
- *
547
- * It does not perform all the checks (such as checking for conflicts with any
548
- * existing names in any of the scopes containing the current name), as many
549
- * of these checks require search engine. Use [checkFinalConditions] for this
550
- * level of checking.
551
- */
552
- RefactoringStatus checkNewName ();
552
+ RenameRefactoringElement (this .element, this .offset, this .length);
553
553
}
0 commit comments