Skip to content

Migrate from SubProgressMonitor to SubMonitor#2641

Draft
vogella wants to merge 1 commit into
eclipse-jdt:masterfrom
vogella:claude/migrate-subprogressmonitor-submonitor-01JxrbTufgL8ZLDKSx9tS6hL
Draft

Migrate from SubProgressMonitor to SubMonitor#2641
vogella wants to merge 1 commit into
eclipse-jdt:masterfrom
vogella:claude/migrate-subprogressmonitor-submonitor-01JxrbTufgL8ZLDKSx9tS6hL

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented Nov 14, 2025

This commit migrates the codebase from the deprecated SubProgressMonitor (deprecated since Eclipse 4.6 Neon) to SubMonitor as per Eclipse API recommendations.

Changes:

  • Updated Progress.java utility class to use SubMonitor.convert() and split() methods instead of SubProgressMonitor
  • Migrated EditorUtility.java to use SubMonitor pattern directly, removing the getSubProgressMonitor method and unused imports
  • Migrated CompilationUnitDocumentProvider.java to use SubMonitor pattern in commitWorkingCopy and notifyPostSaveListeners methods
  • Removed calls to monitor.done() and subMonitor.done() where not needed (SubMonitor handles cleanup automatically in most cases)
  • Updated PREPEND_MAIN_LABEL_TO_SUBTASK usage to use plain split() as there is no direct replacement; clients should use fully- formatted task labels instead

The migration follows the official Eclipse migration guide:

  • Replaced IProgressMonitor.beginTask() with SubMonitor.convert()
  • Replaced new SubProgressMonitor(monitor, ticks) with split(ticks)
  • Replaced SUPPRESS_SUBTASK_LABEL flag with SubMonitor.SUPPRESS_SUBTASK

What it does

How to test

Author checklist

@vogella vogella marked this pull request as draft November 14, 2025 01:14
@vogella vogella force-pushed the claude/migrate-subprogressmonitor-submonitor-01JxrbTufgL8ZLDKSx9tS6hL branch 2 times, most recently from 25f7c6c to 5161d45 Compare November 14, 2025 01:34
@vogella vogella force-pushed the claude/migrate-subprogressmonitor-submonitor-01JxrbTufgL8ZLDKSx9tS6hL branch from 5161d45 to 7906c72 Compare May 14, 2026 04:25
@vogella vogella marked this pull request as ready for review May 14, 2026 04:26
@jjohnstn jjohnstn force-pushed the claude/migrate-subprogressmonitor-submonitor-01JxrbTufgL8ZLDKSx9tS6hL branch from 7906c72 to c0af4de Compare May 14, 2026 20:36
This commit migrates the codebase from the deprecated
SubProgressMonitor (deprecated since Eclipse 4.6 Neon) to
SubMonitor as per Eclipse API recommendations.

Changes:
- Updated Progress.java utility class to use SubMonitor.convert()
  and split() methods instead of SubProgressMonitor
- Migrated EditorUtility.java to use SubMonitor pattern directly,
  removing the getSubProgressMonitor method and unused imports
- Migrated CompilationUnitDocumentProvider.java to use SubMonitor
  pattern in commitWorkingCopy and notifyPostSaveListeners methods
- Removed calls to monitor.done() and subMonitor.done() where not
  needed (SubMonitor handles cleanup automatically in most cases)
- Updated PREPEND_MAIN_LABEL_TO_SUBTASK usage to use plain split()
  as there is no direct replacement; clients should use fully-
  formatted task labels instead

The migration follows the official Eclipse migration guide:
- Replaced IProgressMonitor.beginTask() with SubMonitor.convert()
- Replaced new SubProgressMonitor(monitor, ticks) with split(ticks)
- Replaced SUPPRESS_SUBTASK_LABEL flag with SubMonitor.SUPPRESS_SUBTASK
@vogella vogella force-pushed the claude/migrate-subprogressmonitor-submonitor-01JxrbTufgL8ZLDKSx9tS6hL branch from c0af4de to 6846852 Compare May 15, 2026 05:52
@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented May 15, 2026

I will split the changes in org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewTypeWizardPage.java out of this

@vogella vogella marked this pull request as draft May 15, 2026 06:00
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