Use Status.error factory in e4.ui.progress and ide.application#3914
Merged
vogella merged 2 commits intoeclipse-platform:masterfrom Apr 21, 2026
Merged
Conversation
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.
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.uivsorg.eclipse.ui.workbenchplug-in id decision):ProgressManagerUtil#exceptionStatus(org.eclipse.e4.ui.progress) — replaces the legacyStatusUtil.newStatus(...)call withStatus.error(message, throwable), inlining theStatusUtil.getCause()unwrap so the attached throwable is unchanged. The siblinglogExceptionalready usesStatus.errorandILog.of(ProgressManagerUtil.class)— this alignsexceptionStatuswith the same factory style. The legacyStatusUtilclass is kept because other callers still use itsgetCause/getLocalizedMessagehelpers.IDENonDisposedReporterinIDEWorkbenchAdvisor(org.eclipse.ui.ide.application) — replaces the cross-bundleorg.eclipse.ui.internal.ide.StatusUtil.newStatus(IStatus.ERROR, ...)withStatus.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-bundlesorg.eclipse.ui.ide.application.