From a0e74f698513e6bcf5f425cf4d523cd268aadf20 Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Wed, 22 Apr 2026 10:21:13 +0200 Subject: [PATCH 1/2] Use ILog.of(Class) instead of Platform.getLog(Class) Replace the two remaining Platform.getLog(Class) call sites with the equivalent ILog.of(Class). Functionally identical (both return the bundle's ILog without going through the Activator), but aligns with the convention used across the rest of the repo after the recent logging cleanup passes. - org.eclipse.e4.ui.css.swt.theme: ThemeEngine - org.eclipse.ui.genericeditor: GenericEditorPreferencePage --- .../org/eclipse/e4/ui/css/swt/internal/theme/ThemeEngine.java | 3 ++- .../preferences/GenericEditorPreferencePage.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bundles/org.eclipse.e4.ui.css.swt.theme/src/org/eclipse/e4/ui/css/swt/internal/theme/ThemeEngine.java b/bundles/org.eclipse.e4.ui.css.swt.theme/src/org/eclipse/e4/ui/css/swt/internal/theme/ThemeEngine.java index 5c7e4724459..1b24728d2d4 100644 --- a/bundles/org.eclipse.e4.ui.css.swt.theme/src/org/eclipse/e4/ui/css/swt/internal/theme/ThemeEngine.java +++ b/bundles/org.eclipse.e4.ui.css.swt.theme/src/org/eclipse/e4/ui/css/swt/internal/theme/ThemeEngine.java @@ -37,6 +37,7 @@ import org.eclipse.core.runtime.IExtension; import org.eclipse.core.runtime.IExtensionPoint; import org.eclipse.core.runtime.IExtensionRegistry; +import org.eclipse.core.runtime.ILog; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.RegistryFactory; @@ -431,7 +432,7 @@ public void setTheme(String themeId, boolean restore) { } } // Theme not found (e.g. it was uninstalled); fall back to default - Platform.getLog(ThemeEngine.class) + ILog.of(ThemeEngine.class) .warn("Theme '" + themeId + "' not found; falling back to default theme."); //$NON-NLS-1$ //$NON-NLS-2$ if (!E4_DEFAULT_THEME_ID.equals(themeId)) { setTheme(E4_DEFAULT_THEME_ID, restore); diff --git a/bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/preferences/GenericEditorPreferencePage.java b/bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/preferences/GenericEditorPreferencePage.java index 5680eb73f05..829152f5297 100644 --- a/bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/preferences/GenericEditorPreferencePage.java +++ b/bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/preferences/GenericEditorPreferencePage.java @@ -18,7 +18,7 @@ import java.util.List; import java.util.Map; -import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.ILog; import org.eclipse.core.runtime.preferences.PreferenceMetadata; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IMessageProvider; @@ -75,7 +75,7 @@ public boolean performOk() { try { scopedStore.save(); } catch (IOException e) { - Platform.getLog(getClass()).error("Cannot to save preferences.", e); //$NON-NLS-1$ + ILog.of(getClass()).error("Cannot to save preferences.", e); //$NON-NLS-1$ return false; } } From c0a72ca8a8d728e5313682b1a3020e76299181dd Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Wed, 22 Apr 2026 10:21:24 +0200 Subject: [PATCH 2/2] Fix typo in GenericEditorPreferencePage log message "Cannot to save preferences." -> "Cannot save preferences." --- .../genericeditor/preferences/GenericEditorPreferencePage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/preferences/GenericEditorPreferencePage.java b/bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/preferences/GenericEditorPreferencePage.java index 829152f5297..489e806d8a4 100644 --- a/bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/preferences/GenericEditorPreferencePage.java +++ b/bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/preferences/GenericEditorPreferencePage.java @@ -75,7 +75,7 @@ public boolean performOk() { try { scopedStore.save(); } catch (IOException e) { - ILog.of(getClass()).error("Cannot to save preferences.", e); //$NON-NLS-1$ + ILog.of(getClass()).error("Cannot save preferences.", e); //$NON-NLS-1$ return false; } }