Skip to content

Migrate from SubProgressMonitor to SubMonitor#2641

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

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

Conversation

@vogella

@vogella vogella commented Nov 14, 2025

Copy link
Copy Markdown
Contributor

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
@vogella vogella force-pushed the claude/migrate-subprogressmonitor-submonitor-01JxrbTufgL8ZLDKSx9tS6hL branch from c0af4de to 6846852 Compare May 15, 2026 05:52
@vogella

vogella commented May 15, 2026

Copy link
Copy Markdown
Contributor Author

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
@vogella vogella force-pushed the claude/migrate-subprogressmonitor-submonitor-01JxrbTufgL8ZLDKSx9tS6hL branch from 6846852 to eb8e014 Compare May 30, 2026 08:55
@eclipse-jdt-bot

Copy link
Copy Markdown
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

org.eclipse.jdt.ui/META-INF/MANIFEST.MF
org.eclipse.jdt.ui/pom.xml

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 296d7c2edd1f74363ca234d999b70ca4aa0c86c3 Mon Sep 17 00:00:00 2001
From: Eclipse JDT Bot <jdt-bot@eclipse.org>
Date: Sat, 30 May 2026 08:59:15 +0000
Subject: [PATCH] Version bump(s) for 4.41 stream


diff --git a/org.eclipse.jdt.ui/META-INF/MANIFEST.MF b/org.eclipse.jdt.ui/META-INF/MANIFEST.MF
index 46e1d14032..5458e46b76 100644
--- a/org.eclipse.jdt.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.ui/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.jdt.ui
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.ui; singleton:=true
-Bundle-Version: 3.38.0.qualifier
+Bundle-Version: 3.38.100.qualifier
 Bundle-Activator: org.eclipse.jdt.internal.ui.JavaPlugin
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %providerName
diff --git a/org.eclipse.jdt.ui/pom.xml b/org.eclipse.jdt.ui/pom.xml
index a4e99280bd..9292a7ccb3 100644
--- a/org.eclipse.jdt.ui/pom.xml
+++ b/org.eclipse.jdt.ui/pom.xml
@@ -18,7 +18,7 @@
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.ui</artifactId>
-  <version>3.38.0-SNAPSHOT</version>
+  <version>3.38.100-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 
 	<build>
-- 
2.54.0

Further information are available in Common Build Issues - Missing version increments.

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

Changes:
- Migrated EditorUtility.java to use the SubMonitor pattern directly,
  removing the getSubProgressMonitor method and unused imports
- Migrated CompilationUnitDocumentProvider.java to use the 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)

The migration follows the official Eclipse migration guide:
- Replaced IProgressMonitor.beginTask() with SubMonitor.convert()
- Replaced new SubProgressMonitor(monitor, ticks) with split(ticks)
@vogella vogella force-pushed the claude/migrate-subprogressmonitor-submonitor-01JxrbTufgL8ZLDKSx9tS6hL branch from 4d443df to 12ac02d Compare June 12, 2026 15:07
@vogella vogella marked this pull request as ready for review June 12, 2026 15: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.

2 participants