Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2020-05-23 11:50:19 +0000
committerLars Vogel2020-05-23 11:50:19 +0000
commit2b15bb4b31b97cb80b6e868b537f7789b7fe01d4 (patch)
treea23e47a9182a0341a6ef2097b28663f7a18cc17f
parentd6e4fc87c218d454dc1e5f39270ab1cd9451cbce (diff)
downloadeclipse.platform.ua-2b15bb4b31b97cb80b6e868b537f7789b7fe01d4.tar.gz
eclipse.platform.ua-2b15bb4b31b97cb80b6e868b537f7789b7fe01d4.tar.xz
eclipse.platform.ua-2b15bb4b31b97cb80b6e868b537f7789b7fe01d4.zip
Bug 560168 - Remove activator log method usageI20200524-0850
Change-Id: Ia6b9f83b56fac2597c40df292f85e92d52996c30 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/BaseHelpSystem.java11
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java10
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/IndexToolApplication.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/MissingContentManager.java5
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContextProvider.java9
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteExtensionProvider.java9
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIndexProvider.java9
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteSearchManager.java12
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocProvider.java7
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeRegistry.java7
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/util/HelpProperties.java8
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/browser/BrowserManager.java7
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/browser/CustomBrowser.java13
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/browser/MozillaBrowserAdapter.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/browser/StreamConsumer.java7
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/browser/macosx/DefaultBrowserAdapter.java7
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/AnalyzerDescriptor.java13
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/DefaultAnalyzer.java7
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java17
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java17
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java25
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java27
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java9
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/XHTMLSearchParticipant.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/LocalHelp.java7
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java7
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/server/WebappManager.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetManager.java20
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipantXML.java6
30 files changed, 158 insertions, 144 deletions
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/BaseHelpSystem.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/BaseHelpSystem.java
index 192129a6c..3a4716dcc 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/BaseHelpSystem.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/BaseHelpSystem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.base;
@@ -17,9 +18,7 @@ import java.net.MalformedURLException;
import java.net.URL;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProduct;
-import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
import org.eclipse.help.HelpSystem;
import org.eclipse.help.ILiveHelpAction;
import org.eclipse.help.browser.IBrowser;
@@ -167,9 +166,7 @@ public final class BaseHelpSystem {
});
}
catch (Exception e) {
- HelpBasePlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, HelpBasePlugin.PLUGIN_ID, 0,
- "Error launching help.", e)); //$NON-NLS-1$
+ Platform.getLog(BaseHelpSystem.class).error("Error launching help.", e); //$NON-NLS-1$
}
/*
@@ -186,7 +183,7 @@ public final class BaseHelpSystem {
// start the help web app
WebappManager.start("help"); //$NON-NLS-1$
} catch (Exception e) {
- HelpBasePlugin.logError(HelpBaseResources.HelpWebappNotStarted, e);
+ Platform.getLog(BaseHelpSystem.class).error(HelpBaseResources.HelpWebappNotStarted, e);
return false;
}
getInstance().webappRunning = true;
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java
index 3bf0fdca2..15b97f18c 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.base;
@@ -200,9 +201,8 @@ public class HelpDisplay {
BaseHelpSystem.getHelpBrowser(forceExternal)
.displayURL(helpURL);
} catch (Exception e) {
- HelpBasePlugin
- .logError(
- "An exception occurred while launching help. Check the log at " + Platform.getLogFileLocation().toOSString(), e); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("An exception occurred while launching help. Check the log at " //$NON-NLS-1$
+ + Platform.getLogFileLocation().toOSString(), e);
BaseHelpSystem.getDefaultErrorUtil()
.displayError(
NLS.bind(HelpBaseResources.HelpDisplay_exceptionMessage, Platform.getLogFileLocation().toOSString()));
@@ -294,7 +294,7 @@ public class HelpDisplay {
helpDisplay = (AbstractHelpDisplay) (displayElement
.createExecutableExtension(HELP_DISPLAY_CLASS_ATTRIBUTE));
} catch (CoreException e) {
- HelpBasePlugin.logStatus(e.getStatus());
+ Platform.getLog(HelpDisplay.class).log(e.getStatus());
}
}
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/IndexToolApplication.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/IndexToolApplication.java
index 1488ac742..7e042286e 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/IndexToolApplication.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/IndexToolApplication.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.base;
@@ -22,6 +23,7 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.osgi.util.NLS;
@@ -53,7 +55,7 @@ public class IndexToolApplication implements IApplication {
}
catch (Exception e) {
e.printStackTrace();
- HelpBasePlugin.logError("Preindexing failed.", e); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("Preindexing failed.", e); //$NON-NLS-1$
}
return EXIT_OK;
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/MissingContentManager.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/MissingContentManager.java
index 8b0e6b3b9..2d1d336d2 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/MissingContentManager.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/MissingContentManager.java
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.base;
@@ -108,7 +109,7 @@ public class MissingContentManager {
} catch (Exception e) {
// log and skip
String msg = "Exception reading " + ELEMENT_NAME_PLACEHOLDER + " extension in bundle" + pluginId; //$NON-NLS-1$ //$NON-NLS-2$
- HelpPlugin.logError(msg, e);
+ Platform.getLog(getClass()).error(msg, e);
}
}
}
@@ -213,7 +214,7 @@ public class MissingContentManager {
try {
prefs.flush();
} catch (BackingStoreException e) {
- HelpBasePlugin.logError("Cannot save preferences", e); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("Cannot save preferences", e); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContextProvider.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContextProvider.java
index 28b26d536..fabd05f83 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContextProvider.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContextProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2019 IBM Corporation and others.
+ * Copyright (c) 2006, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.base.remote;
@@ -18,9 +19,9 @@ import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.help.AbstractContextProvider;
import org.eclipse.help.IContext;
-import org.eclipse.help.internal.base.HelpBasePlugin;
import org.eclipse.help.internal.base.util.ProxyUtil;
import org.eclipse.help.internal.context.Context;
import org.eclipse.help.internal.dynamic.DocumentReader;
@@ -83,10 +84,10 @@ public class RemoteContextProvider extends AbstractContextProvider {
} catch (IOException e) {
String msg = "I/O error while trying to contact the remote help server"; //$NON-NLS-1$
- HelpBasePlugin.logError(msg, e);
+ Platform.getLog(getClass()).error(msg, e);
} catch (Throwable t) {
String msg = "Internal error while reading search results from remote server"; //$NON-NLS-1$
- HelpBasePlugin.logError(msg, t);
+ Platform.getLog(getClass()).error(msg, t);
} finally {
if (in != null) {
try {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteExtensionProvider.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteExtensionProvider.java
index 84e57dcce..7e4f7f7ac 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteExtensionProvider.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteExtensionProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2016 IBM Corporation and others.
+ * Copyright (c) 2006, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.base.remote;
@@ -20,10 +21,10 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.help.AbstractContentExtensionProvider;
import org.eclipse.help.IContentExtension;
import org.eclipse.help.internal.UAElement;
-import org.eclipse.help.internal.base.HelpBasePlugin;
import org.eclipse.help.internal.base.util.ProxyUtil;
import org.eclipse.help.internal.dynamic.DocumentReader;
@@ -68,10 +69,10 @@ public class RemoteExtensionProvider extends AbstractContentExtensionProvider {
Collections.addAll(contributions, children);
} catch (IOException e) {
String msg = "I/O error while trying to contact the remote help server"; //$NON-NLS-1$
- HelpBasePlugin.logError(msg, e);
+ Platform.getLog(getClass()).error(msg, e);
} catch (Throwable t) {
String msg = "Internal error while reading topic extensions from remote server"; //$NON-NLS-1$
- HelpBasePlugin.logError(msg, t);
+ Platform.getLog(getClass()).error(msg, t);
} finally {
if (in != null) {
try {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIndexProvider.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIndexProvider.java
index 6bab2094d..49e872af0 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIndexProvider.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIndexProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2019 IBM Corporation and others.
+ * Copyright (c) 2006, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.base.remote;
@@ -20,9 +21,9 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.help.AbstractIndexProvider;
import org.eclipse.help.IIndexContribution;
-import org.eclipse.help.internal.base.HelpBasePlugin;
import org.eclipse.help.internal.base.util.ProxyUtil;
/*
@@ -76,10 +77,10 @@ public class RemoteIndexProvider extends AbstractIndexProvider {
Collections.addAll(contributions, result);
} catch (IOException e) {
String msg = "I/O error while trying to contact the remote help server"; //$NON-NLS-1$
- HelpBasePlugin.logError(msg, e);
+ Platform.getLog(getClass()).error(msg, e);
} catch (Throwable t) {
String msg = "Internal error while reading index contents from remote server"; //$NON-NLS-1$
- HelpBasePlugin.logError(msg, t);
+ Platform.getLog(getClass()).error(msg, t);
} finally {
if (in != null) {
try {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteSearchManager.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteSearchManager.java
index 02c657bc9..b30deaeea 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteSearchManager.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteSearchManager.java
@@ -1,5 +1,5 @@
/***************************************************************************************************
- * Copyright (c) 2006, 2016 IBM Corporation and others.
+ * Copyright (c) 2006, 2020 IBM Corporation and others.
*
* This program and the
* accompanying materials are made available under the terms of the Eclipse Public License 2.0
@@ -8,7 +8,9 @@
*
* SPDX-License-Identifier: EPL-2.0
*
- * Contributors: IBM Corporation - initial API and implementation
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
**************************************************************************************************/
package org.eclipse.help.internal.base.remote;
@@ -18,8 +20,8 @@ import java.net.URL;
import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.help.internal.base.HelpBasePlugin;
import org.eclipse.help.internal.base.util.ProxyUtil;
import org.eclipse.help.internal.search.ISearchHitCollector;
import org.eclipse.help.internal.search.ISearchQuery;
@@ -81,10 +83,10 @@ public class RemoteSearchManager {
collector.addHits(hits, null);
} catch (IOException e) {
String msg = "I/O error while trying to contact the remote help server"; //$NON-NLS-1$
- HelpBasePlugin.logError(msg, e);
+ Platform.getLog(getClass()).error(msg, e);
} catch (Throwable t) {
String msg = "Internal error while reading search results from remote server"; //$NON-NLS-1$
- HelpBasePlugin.logError(msg, t);
+ Platform.getLog(getClass()).error(msg, t);
} finally {
if (in != null) {
try {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocProvider.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocProvider.java
index bf2026582..60e5287b8 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocProvider.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2019 IBM Corporation and others.
+ * Copyright (c) 2006, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.base.remote;
@@ -17,9 +18,9 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.help.AbstractTocProvider;
import org.eclipse.help.ITocContribution;
-import org.eclipse.help.internal.base.HelpBasePlugin;
import org.eclipse.help.internal.base.util.ProxyUtil;
/*
@@ -117,7 +118,7 @@ public class RemoteTocProvider extends AbstractTocProvider {
}
} catch (Throwable t) {
String msg = "Internal error while reading TOC contents from remote server"; //$NON-NLS-1$
- HelpBasePlugin.logError(msg, t);
+ Platform.getLog(getClass()).error(msg, t);
RemoteHelp.setError(t);
} finally {
if (in != null) {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeRegistry.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeRegistry.java
index 5ef5b6542..4c4ebe243 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeRegistry.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeRegistry.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2015 IBM Corporation and others.
+ * Copyright (c) 2010, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.base.scope;
@@ -26,7 +27,6 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.help.base.AbstractHelpScope;
import org.eclipse.help.base.IHelpScopeProducer;
import org.eclipse.help.base.IScopeHandle;
-import org.eclipse.help.internal.base.HelpBasePlugin;
public class ScopeRegistry {
@@ -82,8 +82,7 @@ public class ScopeRegistry {
try {
obj = element.createExecutableExtension("class"); //$NON-NLS-1$
} catch (CoreException e) {
- HelpBasePlugin.logError("Create extension failed:[" //$NON-NLS-1$
- + SCOPE_XP_NAME + "].", e); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("Create extension failed:[" + SCOPE_XP_NAME + "].", e); //$NON-NLS-1$ //$NON-NLS-2$
}
if (obj instanceof AbstractHelpScope) {
String id = element.getAttribute("id"); //$NON-NLS-1$
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/HelpProperties.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/HelpProperties.java
index f8efb0b35..b1718ddac 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/HelpProperties.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/HelpProperties.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.base.util;
@@ -17,7 +18,6 @@ import java.io.*;
import java.util.Properties;
import org.eclipse.core.runtime.*;
-import org.eclipse.help.internal.*;
/**
* Properties stored in file.
@@ -73,7 +73,7 @@ public class HelpProperties extends Properties {
super.load(in);
loaded = true;
} catch (IOException ioe00) {
- HelpPlugin.logError("File " + file.getName() + " cannot be read."); //$NON-NLS-1$ //$NON-NLS-2$
+ Platform.getLog(getClass()).error("File " + file.getName() + " cannot be read."); //$NON-NLS-1$ //$NON-NLS-2$
}
return loaded;
}
@@ -89,7 +89,7 @@ public class HelpProperties extends Properties {
super.store(out, "This is a generated file; do not edit."); //$NON-NLS-1$
ret = true;
} catch (IOException ioe00) {
- HelpPlugin.logError("Exception occurred while saving table " + name //$NON-NLS-1$
+ Platform.getLog(getClass()).error("Exception occurred while saving table " + name //$NON-NLS-1$
+ " to file " + file.getAbsolutePath() + ".", ioe00); //$NON-NLS-1$ //$NON-NLS-2$
}
return ret;
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/browser/BrowserManager.java b/org.eclipse.help.base/src/org/eclipse/help/internal/browser/BrowserManager.java
index 54731d40a..c8448e835 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/browser/BrowserManager.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/browser/BrowserManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.browser;
@@ -146,8 +147,8 @@ public class BrowserManager {
@Override
public void displayURL(String url) {
- HelpBasePlugin
- .logError(
+ Platform.getLog(getClass())
+ .error(
"There is no browser adapter configured to display " //$NON-NLS-1$
+ url
+ ". Ensure that you have a required browser and adapter installed, and that the browser program is available on the system path.", //$NON-NLS-1$
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/browser/CustomBrowser.java b/org.eclipse.help.base/src/org/eclipse/help/internal/browser/CustomBrowser.java
index d24f60876..92db27687 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/browser/CustomBrowser.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/browser/CustomBrowser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.browser;
@@ -50,14 +51,8 @@ public class CustomBrowser implements IBrowser {
errConsumer.setName("Custom browser adapter error reader"); //$NON-NLS-1$
errConsumer.start();
} catch (Exception e) {
- HelpBasePlugin
- .logError(
- "Launching URL \"" //$NON-NLS-1$
- + url
- + "\" using browser program \"" //$NON-NLS-1$
- + path
- + "\" has failed. Specify another browser in help preferences.", //$NON-NLS-1$
- e);
+ Platform.getLog(getClass()).error("Launching URL \"" + url + "\" using browser program \"" //$NON-NLS-1$ //$NON-NLS-2$
+ + path + "\" has failed. Specify another browser in help preferences.", e); //$NON-NLS-1$
throw new Exception(NLS.bind(HelpBaseResources.CustomBrowser_errorLaunching, url, path));
}
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/browser/MozillaBrowserAdapter.java b/org.eclipse.help.base/src/org/eclipse/help/internal/browser/MozillaBrowserAdapter.java
index 0743e17f9..372981d55 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/browser/MozillaBrowserAdapter.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/browser/MozillaBrowserAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.browser;
@@ -169,8 +170,7 @@ public class MozillaBrowserAdapter implements IBrowser {
return ret;
} catch (InterruptedException e) {
} catch (IOException e) {
- HelpBasePlugin.logError("Launching " + executableName //$NON-NLS-1$
- + " has failed.", e); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("Launching " + executableName + " has failed.", e); //$NON-NLS-1$ //$NON-NLS-2$
String msg = NLS.bind(HelpBaseResources.MozillaBrowserAdapter_executeFailed, executableName);
BaseHelpSystem.getDefaultErrorUtil()
.displayError(msg, uiThread);
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/browser/StreamConsumer.java b/org.eclipse.help.base/src/org/eclipse/help/internal/browser/StreamConsumer.java
index 7fec5ca4a..9efdc8e4a 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/browser/StreamConsumer.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/browser/StreamConsumer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,12 +10,13 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.browser;
import java.io.*;
-import org.eclipse.help.internal.base.*;
+import org.eclipse.core.runtime.Platform;
/**
* Used to receive output from processes
@@ -41,7 +42,7 @@ public class StreamConsumer extends Thread {
}
bReader.close();
} catch (IOException ioe) {
- HelpBasePlugin.logError(
+ Platform.getLog(getClass()).error(
"Exception occurred reading from web browser.", ioe); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/browser/macosx/DefaultBrowserAdapter.java b/org.eclipse.help.base/src/org/eclipse/help/internal/browser/macosx/DefaultBrowserAdapter.java
index b3bc66b0c..1f52a9db2 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/browser/macosx/DefaultBrowserAdapter.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/browser/macosx/DefaultBrowserAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,13 +10,14 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.browser.macosx;
import java.io.*;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.help.browser.*;
-import org.eclipse.help.internal.base.*;
public class DefaultBrowserAdapter implements IBrowser {
@@ -42,7 +43,7 @@ public class DefaultBrowserAdapter implements IBrowser {
"-e", //$NON-NLS-1$
"open location \"" + url + "\"" }); //$NON-NLS-1$ //$NON-NLS-2$
} catch (IOException ioe) {
- HelpBasePlugin.logError("Launching \"osascript\" has failed.", ioe); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("Launching \"osascript\" has failed.", ioe); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/AnalyzerDescriptor.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/AnalyzerDescriptor.java
index e805f93e2..9ed592611 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/AnalyzerDescriptor.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/AnalyzerDescriptor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the
* accompanying materials are made available under the terms of the Eclipse Public License 2.0
@@ -8,7 +8,9 @@
*
* SPDX-License-Identifier: EPL-2.0
*
- * Contributors: IBM Corporation - initial API and implementation
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.search;
@@ -129,9 +131,10 @@ public class AnalyzerDescriptor {
return this.luceneAnalyzer;
}
} catch (CoreException ce) {
- HelpBasePlugin.logError("Exception occurred creating text analyzer " //$NON-NLS-1$
- + configElement.getAttribute("class") //$NON-NLS-1$
- + " for " + locale + " locale.", ce); //$NON-NLS-1$ //$NON-NLS-2$
+ Platform.getLog(getClass()).error(
+ "Exception occurred creating text analyzer " //$NON-NLS-1$
+ + configElement.getAttribute("class") + " for " + locale + " locale.", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ce);
}
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/DefaultAnalyzer.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/DefaultAnalyzer.java
index 1b3b97b2a..81958ca6d 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/DefaultAnalyzer.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/DefaultAnalyzer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the
* accompanying materials are made available under the terms of the Eclipse Public License 2.0
@@ -12,6 +12,7 @@
* IBM Corporation - initial API and implementation
* Alexander Kurtakov - Bug 460787
* Sopot Cela - Bug 466829
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.search;
@@ -24,7 +25,6 @@ import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.core.LowerCaseFilter;
import org.apache.lucene.analysis.standard.StandardTokenizer;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.help.internal.base.HelpBasePlugin;
/**
* Lucene Analyzer. LowerCaseFilter-&gt;StandardTokenizer
@@ -73,8 +73,7 @@ public final class DefaultAnalyzer extends Analyzer {
if (locale == null) {
// Locale is not supported, will use en_US
- HelpBasePlugin
- .logError(
+ Platform.getLog(getClass()).error(
"Text Analyzer could not be created for locale {0}. An analyzer that extends org.eclipse.help.luceneAnalyzer extension point needs to be plugged in for locale " //$NON-NLS-1$
+ localeString
+ ", or Java Virtual Machine needs to be upgraded to version with proper support for locale {0}.", //$NON-NLS-1$
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java
index 0f27a0a42..52161d39c 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.search;
@@ -226,7 +227,7 @@ class IndexingOperation {
checkCancelled(pm);
pm.worked(1);
if (multiStatus != null) {
- HelpBasePlugin.logStatus(multiStatus);
+ Platform.getLog(getClass()).log(multiStatus);
}
}
if (!index.endRemoveDuplicatesBatch()) {
@@ -259,7 +260,7 @@ class IndexingOperation {
pm.worked(1);
}
if (multiStatus != null) {
- HelpBasePlugin.logStatus(multiStatus);
+ Platform.getLog(getClass()).log(multiStatus);
}
pm.subTask(HelpBaseResources.Writing_index);
if (!index.endAddBatch(addedDocs.size() > 0, lastOperation))
@@ -297,7 +298,7 @@ class IndexingOperation {
pm.worked(1);
}
if (multiStatus != null) {
- HelpBasePlugin.logStatus(multiStatus);
+ Platform.getLog(getClass()).log(multiStatus);
}
if (!index.endDeleteBatch()) {
throw new IndexingException();
@@ -373,7 +374,8 @@ class IndexingOperation {
}
catch (Throwable t) {
// log the error and skip this participant
- HelpBasePlugin.logError("Failed to get help search participant id for: " //$NON-NLS-1$
+ Platform.getLog(getClass()).error(
+ "Failed to get help search participant id for: " //$NON-NLS-1$
+ participant.getClass().getName() + "; skipping this one.", t); //$NON-NLS-1$
continue;
}
@@ -383,7 +385,8 @@ class IndexingOperation {
}
catch (Throwable t) {
// log the error and skip this participant
- HelpBasePlugin.logError("Failed to retrieve documents from one of the help search participants: " //$NON-NLS-1$
+ Platform.getLog(getClass())
+ .error("Failed to retrieve documents from one of the help search participants: " //$NON-NLS-1$
+ participant.getClass().getName() + "; skipping this one.", t); //$NON-NLS-1$
continue;
}
@@ -517,7 +520,7 @@ class IndexingOperation {
}
else {
String msg = "Element \"index\" in extension of \"org.eclipse.help.toc\" must specify a \"path\" attribute (plug-in: " + pluginId + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- HelpBasePlugin.logError(msg, null);
+ Platform.getLog(getClass()).error(msg, null);
}
}
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java
index edb75992c..2b09bae8d 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -11,6 +11,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Holger Voormann - Fix for Bug 352434
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.search;
@@ -41,7 +42,6 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.help.IHelpResource;
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.search.IndexingOperation.IndexingException;
import org.eclipse.help.internal.util.URLCoder;
import org.eclipse.help.search.SearchParticipant;
@@ -101,7 +101,8 @@ public class LocalSearchManager {
participant.init(getId());
}
} catch (Throwable t) {
- HelpPlugin.logError("Exception occurred creating Lucene search participant.", t); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("Exception occurred creating Lucene search participant.", //$NON-NLS-1$
+ t);
}
}
return participant;
@@ -138,7 +139,8 @@ public class LocalSearchManager {
participant.clear();
}
catch (Throwable t) {
- HelpBasePlugin.logError("Error occured in search participant's clear() operation: " + participant.getClass().getName(), t); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("Error occured in search participant's clear() operation: " //$NON-NLS-1$
+ + participant.getClass().getName(), t);
}
}
}
@@ -170,7 +172,7 @@ public class LocalSearchManager {
list.add(new SearchHit(href, label, summary, score, null, id, participantId, isPotentialHit));
}
catch (IOException e) {
- HelpBasePlugin.logError("An error occured while reading search hits", e); //$NON-NLS-1$
+ Platform.getLog(LocalSearchManager.class).error("An error occured while reading search hits", e); //$NON-NLS-1$
continue;
}
}
@@ -370,7 +372,8 @@ public class LocalSearchManager {
ids = gp.getContributingPlugins();
}
catch (Throwable t) {
- HelpBasePlugin.logError("Error getting the contributing plugins from help search participant: " //$NON-NLS-1$
+ Platform.getLog(getClass())
+ .error("Error getting the contributing plugins from help search participant: " //$NON-NLS-1$
+ gp.getClass().getName() + ". skipping this one.", t); //$NON-NLS-1$
continue;
}
@@ -632,7 +635,7 @@ public class LocalSearchManager {
}
catch (IndexingException e) {
String msg = "Error indexing documents"; //$NON-NLS-1$
- HelpBasePlugin.logError(msg, e);
+ Platform.getLog(getClass()).error(msg, e);
}
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java
index 983a5f17b..444e5c3b6 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2019 IBM Corporation and others.
+ * Copyright (c) 2005, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -11,6 +11,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Sopot Cela - Bug 466829
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.search;
@@ -24,11 +25,8 @@ import java.util.Properties;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.help.internal.base.HelpBasePlugin;
import org.eclipse.help.internal.base.util.ProxyUtil;
import org.eclipse.help.internal.util.ResourceLocator;
import org.osgi.framework.Bundle;
@@ -93,7 +91,8 @@ public class PluginIndex {
try {
resolved = FileLocator.resolve(url);
} catch (IOException ioe) {
- HelpBasePlugin.logError("Help index directory at " //$NON-NLS-1$
+ Platform.getLog(getClass()).error(
+ "Help index directory at " //$NON-NLS-1$
+ prefixedPath + " for plugin " //$NON-NLS-1$
+ bundle.getSymbolicName() + " cannot be resolved.", //$NON-NLS-1$
ioe);
@@ -119,18 +118,15 @@ public class PluginIndex {
}
}
} catch (IOException ioe) {
- HelpBasePlugin.logError(
- "Help index directory at " + prefixedPath //$NON-NLS-1$
- + " for plugin " + bundle.getSymbolicName() //$NON-NLS-1$
+ Platform.getLog(getClass())
+ .error("Help index directory at " + prefixedPath + " for plugin " + bundle.getSymbolicName() //$NON-NLS-1$ //$NON-NLS-2$
+ " cannot be resolved.", ioe); //$NON-NLS-1$
continue;
}
}
}
if (!found) {
- HelpBasePlugin.logError(
- "Help index declared, but missing for plugin " //$NON-NLS-1$
- + getPluginId() + ".", null); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("Help index declared, but missing for plugin " + getPluginId() + ".");//$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -138,7 +134,7 @@ public class PluginIndex {
public boolean isCompatible(Bundle bundle, IPath prefixedPath) {
URL url = FileLocator.find(bundle, prefixedPath.append(SearchIndex.DEPENDENCIES_VERSION_FILENAME), null);
if (url == null) {
- HelpBasePlugin.logError(
+ Platform.getLog(getClass()).error(
prefixedPath.append(SearchIndex.DEPENDENCIES_VERSION_FILENAME) + " file missing from help index \"" //$NON-NLS-1$
+ path + "\" of plugin " + getPluginId(), //$NON-NLS-1$
null);
@@ -155,14 +151,13 @@ public class PluginIndex {
if (!targetIndex.isLuceneCompatible(lucene) || !targetIndex.isAnalyzerCompatible(analyzer)) {
String message = "Unable to consume Lucene index from bundle '" + bundle.toString() //$NON-NLS-1$
+ "'. The index should be rebuilt with Lucene 8.4.1"; //$NON-NLS-1$
- Status warningStatus = new Status(IStatus.WARNING, HelpBasePlugin.PLUGIN_ID, IStatus.OK, message, null);
- HelpBasePlugin.logStatus(warningStatus);
+ Platform.getLog(getClass()).warn(message);
return false;
}
} catch (MalformedURLException mue) {
return false;
} catch (IOException ioe) {
- HelpBasePlugin.logError(
+ Platform.getLog(getClass()).error(
"IOException accessing prebuilt index.", ioe); //$NON-NLS-1$
}
return true;
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
index c856e8f19..7cd072603 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -13,6 +13,7 @@
* Holger Voormann - fix for bug 426785 (http://eclip.se/426785)
* Alexander Kurtakov - Bug 460787
* Sopot Cela - Bug 466829
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.search;
@@ -323,7 +324,7 @@ public class SearchIndex implements IHelpSearchIndex {
iw = new IndexWriter(luceneDirectory, writerConfig);
return true;
} catch (IOException e) {
- HelpBasePlugin.logError("Exception occurred in search indexing at beginAddBatch.", e); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("Exception occurred in search indexing at beginAddBatch.", e); //$NON-NLS-1$
return false;
}
}
@@ -343,7 +344,7 @@ public class SearchIndex implements IHelpSearchIndex {
iw = new IndexWriter(luceneDirectory, new IndexWriterConfig(analyzerDescriptor.getAnalyzer()));
return true;
} catch (IOException e) {
- HelpBasePlugin.logError("Exception occurred in search indexing at beginDeleteBatch.", e); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("Exception occurred in search indexing at beginDeleteBatch.", e); //$NON-NLS-1$
return false;
}
}
@@ -362,7 +363,7 @@ public class SearchIndex implements IHelpSearchIndex {
}
return true;
} catch (IOException e) {
- HelpBasePlugin.logError("Exception occurred in search indexing at beginDeleteBatch.", e); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("Exception occurred in search indexing at beginDeleteBatch.", e); //$NON-NLS-1$
return false;
}
}
@@ -420,7 +421,7 @@ public class SearchIndex implements IHelpSearchIndex {
}
return true;
} catch (IOException e) {
- HelpBasePlugin.logError("Exception occurred in search indexing at endAddBatch.", e); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("Exception occurred in search indexing at endAddBatch.", e); //$NON-NLS-1$
return false;
}
}
@@ -452,7 +453,7 @@ public class SearchIndex implements IHelpSearchIndex {
}
return true;
} catch (IOException e) {
- HelpBasePlugin.logError("Exception occurred in search indexing at endDeleteBatch.", e); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("Exception occurred in search indexing at endDeleteBatch.", e); //$NON-NLS-1$
return false;
}
}
@@ -478,7 +479,7 @@ public class SearchIndex implements IHelpSearchIndex {
setInconsistent(false);
return true;
} catch (IOException e) {
- HelpBasePlugin.logError("Exception occurred in search indexing at endDeleteBatch.", e); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("Exception occurred in search indexing at endDeleteBatch.", e); //$NON-NLS-1$
return false;
}
}
@@ -512,9 +513,8 @@ public class SearchIndex implements IHelpSearchIndex {
NIOFSDirectory dir = new NIOFSDirectory(new File(indexPath).toPath());
dirList.add(dir);
} catch (IOException ioe) {
- HelpBasePlugin
- .logError(
- "Help search indexing directory could not be created for directory " + indexPath, ioe); //$NON-NLS-1$
+ Platform.getLog(getClass()).error(
+ "Help search indexing directory could not be created for directory " + indexPath, ioe); //$NON-NLS-1$
continue;
}
@@ -559,7 +559,7 @@ public class SearchIndex implements IHelpSearchIndex {
iw.addIndexes(luceneDirs);
iw.forceMerge(1, true);
} catch (IOException ioe) {
- HelpBasePlugin.logError("Merging search indexes failed.", ioe); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("Merging search indexes failed.", ioe); //$NON-NLS-1$
return new HashMap<>();
}
return mergedDocs;
@@ -670,7 +670,8 @@ public class SearchIndex implements IHelpSearchIndex {
} catch (QueryTooComplexException qe) {
collector.addQTCException(qe);
} catch (Exception e) {
- HelpBasePlugin.logError("Exception occurred performing search for: " //$NON-NLS-1$
+ Platform.getLog(getClass()).error(
+ "Exception occurred performing search for: " //$NON-NLS-1$
+ searchQuery.getSearchWord() + ".", e); //$NON-NLS-1$
} finally {
unregisterSearch(Thread.currentThread());
@@ -1014,7 +1015,7 @@ public class SearchIndex implements IHelpSearchIndex {
private void logLockFailure(IOException ioe) {
if (!errorReported) {
- HelpBasePlugin.logError("Unable to Lock Help Search Index", ioe); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("Unable to Lock Help Search Index", ioe); //$NON-NLS-1$
errorReported = true;
}
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java
index c7ea6f7ce..b0f82121a 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.search;
@@ -26,7 +27,6 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.help.internal.base.HelpBasePlugin;
import org.eclipse.help.internal.base.remote.RemoteHelp;
import org.eclipse.help.internal.base.remote.RemoteSearchManager;
import org.eclipse.help.internal.search.federated.FederatedSearchEntry;
@@ -132,7 +132,7 @@ public class SearchManager {
}
catch (InterruptedException e) {
String msg = "Unexpected InterruptedException while waiting for help search jobs to finish"; //$NON-NLS-1$
- HelpBasePlugin.logError(msg, e);
+ Platform.getLog(getClass()).error(msg, e);
}
// results are in; send them off to the collector
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java
index 0f0eb89dd..9e890254a 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.search;
@@ -21,6 +22,7 @@ import java.util.Map;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.help.internal.base.BaseHelpSystem;
import org.eclipse.help.internal.base.HelpBasePlugin;
@@ -179,8 +181,9 @@ public class SearchProgressMonitor implements IProgressMonitor {
} catch (Exception e) {
progressMonitors.remove(locale);
if (HelpBasePlugin.getDefault() != null) {
- HelpBasePlugin.logError("Problem occurred during indexing of documentation.", //$NON-NLS-1$
- e);
+ Platform.getLog(SearchProgressMonitor.class)
+ .error(
+ "Problem occurred during indexing of documentation.", e); //$NON-NLS-1$
} else {
// Plugin has been shut down
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/XHTMLSearchParticipant.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/XHTMLSearchParticipant.java
index 1114fa05d..634fd02f2 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/XHTMLSearchParticipant.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/XHTMLSearchParticipant.java
@@ -17,7 +17,7 @@ import java.io.InputStream;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.help.internal.base.HelpBasePlugin;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.help.internal.xhtml.DynamicXHTMLProcessor;
import org.eclipse.help.search.SearchParticipantXML;
import org.xml.sax.Attributes;
@@ -103,7 +103,7 @@ public class XHTMLSearchParticipant extends SearchParticipantXML {
}
catch (Throwable t) {
String msg = "An error occured while pre-processing help XHTML document \"" + name + "\" for search indexing"; //$NON-NLS-1$ //$NON-NLS-2$
- HelpBasePlugin.logError(msg, t);
+ Platform.getLog(getClass()).error(msg, t);
return in;
}
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/LocalHelp.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/LocalHelp.java
index a97736f36..8845e0c44 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/LocalHelp.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/LocalHelp.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.search.federated;
@@ -150,7 +151,9 @@ public class LocalHelp implements ISearchEngine2 {
return participant.open(id);
}
catch (Throwable t) {
- HelpBasePlugin.logError("Error occured in search participant trying to open document with id: " + id + ", participant: " + participant.getClass().getName(), t); //$NON-NLS-1$ //$NON-NLS-2$
+ Platform.getLog(getClass())
+ .error("Error occured in search participant trying to open document with id: " + id //$NON-NLS-1$
+ + ", participant: " + participant.getClass().getName(), t); //$NON-NLS-1$
return false;
}
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java b/org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java
index 1056b765a..98b302251 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2015 IBM Corporation and others.
+ * Copyright (c) 2008, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.server;
@@ -145,7 +146,7 @@ public class JettyHelpServer extends HelpServer {
execute(stopRunnable);
}
catch (Exception e) {
- HelpBasePlugin.logError("An error occured while stopping the help server", e); //$NON-NLS-1$
+ Platform.getLog(getClass()).error("An error occured while stopping the help server", e); //$NON-NLS-1$
}
}
@@ -189,7 +190,7 @@ public class JettyHelpServer extends HelpServer {
}
catch (NumberFormatException e) {
String msg = "Help server port specified in VM arguments is invalid (" + portCommandLineOverride + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- HelpBasePlugin.logError(msg, e);
+ Platform.getLog(getClass()).error(msg, e);
}
}
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/server/WebappManager.java b/org.eclipse.help.base/src/org/eclipse/help/internal/server/WebappManager.java
index 5b56bf03f..46351ac4a 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/server/WebappManager.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/server/WebappManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.server;
@@ -18,7 +19,6 @@ import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.help.internal.base.HelpBasePlugin;
import org.eclipse.help.server.HelpServer;
public class WebappManager {
@@ -70,7 +70,7 @@ public class WebappManager {
server = (HelpServer) (serverElement
.createExecutableExtension(SERVER_CLASS_ATTRIBUTE));
} catch (CoreException e) {
- HelpBasePlugin.logStatus(e.getStatus());
+ Platform.getLog(WebappManager.class).log(e.getStatus());
}
}
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetManager.java b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetManager.java
index 8f1a52905..f893e687f 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetManager.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.internal.workingset;
@@ -217,18 +218,15 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
return true;
} catch (ParserConfigurationException pce) {
- HelpPlugin
- .logError(
- "DocumentBuilder implementation could not be loaded, to restore working set state.", pce); //$NON-NLS-1$
+ Platform.getLog(getClass()).error(
+ "DocumentBuilder implementation could not be loaded, to restore working set state.", pce); //$NON-NLS-1$
return false;
} catch (SAXException se) {
- HelpBasePlugin
- .logError(
+ Platform.getLog(getClass()).error(
"Error occurred parsing file " + stateFile.toString() + ", while restoring working set state.", se); //$NON-NLS-1$ //$NON-NLS-2$
return false;
} catch (IOException ioe) {
- HelpBasePlugin
- .logError(
+ Platform.getLog(getClass()).error(
"Error occurred parsing file " + stateFile.toString() + ", while restoring working set state.", ioe); //$NON-NLS-1$ //$NON-NLS-2$
return false;
}
@@ -363,15 +361,15 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
}
return true;
} catch (ParserConfigurationException pce) {
- HelpPlugin.logError(
+ HelpPlugin.getDefault().getLog().error(
"DocumentBuilder implementation could not be loaded.", pce); //$NON-NLS-1$
return false;
} catch (TransformerException e) {
- HelpPlugin.logError("Problems occurred while saving working sets."); //$NON-NLS-1$
+ HelpPlugin.getDefault().getLog().error("Problems occurred while saving working sets."); //$NON-NLS-1$
return false;
} catch (IOException e) {
stateFile.delete();
- HelpPlugin.logError(
+ HelpPlugin.getDefault().getLog().error(
"Problems occurred while saving working set file."); //$NON-NLS-1$
return false;
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipantXML.java b/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipantXML.java
index 012440210..a50c58b68 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipantXML.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipantXML.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2019 IBM Corporation and others.
+ * Copyright (c) 2010, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * George Suaridze <suag@1c.ru> (1C-Soft LLC) - Bug 560168
*******************************************************************************/
package org.eclipse.help.search;
@@ -23,6 +24,7 @@ import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.help.internal.base.HelpBasePlugin;
import org.eclipse.help.internal.base.util.ProxyUtil;
@@ -373,7 +375,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
}
catch (Throwable t) {
String msg = "An error occured while pre-processing user assistance document \"" + name + "\" for search indexing"; //$NON-NLS-1$ //$NON-NLS-2$
- HelpBasePlugin.logError(msg, t);
+ Platform.getLog(getClass()).error(msg, t);
return in;
}
}

Back to the top