Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSopot Cela2016-11-21 15:22:52 +0000
committerSopot Cela2016-11-21 15:22:52 +0000
commit47dca3655d8d8228703066e63ee7e8c25b731a9a (patch)
tree409fa38a7faa74e8b9e0917d872b79b54a99c092
parent6e9796efb3e52387e81e4f0853913aaaae5a3b7e (diff)
downloadeclipse.platform.ua-47dca3655d8d8228703066e63ee7e8c25b731a9a.tar.gz
eclipse.platform.ua-47dca3655d8d8228703066e63ee7e8c25b731a9a.tar.xz
eclipse.platform.ua-47dca3655d8d8228703066e63ee7e8c25b731a9a.zip
Bug 507597 - Incompatible index should not be reported as errorI20161121-2000
Change-Id: I7a4c2d888052ab080ca8101da0ec678d379fded5 Signed-off-by: Sopot Cela <scela@redhat.com>
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java11
1 files changed, 7 insertions, 4 deletions
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 ddacba5a7..9e9134c96 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
@@ -21,8 +21,10 @@ 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;
@@ -148,10 +150,11 @@ public class PluginIndex {
.getProperty(SearchIndex.DEPENDENCIES_KEY_LUCENE);
String analyzer = prop
.getProperty(SearchIndex.DEPENDENCIES_KEY_ANALYZER);
- if (!targetIndex.isLuceneCompatible(lucene)
- || !targetIndex.isAnalyzerCompatible(analyzer)) {
- HelpBasePlugin.logError("Error trying to consume Lucene index from bundle " + bundle.toString() //$NON-NLS-1$
- + ". Please use an index built with Lucene 6.1 or higher.", null); //$NON-NLS-1$
+ 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 6.1."; //$NON-NLS-1$
+ Status warningStatus = new Status(IStatus.WARNING, HelpBasePlugin.PLUGIN_ID, IStatus.OK, message, null);
+ HelpBasePlugin.logStatus(warningStatus);
return false;
}
} catch (MalformedURLException mue) {

Back to the top