Modernize remaining getDefault().getLog() log sites#3913
Merged
vogella merged 2 commits intoeclipse-platform:masterfrom Apr 21, 2026
Merged
Modernize remaining getDefault().getLog() log sites#3913vogella merged 2 commits intoeclipse-platform:masterfrom
vogella merged 2 commits intoeclipse-platform:masterfrom
Conversation
e9157b3 to
bc118ce
Compare
Contributor
Replace Plugin.getDefault().getLog() with ILog.of(Class) / ILog.get() to drop the Activator round-trip and collapse Status construction where applicable. In ProjectEncodingMarkerResolutionGenerator, the class lives in org.eclipse.ui.ide but previously logged via UIPlugin (org.eclipse.ui); ILog.of(...) now routes the log to the containing bundle, which matches the class location. The workbench bundle (org.eclipse.ui.workbench) is intentionally deferred until the org.eclipse.ui vs org.eclipse.ui.workbench plug-in id question is resolved.
bc118ce to
729727f
Compare
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 logging API modernization. Replaces remaining
Plugin.getDefault().getLog().log(new Status(...))andPlugin.getDefault().getLog().log(status)call sites withILog.of(Class)/ILog.get():TemplateEditorUI(org.eclipse.ui.examples.javaeditor) — collapses thenew Status(...)construction intoILog.of(...).error(msg, t).UIPreferenceInitializer(org.eclipse.ui) — drops theUIPlugin.getDefault()round-trip.ProjectEncodingMarkerResolutionGenerator(org.eclipse.ui.ide) — class lives inorg.eclipse.ui.idebut previously logged viaUIPlugin(org.eclipse.ui);ILog.of(...)now routes to the bundle the class lives in.ResourceHelper(org.eclipse.core.filebuffers.tests) — drops the activator lookup.RefactoringUITestPlugin(org.eclipse.ltk.ui.refactoring.tests) — staticlog(IStatus)helper now usesILog.get(), matching the convention from f75764e / e2f30f7.The workbench bundle (
org.eclipse.ui.workbench) is intentionally deferred until theorg.eclipse.uivsorg.eclipse.ui.workbenchplug-in id question is resolved.Test plan
mvn clean verify -pl :org.eclipse.core.filebuffers.tests -Pbuild-individual-bundlesmvn clean verify -pl :org.eclipse.ltk.ui.refactoring.tests -Pbuild-individual-bundlesorg.eclipse.ui,org.eclipse.ui.ide, and the javaeditor example.