Replace Plugin.getLog() with static ILog.of(Class)#2627
Merged
vogella merged 1 commit intoApr 27, 2026
Conversation
Contributor
Author
|
Build failure also looks unrelated to this change: 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] Again I would guess that eclipse-platform/eclipse.platform.releng.aggregator#3784 might be related. |
Contributor
Switch the six single-call-site static log(IStatus) helpers to use ILog.of(SomeClass.class) instead of routing through the plugin singleton. This removes the last logging-only reason these bundles rely on getDefault()/getPlugin() and works even before the activator has stored the singleton. Affected bundles: - org.eclipse.compare.win32 - org.eclipse.unittest.ui - org.eclipse.ui.console - org.eclipse.core.variables - org.eclipse.ant.core - org.eclipse.ant.ui All of these already require org.eclipse.core.runtime >= 3.29, which is when ILog.of(Class) was introduced, so no MANIFEST changes are needed.
d9f0d77 to
0e42c68
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
log(IStatus)helpers toILog.of(SomeClass.class)instead of routing through the plugin singleton.getDefault()/getPlugin(), and logging now works even before the activator has stored the singleton.org.eclipse.core.runtime >= 3.29, which is whenILog.of(Class)was introduced.Affected bundles:
org.eclipse.compare.win32org.eclipse.unittest.uiorg.eclipse.ui.consoleorg.eclipse.core.variablesorg.eclipse.ant.coreorg.eclipse.ant.uiPart of an effort to identify activators /
getDefault()usages that can be simplified or replaced. These six are the lowest-risk starting point — each bundle has exactly onegetDefault().getLog()call site.Test plan