Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDejan Gloszic2005-04-27 15:29:49 +0000
committerDejan Gloszic2005-04-27 15:29:49 +0000
commitbf3eb4a34c8db3624ae1aa58b17825a1eee236a6 (patch)
tree7d4840741532861be5d4490c6d5268869af39811 /org.eclipse.help.base
parent22e134731f20c5501228d52b9dbc15b8a726088d (diff)
downloadeclipse.platform.ua-bf3eb4a34c8db3624ae1aa58b17825a1eee236a6.tar.gz
eclipse.platform.ua-bf3eb4a34c8db3624ae1aa58b17825a1eee236a6.tar.xz
eclipse.platform.ua-bf3eb4a34c8db3624ae1aa58b17825a1eee236a6.zip
*** empty log message ***
Diffstat (limited to 'org.eclipse.help.base')
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngine.java45
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngineResult.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngineResultCollector.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/ISearchScope.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/InfoCenter.java14
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/WebSearch.java14
7 files changed, 48 insertions, 35 deletions
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java b/org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java
index bd4289099..4d16ac686 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java
@@ -74,7 +74,7 @@ import org.xml.sax.InputSource;
*
* or
*
- * destination/nl/country/variant/
+ * destination/nl/country/language/
* </pre>
* <p>
* The relative directory specified in the <code>index</code> element of the
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngine.java b/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngine.java
index c47ce415a..0231e8242 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngine.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngine.java
@@ -10,23 +10,23 @@
*******************************************************************************/
package org.eclipse.help.search;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
/**
- * A search engine that is a participant in the help search. All
- * engines selected by the user to run are executed as background
- * jobs using the same search expression. Engine is
- * expected to accept the expression and the scope object. The
- * results should be passed to the result collector object, and
- * the search progress should be tracked by the progress monitor.
+ * A search engine that is a participant in the help search. All engines
+ * selected by the user to run are executed as background jobs using the same
+ * search expression. Engine is expected to accept the expression and the scope
+ * object. The results should be passed to the result collector object, and the
+ * search progress should be tracked by the progress monitor.
* <p>
- * Search engines that have API access to the search server
- * can provide a list of individual search results. Search engines
- * for which only the URL is known are expected to return one search
- * result containing a URL that is sufficient to open a web browser
- * and see the search results there.
+ * Search engines that have API access to the search server can provide a list
+ * of individual search results. Search engines for which only the URL is known
+ * are expected to return one search result containing a URL that is sufficient
+ * to open a web browser and see the search results there.
* <p>
* Search engine must be cancelable.
+ * <p>This interface is inteded to be implemented by clients.
*
* @since 3.1
*/
@@ -34,12 +34,19 @@ import org.eclipse.core.runtime.*;
public interface ISearchEngine {
/**
*
- * @param query the search expression
- * @param scope the engine-specific scope object that is used to narrow the search
- * or <code>null</code> if the default scope is assumed.
- * @param collector the search result collector
- * @param monitor progress monitor to track the search progress
- * @throws CoreException when there are problems in the engine
+ * @param query
+ * the search expression
+ * @param scope
+ * the engine-specific scope object that is used to narrow the
+ * search or <code>null</code> if the default scope is assumed.
+ * @param collector
+ * the search result collector handles results as they arrive
+ * @param monitor
+ * progress monitor to track the search progress
+ * @throws CoreException
+ * when there are problems in the engine
*/
- void run(String query, ISearchScope scope, ISearchEngineResultCollector collector, IProgressMonitor monitor) throws CoreException;
+ void run(String query, ISearchScope scope,
+ ISearchEngineResultCollector collector, IProgressMonitor monitor)
+ throws CoreException;
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngineResult.java b/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngineResult.java
index 9f4edf7a2..dfe7658bf 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngineResult.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngineResult.java
@@ -20,6 +20,8 @@ import org.eclipse.help.IHelpResource;
* with the results must create one search result object whose
* URL is the actual query. This URL will then be presented
* in the Web browser.
+ * <p>
+ * This interface is inteded to be implemented by clients.
*
* @since 3.1
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngineResultCollector.java b/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngineResultCollector.java
index 21ebbc773..aaa9a8298 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngineResultCollector.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngineResultCollector.java
@@ -15,6 +15,8 @@ import org.eclipse.core.runtime.IStatus;
/**
* A collector for the search hits (asynchronously) returned by the help search
* participants.
+ * <p>This interface is intended to be implemented by clients and
+ * passed to the search engine instance.
*
* @since 3.1
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/ISearchScope.java b/org.eclipse.help.base/src/org/eclipse/help/search/ISearchScope.java
index 366dcf29c..655b4a3cb 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/ISearchScope.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/ISearchScope.java
@@ -13,7 +13,9 @@ package org.eclipse.help.search;
/**
* The generic search scope object. This is a tagging interface
* since each search engine is expected to have its own non-overlapping
- * set of scopes that users can include in or exclude from the search.
+ * set of scopes that users can include in or exclude from the search.
+ * Clients are expected to create scope objects that implement this
+ * interface and pass them to the search engine.
*
* @since 3.1
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/InfoCenter.java b/org.eclipse.help.base/src/org/eclipse/help/search/InfoCenter.java
index 3af8731c3..be090f97c 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/InfoCenter.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/InfoCenter.java
@@ -58,7 +58,7 @@ public final class InfoCenter implements ISearchEngine {
}
}
- class InfoCenterResult implements ISearchEngineResult {
+ private class InfoCenterResult implements ISearchEngineResult {
private IHelpResource category;
private Element node;
@@ -157,14 +157,13 @@ public final class InfoCenter implements ISearchEngine {
BufferedReader reader = new BufferedReader(new InputStreamReader(
is, "utf-8"));//$NON-NLS-1$
monitor.worked(1);
- load(((Scope) scope).url, reader, collector, new SubProgressMonitor(monitor, 4));
+ load(((Scope) scope).url, reader, collector,
+ new SubProgressMonitor(monitor, 4));
reader.close();
} catch (FileNotFoundException e) {
- reportError(
- HelpBaseResources.InfoCenter_fileNotFound, e, collector);
+ reportError(HelpBaseResources.InfoCenter_fileNotFound, e, collector);
} catch (IOException e) {
- reportError(
- HelpBaseResources.InfoCenter_io, e, collector);
+ reportError(HelpBaseResources.InfoCenter_io, e, collector);
} finally {
if (is != null) {
try {
@@ -205,7 +204,8 @@ public final class InfoCenter implements ISearchEngine {
return;
}
monitor.worked(1);
- load(baseURL, document, (Element) root, collector, new SubProgressMonitor(monitor, 4));
+ load(baseURL, document, (Element) root, collector,
+ new SubProgressMonitor(monitor, 4));
} catch (ParserConfigurationException e) {
// ignore
} catch (IOException e) {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/WebSearch.java b/org.eclipse.help.base/src/org/eclipse/help/search/WebSearch.java
index 1bfef1e62..e7e41bfa5 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/WebSearch.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/WebSearch.java
@@ -25,8 +25,8 @@ import org.eclipse.help.internal.base.HelpBaseResources;
* <code>{expression}</code>.
* <p>
* This class is made public in order to be instantiated and parametrized
- * directly in the extensions. Clients are required to supply the URL
- * template string as a parameter <code>url</code>.
+ * directly in the extensions. Clients are required to supply the URL template
+ * string as a parameter <code>url</code>.
*
* <p>
* This class is not expected to be subclassed or otherwise accessed
@@ -35,9 +35,9 @@ import org.eclipse.help.internal.base.HelpBaseResources;
* @since 3.1
*/
public final class WebSearch implements ISearchEngine {
- public static final char C_START = '{';
+ private static final char C_START = '{';
- public static final char C_STOP = '}';
+ private static final char C_STOP = '}';
public static class Scope implements ISearchScope {
private String urlTemplate;
@@ -51,7 +51,7 @@ public final class WebSearch implements ISearchEngine {
}
}
- public static class SearchResult implements ISearchEngineResult {
+ private static class SearchResult implements ISearchEngineResult {
private String query;
private String urlTemplate;
@@ -62,7 +62,7 @@ public final class WebSearch implements ISearchEngine {
}
public String getDescription() {
- return HelpBaseResources.WebSearch_click;
+ return HelpBaseResources.WebSearch_click;
}
public String getHref() {
@@ -79,7 +79,7 @@ public final class WebSearch implements ISearchEngine {
}
public String getLabel() {
- return HelpBaseResources.WebSearch_label;
+ return HelpBaseResources.WebSearch_label;
}
public float getScore() {

Back to the top