Skip to content

Use Status.error factory in e4.ui.progress and ide.application#3914

Merged
vogella merged 2 commits intoeclipse-platform:masterfrom
vogella:status-util-e4progress-ideapp
Apr 21, 2026
Merged

Use Status.error factory in e4.ui.progress and ide.application#3914
vogella merged 2 commits intoeclipse-platform:masterfrom
vogella:status-util-e4progress-ideapp

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented Apr 21, 2026

Summary

Follow-up to the StatusUtil cleanup started in PR #3906 (org.eclipse.ui.ide). Two small, self-contained sites that do not touch the workbench bundle (still deferred pending the org.eclipse.ui vs org.eclipse.ui.workbench plug-in id decision):

  • ProgressManagerUtil#exceptionStatus (org.eclipse.e4.ui.progress) — replaces the legacy StatusUtil.newStatus(...) call with Status.error(message, throwable), inlining the StatusUtil.getCause() unwrap so the attached throwable is unchanged. The sibling logException already uses Status.error and ILog.of(ProgressManagerUtil.class) — this aligns exceptionStatus with the same factory style. The legacy StatusUtil class is kept because other callers still use its getCause / getLocalizedMessage helpers.

  • IDENonDisposedReporter in IDEWorkbenchAdvisor (org.eclipse.ui.ide.application) — replaces the cross-bundle org.eclipse.ui.internal.ide.StatusUtil.newStatus(IStatus.ERROR, ...) with Status.error(message, throwable). Behavior change noted: previously logged under "org.eclipse.ui.ide" (IDE_WORKBENCH constant in the called StatusUtil); with the factory the plug-in id is inferred from the calling class' bundle, so the status now appears under "org.eclipse.ui.ide.application" — the bundle that actually emits the SWT-leak report.

Test plan

  • mvn clean verify -pl :org.eclipse.e4.ui.progress -Pbuild-individual-bundles
  • CI runs green for org.eclipse.ui.ide.application.

vogella added 2 commits April 21, 2026 08:50
Replaces a single cross-bundle call to org.eclipse.ui.internal.ide.StatusUtil
.newStatus(IStatus.ERROR, ...) in IDENonDisposedReporter with the
Status.error(message, throwable) factory, and drops the now-unused
StatusUtil import.

Behavior change: the call previously logged the status under
"org.eclipse.ui.ide" (IDE_WORKBENCH constant in the called StatusUtil).
With the factory the plug-in id is inferred from the calling class'
bundle, which here is "org.eclipse.ui.ide.application". Status now
appears under the bundle that actually emits the SWT-leak report.
Replaces the single StatusUtil.newStatus call in
ProgressManagerUtil#exceptionStatus with Status.error(message, throwable),
inlining the legacy StatusUtil.getCause() unwrap (return cause if non-null,
else the exception itself) so the attached throwable is unchanged. The
import on the legacy StatusUtil is dropped from this file.

The sibling method logException already used Status.error and
ILog.of(ProgressManagerUtil.class) - this aligns exceptionStatus with the
same factory style.

The legacy class org.eclipse.e4.ui.progress.internal.legacy.StatusUtil is
not removed because it still exposes getCause and getLocalizedMessage
helpers used elsewhere.
@github-actions
Copy link
Copy Markdown
Contributor

Test Results

   852 files  ±0     852 suites  ±0   52m 5s ⏱️ - 1m 25s
 7 911 tests ±0   7 668 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 235 runs  ±0  19 580 ✅ ±0  655 💤 ±0  0 ❌ ±0 

Results for commit 1b79ab2. ± Comparison against base commit 67ae681.

@vogella vogella merged commit 1cbae34 into eclipse-platform:master Apr 21, 2026
18 checks passed
@vogella vogella deleted the status-util-e4progress-ideapp branch April 21, 2026 10:21
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