Replace Plugin.getLog() with static ILog.of(Class)#2627
Replace Plugin.getLog() with static ILog.of(Class)#2627vogella wants to merge 1 commit intoeclipse-platform:masterfrom
Conversation
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.
|
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. |
Test Results 34 files - 17 34 suites - 17 22m 1s ⏱️ - 15m 5s Results for commit d9f0d77. ± Comparison against base commit 9e8a07f. This pull request skips 25 tests. |
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