diff options
author | Yaroslav Nikolaiko | 2014-08-08 11:44:11 +0000 |
---|---|---|
committer | Dani Megert | 2014-08-08 11:47:47 +0000 |
commit | 697cdb43884256ac395f7afb0dd7da84b6eec333 (patch) | |
tree | 1e0d74923ea59c22fd4bc43dfde788d6bdead685 | |
parent | 83658c506c79b166c60322cdbc0a2d4df1bb1ba7 (diff) | |
download | eclipse.platform.ua-697cdb43884256ac395f7afb0dd7da84b6eec333.tar.gz eclipse.platform.ua-697cdb43884256ac395f7afb0dd7da84b6eec333.tar.xz eclipse.platform.ua-697cdb43884256ac395f7afb0dd7da84b6eec333.zip |
Fixed bug 441407: [webapp][base] Bugs related to Search Scope for filtering content in The Eclipse platform's help infocenterI20140826-0800I20140819-2200I20140819-1800I20140819-1200I20140819-0800I20140812-0800
Signed-off-by: Yaroslav Nikolaiko <nikolaiko.yaroslav@gmail.com>
-rw-r--r-- | org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java | 7 | ||||
-rw-r--r-- | org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java | 5 |
2 files changed, 8 insertions, 4 deletions
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java index 1d2c59b37..6a158ec8d 100644 --- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java +++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Yaroslav Nikolaiko <nikolaiko.yaroslav@gmail.com> - [webapp][base] Bugs related to Search Scope for filtering content in The Eclipse platform's help infocenter - http://bugs.eclipse.org/441407 *******************************************************************************/ package org.eclipse.help.internal.search; @@ -231,7 +232,9 @@ public class SearchResults implements ISearchHitCollector { // Test for href attached to Toc element topic = nextToc.getTopic(null); if (topic != null && href != null && href.equals(topic.getHref())) { - return nextToc; + if (filter == null || filter.inScope(topic)) { + return nextToc; + } } } if (!foundInToc) { diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java index db713a824..d3f857ffa 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2011 IBM Corporation and others. + * Copyright (c) 2007, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Yaroslav Nikolaiko <nikolaiko.yaroslav@gmail.com> - [webapp][base] Bugs related to Search Scope for filtering content in The Eclipse platform's help infocenter - http://bugs.eclipse.org/441407 *******************************************************************************/ package org.eclipse.help.internal.webapp.servlet; @@ -349,7 +350,7 @@ public class IndexFragmentServlet extends HttpServlet { String href; if (singleTopic) { - href = UrlUtil.getHelpURL((entry.getTopics()[0]).getHref()); + href = UrlUtil.getHelpURL((topics[0]).getHref()); buf.append('\n' + " href=\"" + //$NON-NLS-1$ XMLGenerator.xmlEscape(href) + "\""); //$NON-NLS-1$ } |