Skip to content

Conversation

@vogella
Copy link
Contributor

@vogella vogella commented Nov 14, 2025

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.

@vogella vogella marked this pull request as draft November 14, 2025 00:44
@vogella vogella force-pushed the claude/fix-submonitor-usage-01TksaDpbwkK6pUyfQabsKUt branch from 4a53ae5 to 4391a91 Compare November 14, 2025 00:53
@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2025

Test Results

 3 018 files  +  341   3 018 suites  +341   2h 8m 59s ⏱️ + 12m 57s
 8 234 tests ±    0   7 985 ✅ ±    0  249 💤 ±  0  0 ❌ ±0 
23 622 runs  +1 735  22 828 ✅ +1 527  794 💤 +208  0 ❌ ±0 

Results for commit cf4e18d. ± Comparison against base commit 343fd57.

♻️ This comment has been updated with latest results.

@vogella vogella force-pushed the claude/fix-submonitor-usage-01TksaDpbwkK6pUyfQabsKUt branch from 4391a91 to 326c667 Compare November 14, 2025 01:06
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.
@vogella vogella force-pushed the claude/fix-submonitor-usage-01TksaDpbwkK6pUyfQabsKUt branch from 326c667 to cf4e18d Compare November 14, 2025 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant