Skip to content

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

Draft
vogella wants to merge 1 commit intoeclipse-platform:masterfrom
vogella:modernize-plugin-getlog
Draft

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

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented Apr 22, 2026

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

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>
@github-actions
Copy link
Copy Markdown
Contributor

Test Results

    51 files  ±0      51 suites  ±0   36m 13s ⏱️ -53s
 4 555 tests ±0   4 532 ✅ +3   22 💤 ±0  1 ❌  - 3 
12 261 runs  ±0  12 104 ✅ +3  156 💤 ±0  1 ❌  - 3 

For more details on these failures, see this check.

Results for commit ccff05f. ± Comparison against base commit 9e8a07f.

@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented Apr 22, 2026

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)

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