Skip to content

Modernize remaining getDefault().getLog() log sites#3913

Merged
vogella merged 2 commits intoeclipse-platform:masterfrom
vogella:modernize-logging-api-usage-2
Apr 21, 2026
Merged

Modernize remaining getDefault().getLog() log sites#3913
vogella merged 2 commits intoeclipse-platform:masterfrom
vogella:modernize-logging-api-usage-2

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented Apr 21, 2026

Summary

Follow-up to logging API modernization. Replaces remaining Plugin.getDefault().getLog().log(new Status(...)) and Plugin.getDefault().getLog().log(status) call sites with ILog.of(Class) / ILog.get():

  • TemplateEditorUI (org.eclipse.ui.examples.javaeditor) — collapses the new Status(...) construction into ILog.of(...).error(msg, t).
  • UIPreferenceInitializer (org.eclipse.ui) — drops the UIPlugin.getDefault() round-trip.
  • ProjectEncodingMarkerResolutionGenerator (org.eclipse.ui.ide) — class lives in org.eclipse.ui.ide but previously logged via UIPlugin (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) — static log(IStatus) helper now uses ILog.get(), matching the convention from f75764e / e2f30f7.

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.

Test plan

  • mvn clean verify -pl :org.eclipse.core.filebuffers.tests -Pbuild-individual-bundles
  • mvn clean verify -pl :org.eclipse.ltk.ui.refactoring.tests -Pbuild-individual-bundles
  • CI runs green for org.eclipse.ui, org.eclipse.ui.ide, and the javaeditor example.

@vogella vogella force-pushed the modernize-logging-api-usage-2 branch from e9157b3 to bc118ce Compare April 21, 2026 06:48
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Test Results

   852 files  ±0     852 suites  ±0   54m 0s ⏱️ +18s
 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 729727f. ± Comparison against base commit 1cbae34.

♻️ This comment has been updated with latest results.

vogella added 2 commits April 21, 2026 12:29
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.
@vogella vogella force-pushed the modernize-logging-api-usage-2 branch from bc118ce to 729727f Compare April 21, 2026 10:29
@vogella vogella merged commit 86c2766 into eclipse-platform:master Apr 21, 2026
18 checks passed
@vogella vogella deleted the modernize-logging-api-usage-2 branch April 21, 2026 11:51
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