diff options
author | Lars Vogel | 2020-05-22 12:53:16 +0000 |
---|---|---|
committer | Lars Vogel | 2020-05-22 14:03:32 +0000 |
commit | 2f4ce21b0a49c72dd11f7fa7b55d7017dc770a34 (patch) | |
tree | dec761a0d9f9f1b13f7e0c8f73e36194d8a523a5 | |
parent | 9892878202c1f21944b4daf70e734e0cabb481b9 (diff) | |
download | eclipse.platform.ua-2f4ce21b0a49c72dd11f7fa7b55d7017dc770a34.tar.gz eclipse.platform.ua-2f4ce21b0a49c72dd11f7fa7b55d7017dc770a34.tar.xz eclipse.platform.ua-2f4ce21b0a49c72dd11f7fa7b55d7017dc770a34.zip |
Bug 560168 - [CheatSheet] Refactor logging to more modern and less
verbose way
For org.eclipse.help using Platform.getLog(getClass()) or
Platform.getLog(CurrentClass.class) for static methods.
This is only for org.eclipse.help.ui
Change-Id: I9c653bf06811da22c69fdeb3d100b03a77ccee65
Signed-off-by: George Suaridze <suag@1c.ru>
-rw-r--r-- | org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIPlugin.java | 3 | ||||
-rw-r--r-- | org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserFactory.java | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIPlugin.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIPlugin.java index 0e10c9bf0..bd8d80f4e 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIPlugin.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIPlugin.java @@ -17,7 +17,6 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.help.internal.HelpPlugin; import org.eclipse.help.internal.base.BaseHelpSystem; import org.eclipse.help.internal.base.HelpBasePlugin; import org.eclipse.help.internal.base.HelpEvaluationContext; @@ -55,7 +54,7 @@ public class HelpUIPlugin extends AbstractUIPlugin { if (message == null) message = ""; //$NON-NLS-1$ Status errorStatus = new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, message, ex); - HelpPlugin.getDefault().getLog().log(errorStatus); + Platform.getLog(HelpUIPlugin.class).log(errorStatus); if (openDialog) ErrorDialog.openError(null, null, null, errorStatus); } diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserFactory.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserFactory.java index 166b11c6c..a63084a7e 100644 --- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserFactory.java +++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserFactory.java @@ -84,7 +84,7 @@ public class EmbeddedBrowserFactory implements IBrowserFactory { } else { Status errorStatus = new Status(IStatus.WARNING, HelpUIPlugin.PLUGIN_ID, IStatus.OK, "An error occurred during creation of embedded help browser.", new Exception(se)); //$NON-NLS-1$ - HelpPlugin.getDefault().getLog().log(errorStatus); + Platform.getLog(getClass()).log(errorStatus); } } catch (Exception e) { // Browser not implemented |