Commit 4391a91
Fix incorrect SubMonitor usage patterns
This commit addresses SubMonitor anti-patterns as described in
https://www.eclipse.org/articles/Article-Progress-Monitors/article.html
Changes:
1. Removed unnecessary done() calls on monitors after SubMonitor.convert()
- SubMonitor automatically handles done() when work is complete
- Affected files:
* Refactoring.java
* PerformChangeOperation.java
* PerformRefactoringOperation.java
* MultiStateTextFileChange.java
* TextChange.java
* SmartImportJob.java (2 instances)
* SaveablesList.java
* SaveableHelper.java
* CheckConditionsContext.java
2. Removed redundant isCanceled() checks after split() calls
- split() already includes implicit cancellation checks
- Affected files:
* ProcessorBasedRefactoring.java (4 instances)
* CheckConditionsContext.java
* SaveablesList.java
* SaveableHelper.java
These changes improve code quality by following SubMonitor best practices
and removing redundant code that could mask issues.1 parent 9c171a0 commit 4391a91
File tree
10 files changed
+18
-55
lines changed- bundles
- org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring
- participants
- org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer
- org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal
10 files changed
+18
-55
lines changedLines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
439 | 438 | | |
440 | 439 | | |
441 | 440 | | |
| |||
Lines changed: 11 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
215 | 211 | | |
216 | | - | |
217 | | - | |
| 212 | + | |
| 213 | + | |
218 | 214 | | |
219 | 215 | | |
220 | 216 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
139 | 138 | | |
140 | 139 | | |
141 | 140 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | 165 | | |
167 | 166 | | |
168 | 167 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
251 | 250 | | |
252 | 251 | | |
253 | 252 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | 126 | | |
130 | | - | |
131 | 127 | | |
132 | 128 | | |
133 | 129 | | |
| |||
Lines changed: 0 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | 235 | | |
239 | 236 | | |
240 | 237 | | |
| |||
270 | 267 | | |
271 | 268 | | |
272 | 269 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | 270 | | |
277 | 271 | | |
278 | 272 | | |
| |||
292 | 286 | | |
293 | 287 | | |
294 | 288 | | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | 289 | | |
299 | 290 | | |
300 | 291 | | |
| |||
334 | 325 | | |
335 | 326 | | |
336 | 327 | | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | 328 | | |
341 | 329 | | |
342 | 330 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
387 | 386 | | |
388 | 387 | | |
389 | 388 | | |
| |||
512 | 511 | | |
513 | 512 | | |
514 | 513 | | |
515 | | - | |
516 | 514 | | |
517 | 515 | | |
518 | 516 | | |
| |||
Lines changed: 7 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
199 | 193 | | |
200 | | - | |
201 | | - | |
| 194 | + | |
202 | 195 | | |
203 | 196 | | |
204 | 197 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
796 | 796 | | |
797 | 797 | | |
798 | 798 | | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | 799 | | |
803 | | - | |
804 | 800 | | |
805 | 801 | | |
806 | 802 | | |
| |||
0 commit comments