@@ -39,6 +39,16 @@ abstract class ConvertGetterToMethodRefactoring implements Refactoring {
39
39
AnalysisSession session, PropertyAccessorElement element) {
40
40
return ConvertGetterToMethodRefactoringImpl (searchEngine, session, element);
41
41
}
42
+
43
+ /// Return `true` if refactoring is available, possibly without checking all
44
+ /// initial conditions.
45
+ ///
46
+ /// This value may be used to control the visibility of the refactor in the UI
47
+ /// so that it doesn't show up in locations that are obviously not
48
+ /// appropriate. Initial conditions may perform additional checks (and provide
49
+ /// user-friendly messages) for locations where a user might reasonably expect
50
+ /// to see the refactor but it's not valid for a less obvious reason.
51
+ bool isAvailable ();
42
52
}
43
53
44
54
/// [Refactoring] to convert normal [MethodDeclaration] s into getters.
@@ -49,6 +59,16 @@ abstract class ConvertMethodToGetterRefactoring implements Refactoring {
49
59
AnalysisSession session, ExecutableElement element) {
50
60
return ConvertMethodToGetterRefactoringImpl (searchEngine, session, element);
51
61
}
62
+
63
+ /// Return `true` if refactoring is available, possibly without checking all
64
+ /// initial conditions.
65
+ ///
66
+ /// This value may be used to control the visibility of the refactor in the UI
67
+ /// so that it doesn't show up in locations that are obviously not
68
+ /// appropriate. Initial conditions may perform additional checks (and provide
69
+ /// user-friendly messages) for locations where a user might reasonably expect
70
+ /// to see the refactor but it's not valid for a less obvious reason.
71
+ bool isAvailable ();
52
72
}
53
73
54
74
/// [Refactoring] to extract an expression into a local variable declaration.
@@ -100,6 +120,12 @@ abstract class ExtractLocalRefactoring implements Refactoring {
100
120
101
121
/// Return `true` if refactoring is available, possibly without checking all
102
122
/// initial conditions.
123
+ ///
124
+ /// This value may be used to control the visibility of the refactor in the UI
125
+ /// so that it doesn't show up in locations that are obviously not
126
+ /// appropriate. Initial conditions may perform additional checks (and provide
127
+ /// user-friendly messages) for locations where a user might reasonably expect
128
+ /// to see the refactor but it's not valid for a less obvious reason.
103
129
bool isAvailable ();
104
130
}
105
131
@@ -168,6 +194,12 @@ abstract class ExtractMethodRefactoring implements Refactoring {
168
194
169
195
/// Return `true` if refactoring is available, possibly without checking all
170
196
/// initial conditions.
197
+ ///
198
+ /// This value may be used to control the visibility of the refactor in the UI
199
+ /// so that it doesn't show up in locations that are obviously not
200
+ /// appropriate. Initial conditions may perform additional checks (and provide
201
+ /// user-friendly messages) for locations where a user might reasonably expect
202
+ /// to see the refactor but it's not valid for a less obvious reason.
171
203
bool isAvailable ();
172
204
}
173
205
@@ -195,6 +227,12 @@ abstract class ExtractWidgetRefactoring implements Refactoring {
195
227
196
228
/// Return `true` if refactoring is available, possibly without checking all
197
229
/// initial conditions.
230
+ ///
231
+ /// This value may be used to control the visibility of the refactor in the UI
232
+ /// so that it doesn't show up in locations that are obviously not
233
+ /// appropriate. Initial conditions may perform additional checks (and provide
234
+ /// user-friendly messages) for locations where a user might reasonably expect
235
+ /// to see the refactor but it's not valid for a less obvious reason.
198
236
bool isAvailable ();
199
237
}
200
238
@@ -214,6 +252,12 @@ abstract class InlineLocalRefactoring implements Refactoring {
214
252
215
253
/// Return `true` if refactoring is available, possibly without checking all
216
254
/// initial conditions.
255
+ ///
256
+ /// This value may be used to control the visibility of the refactor in the UI
257
+ /// so that it doesn't show up in locations that are obviously not
258
+ /// appropriate. Initial conditions may perform additional checks (and provide
259
+ /// user-friendly messages) for locations where a user might reasonably expect
260
+ /// to see the refactor but it's not valid for a less obvious reason.
217
261
bool isAvailable ();
218
262
}
219
263
@@ -246,6 +290,12 @@ abstract class InlineMethodRefactoring implements Refactoring {
246
290
247
291
/// Return `true` if refactoring is available, possibly without checking all
248
292
/// initial conditions.
293
+ ///
294
+ /// This value may be used to control the visibility of the refactor in the UI
295
+ /// so that it doesn't show up in locations that are obviously not
296
+ /// appropriate. Initial conditions may perform additional checks (and provide
297
+ /// user-friendly messages) for locations where a user might reasonably expect
298
+ /// to see the refactor but it's not valid for a less obvious reason.
249
299
bool isAvailable ();
250
300
}
251
301
0 commit comments