Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2010-02-01 17:19:00 +0000
committerChris Goldthorpe2010-02-01 17:19:00 +0000
commit76da1304559b7a6c2c7fe212cc99e32f153929a6 (patch)
tree358659e0101a162c2e41da1bbb428a7d135d8b16 /org.eclipse.help
parent0fd080ff6edca80301ec1906822087b372e22fcc (diff)
downloadeclipse.platform.ua-76da1304559b7a6c2c7fe212cc99e32f153929a6.tar.gz
eclipse.platform.ua-76da1304559b7a6c2c7fe212cc99e32f153929a6.tar.xz
eclipse.platform.ua-76da1304559b7a6c2c7fe212cc99e32f153929a6.zip
Bug 223475 – [Webapp] Support filtering in TOC and index
Diffstat (limited to 'org.eclipse.help')
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/index/Index.java11
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java5
2 files changed, 9 insertions, 7 deletions
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/index/Index.java b/org.eclipse.help/src/org/eclipse/help/internal/index/Index.java
index 75f9f69ed..b6fffc60e 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/index/Index.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/index/Index.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2009 Intel Corporation and others.
+ * Copyright (c) 2005, 2010 Intel 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
@@ -9,6 +9,7 @@
* Intel Corporation - initial API and implementation
* IBM Corporation - 122967 [Help] Remote help system
* IBM Corporation - add support for see / see also
+ * IBM Corporation - add support for filtering of the index view
*******************************************************************************/
package org.eclipse.help.internal.index;
@@ -42,18 +43,18 @@ public class Index extends UAElement implements IIndex {
/**
* @param see A see element
- * @return true if the keyword of the see matches an entry in the index
+ * @return the entry with matching keyword or null
*/
- public boolean containsSeeTarget(IndexSee see) {
+ public IndexEntry getSeeTarget(IndexSee see) {
if (children == null) getChildren();
String keyword = see.getKeyword();
for (Iterator iter = children.iterator(); iter.hasNext();) {
Object next = iter.next();
if (next instanceof IndexEntry && keyword.equals(((IndexEntry)next).getKeyword())) {
- return true;
+ return (IndexEntry)next;
}
}
- return false;
+ return null;
}
}
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java
index f9b046f2f..0d3c4b0a0 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 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
+ * IBM Corporation - add support for filtering of the index view
*******************************************************************************/
package org.eclipse.help.internal.index;
@@ -195,7 +196,7 @@ public class IndexAssembler {
}
ancestor = ancestor.getParentElement();
}
- return ((Index)ancestor).containsSeeTarget(see);
+ return ((Index)ancestor).getSeeTarget(see) != null;
}
/*

Back to the top