Skip to content

Collapse inline Status allocations to ILog.of(Class) log sites#2628

Merged
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:modernize-plugin-getlog
Apr 27, 2026
Merged

Collapse inline Status allocations to ILog.of(Class) log sites#2628
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:modernize-plugin-getlog

Conversation

@vogella

@vogella vogella commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces Plugin.getDefault().getLog().log(new Status(...)) with ILog.of(MyClass.class).error(...) / .log(status) in non-activator classes, dropping the activator round-trip and the Status allocation where applicable. Follow-up to the counterpart cleanup in eclipse-platform/eclipse.platform.ui.

Scope of this PR is intentionally narrow: only sites where the class and the previously-used activator live in the same bundle, so log attribution is unchanged. Remaining sites (activator static log() helpers, utility Log classes, cross-bundle attribution, etc.) are deferred to follow-up PRs so each category can be reviewed on its own merits.

Files touched (9):

  • debug/org.eclipse.debug.examples.corePDADebugTarget
  • terminal/org.eclipse.terminal.connector.localLocalLauncherDelegate
  • terminal/org.eclipse.terminal.view.uiPreferencePage, TerminalsView, AbstractAction, NewTerminalViewAction, AbstractTriggerCommandHandler, InputStreamMonitor, OutputStreamMonitor

Context: vogellacompany/tasks#1837

Test plan

  • mvn clean verify -Pbuild-individual-bundles on each affected bundle
  • PDE API Tools: no new baseline errors (no API signatures change)
  • Spot-check at runtime: trigger one of the catch branches and confirm the log entry still lands in .log with the expected bundle id

@github-actions

github-actions Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   35m 15s ⏱️ -2s
 4 558 tests ±0   4 536 ✅ ±0   22 💤 ±0  0 ❌ ±0 
12 270 runs  ±0  12 114 ✅ ±0  156 💤 ±0  0 ❌ ±0 

Results for commit 479595c. ± Comparison against base commit 61d50fa.

♻️ This comment has been updated with latest results.

@vogella

vogella commented Apr 22, 2026

Copy link
Copy Markdown
Contributor Author

Build failure looks unrelated:

Error: Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:5.0.3-SNAPSHOT:test (default-test) on project org.eclipse.core.tests.resources.saveparticipant1: No tests found -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:5.0.3-SNAPSHOT:test (default-test) on project org.eclipse.core.tests.resources.saveparticipant1: No tests found
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)

Replace Plugin.getDefault().getLog().log(new Status(...)) with
ILog.of(MyClass.class).error(...) / .log(status) in non-activator
classes to drop the activator round-trip and the Status allocation
where applicable.

Only touches sites where the class and the previously-used activator
live in the same bundle, so log attribution is unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vogella vogella force-pushed the modernize-plugin-getlog branch from ccff05f to 479595c Compare April 26, 2026 07:53
@vogella vogella marked this pull request as ready for review April 26, 2026 10:57
@vogella vogella merged commit 87d1dc5 into eclipse-platform:master Apr 27, 2026
18 checks passed
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