Skip to content

Conversation

@vogella
Copy link
Contributor

@vogella vogella commented Nov 14, 2025

Migrated all usages of the deprecated SubProgressMonitor class to use SubMonitor following Eclipse 4.6+ best practices:

  • resources/Policy.java: Updated subMonitorFor() to use SubMonitor.convert()
  • team/InfiniteSubProgressMonitor: Refactored from inheritance to composition, now implements IProgressMonitor and delegates to SubMonitor
  • team/SubscriberSyncInfoEventHandler: Replaced anonymous SubProgressMonitor with IProgressMonitor wrapper that delegates to SubMonitor

All changes follow the official Eclipse SubMonitor migration guide.

@vogella vogella marked this pull request as draft November 14, 2025 01:20
Migrated all usages of the deprecated SubProgressMonitor class to use
SubMonitor following Eclipse 4.6+ best practices:

- resources/Policy.java: Updated subMonitorFor() to use SubMonitor.convert()
- team/InfiniteSubProgressMonitor: Refactored from inheritance to composition,
  now implements IProgressMonitor and delegates to SubMonitor
- team/SubscriberSyncInfoEventHandler: Replaced anonymous SubProgressMonitor
  with IProgressMonitor wrapper that delegates to SubMonitor

All changes follow the official Eclipse SubMonitor migration guide.
@vogella vogella force-pushed the claude/migrate-subprogressmonitor-01UEwgLsypZVZydytQGymnBM branch from a69fe4f to 877f0f4 Compare November 14, 2025 01:28
@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2025

Test Results

 1 872 files   -  81   1 872 suites   - 81   1h 16m 28s ⏱️ - 7m 12s
 4 591 tests  - 153   3 879 ✅  -   841   24 💤 ± 0    686 ❌ +  686  2 🔥 +2 
13 773 runs   - 459  11 848 ✅  - 2 202  165 💤  - 17  1 756 ❌ +1 756  4 🔥 +4 

For more details on these failures and errors, see this check.

Results for commit 50398d1. ± Comparison against base commit 3e8e40e.

This pull request removes 153 tests.
AllCompareTests AsyncExecTests ‑ testCancelOnRequeue
AllCompareTests AsyncExecTests ‑ testQueueAdd
AllCompareTests AsyncExecTests ‑ testWorker
AllCompareTests CompareFileRevisionEditorInputTest ‑ testPrepareCompareInputWithNonLocalResourceTypedElements
AllCompareTests CompareUIPluginTest ‑ testFindContentViewerDescriptorForTextType_StreamAccessor
AllCompareTests CompareUIPluginTest ‑ testFindContentViewerDescriptor_TextType_NotStreamAccessor
AllCompareTests CompareUIPluginTest ‑ testFindContentViewerDescriptor_UnknownType
AllCompareTests ContentMergeViewerTest ‑ testFFFX
AllCompareTests ContentMergeViewerTest ‑ testFFTX
AllCompareTests ContentMergeViewerTest ‑ testFFXF
…

♻️ This comment has been updated with latest results.

The previous implementation used SubMonitor.convert(monitor, ticks) which
sets work remaining on the converted monitor. This causes an error when
beginTask() is called again on the returned monitor, as SubMonitor only
allows beginTask() to be called once.

The correct approach is to use SubMonitor.convert(monitor).split(ticks),
which creates a properly configured child monitor that can have beginTask()
called on it.

This fixes test failures in org.eclipse.core.tests.resources where tests
were failing with: "beginTask may only be called once"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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