Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2015-02-26 10:53:18 +0000
committerLars Vogel2015-02-26 10:53:18 +0000
commit4cc88e3a483c72242134a1c2adfc482ca8e519ef (patch)
tree8008f1f0b744b616c9a88b5143d6115692dddf35 /org.eclipse.help.base
parent620f900d81a9f3fc4c3f327cce430f73d5ddf152 (diff)
downloadeclipse.platform.ua-4cc88e3a483c72242134a1c2adfc482ca8e519ef.tar.gz
eclipse.platform.ua-4cc88e3a483c72242134a1c2adfc482ca8e519ef.tar.xz
eclipse.platform.ua-4cc88e3a483c72242134a1c2adfc482ca8e519ef.zip
Bug 460916 - Clean whitespace issues in org.eclipse.help.base
Change-Id: I59ae187eb170a8f452e8afb7bfff8db84f4da29d Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'org.eclipse.help.base')
-rw-r--r--org.eclipse.help.base/.settings/org.eclipse.jdt.ui.prefs60
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/base/AbstractHelpDisplay.java14
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/base/AbstractHelpScope.java34
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/base/IHelpScopeProducer.java12
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/base/IScopeHandle.java8
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/browser/IBrowser.java14
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/browser/IBrowserFactory.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/BaseHelpSystem.java30
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/BookmarkManager.java10
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpApplication.java14
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBasePlugin.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBasePreferenceInitializer.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java30
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpEvaluationContext.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpActivitySupport.java12
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpBaseConstants.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/IndexToolApplication.java8
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/MissingContentManager.java50
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/DefaultPreferenceFileHandler.java18
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/HttpsUtility.java20
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/PreferenceFileHandler.java40
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContentLocator.java8
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContextProvider.java10
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteExtensionProvider.java8
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteHelp.java20
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteHelpInputStream.java28
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIC.java32
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIndexParser.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIndexProvider.java8
-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/RemoteSearchParser.java14
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteStatusData.java58
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocParser.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocProvider.java16
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java12
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/EnablementScope.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/IntersectionScope.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeHandle.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeRegistry.java56
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeUtils.java26
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/SearchScopeScope.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/UnionScope.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java36
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java12
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/util/HelpProperties.java10
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/util/IndexUtils.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/util/LinkUtil.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/util/ProxyUtil.java54
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/base/util/TestConnectionUtility.java10
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/browser/BrowserManager.java14
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/browser/CustomBrowser.java8
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/browser/MozillaBrowserAdapter.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/browser/MozillaFactory.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLConnection.java54
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLStreamHandler.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/AnalyzerDescriptor.java12
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/AnalyzerFactory.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/DefaultAnalyzer.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/HTMLDocParser.java8
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/HTMLSearchParticipant.java12
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchHitCollector.java8
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java22
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/InfoCenter.java10
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/LimitedSizeCharArrayWriter.java12
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java42
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchDocument.java12
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginIndex.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginVersionInfo.java10
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/PrebuiltIndexes.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/ProgressDistributor.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java14
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchHit.java20
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java50
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java42
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java12
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchQuery.java16
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResult.java34
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java36
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/WebSearch.java10
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/WordTokenStream.java14
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/XHTMLSearchParticipant.java18
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/FederatedSearchEntry.java10
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/FederatedSearchJob.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/IndexerJob.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/LocalHelp.java18
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/LocalHelpScope.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java48
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/server/WebappManager.java10
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/standalone/EclipseConnection.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/standalone/EclipseController.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/standalone/Options.java34
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneHelp.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneInfocenter.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/validation/TocValidator.java20
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableHelpResource.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableSelectedToc.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableSelectedTopic.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTocsArray.java4
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTopic.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/workingset/IHelpWorkingSetManager.java20
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSet.java26
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetComparator.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetManager.java44
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/DynamicXHTMLProcessor.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/XHTMLCharsetHandler.java8
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/XHTMLContentDescriber.java2
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/AbstractSearchProcessor.java22
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/HelpIndexBuilder.java62
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/IHelpSearchIndex.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/ISearchDocument.java22
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngine.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngine2.java8
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngineResult.java18
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngineResult2.java10
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngineResultCollector.java10
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/ISearchResult.java38
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/ISearchScope.java6
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipant.java22
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipantXML.java48
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/search/SearchProcessorInfo.java22
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/server/HelpServer.java10
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/standalone/Help.java14
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/standalone/Infocenter.java6
-rw-r--r--org.eclipse.help.base/src_ant/org/eclipse/help/internal/base/ant/BuildHelpIndex.java10
-rw-r--r--org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/HTMLParser.java8
-rw-r--r--org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/HTMLParserTokenManager.java38
-rw-r--r--org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/ParseException.java4
-rw-r--r--org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/SimpleCharStream.java6
-rw-r--r--org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/TokenMgrError.java6
130 files changed, 1063 insertions, 1005 deletions
diff --git a/org.eclipse.help.base/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.help.base/.settings/org.eclipse.jdt.ui.prefs
index 9366f0fe0..ab6ab1dc8 100644
--- a/org.eclipse.help.base/.settings/org.eclipse.jdt.ui.prefs
+++ b/org.eclipse.help.base/.settings/org.eclipse.jdt.ui.prefs
@@ -1,5 +1,63 @@
-#Fri Nov 11 12:08:45 EST 2005
eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_UA
formatter_settings_version=9
internal.default.compliance=default
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+sp_cleanup.use_type_arguments=false
diff --git a/org.eclipse.help.base/src/org/eclipse/help/base/AbstractHelpDisplay.java b/org.eclipse.help.base/src/org/eclipse/help/base/AbstractHelpDisplay.java
index 4e27f7067..bd1e3e3a3 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/base/AbstractHelpDisplay.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/base/AbstractHelpDisplay.java
@@ -15,26 +15,26 @@ package org.eclipse.help.base;
* Abstract class representing a help display which can be used to override the Eclipse help system
* UI using the extension point org.eclipse.help.base.display. Classes extending this abstract class
* must be capable of returning the help home page and other help related URLs.
- *
+ *
* @since 3.6
*/
public abstract class AbstractHelpDisplay {
-
+
/**
- * Returns the URL to the help home page
+ * Returns the URL to the help home page
* @param hostname the hostname of the Eclipse help system
* @param port the port of the Eclipse help system
- * @param tab is one of "search" "toc" "index" "bookmarks" or null,
- * In the Eclipse help webapp these correspond to a tab which is in focus when the help
+ * @param tab is one of "search" "toc" "index" "bookmarks" or null,
+ * In the Eclipse help webapp these correspond to a tab which is in focus when the help
* system is started.
- * For other help presentations this parameter should be seen as a hint representing
+ * For other help presentations this parameter should be seen as a hint representing
* an action the user wishes to perform
* @return String help home path
*/
public abstract String getHelpHome(String hostname, int port, String tab);
- /**
+ /**
* Returns the help page, including any frames, for a specific topic.
* @param hostname the hostname of the Eclipse help system
* @param port the port of the Eclipse help system
diff --git a/org.eclipse.help.base/src/org/eclipse/help/base/AbstractHelpScope.java b/org.eclipse.help.base/src/org/eclipse/help/base/AbstractHelpScope.java
index 62b368bd3..f9c1c6aff 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/base/AbstractHelpScope.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/base/AbstractHelpScope.java
@@ -23,19 +23,19 @@ import org.eclipse.help.internal.base.scope.ScopeUtils;
* Represents a scope which can be used to specify which topics are shown in the
* table of contents and which entries will show in the index. The inScope() functions
* are used by the help system to determine which elements to show. Both the table of
- * contents and index are trees and the help system reads these trees starting with the
- * root and working down through the children.
- *
+ * contents and index are trees and the help system reads these trees starting with the
+ * root and working down through the children.
+ *
* @since 3.5
*/
public abstract class AbstractHelpScope {
-
+
/**
* Determine whether a table of contents is in scope
*/
public abstract boolean inScope(IToc toc);
-
+
/**
* Determine whether a topic is in scope
*/
@@ -45,20 +45,20 @@ public abstract class AbstractHelpScope {
* Determine whether an index entry is in scope
*/
public abstract boolean inScope(IIndexEntry entry);
-
+
/**
* a single information center instance can display content in multiple locales.
* This function exists to provide a name for a specific locale.
* @param locale a string representing the locale used for the UI
- * @return a name for this scope appropriate for the locale which
- * will be used in the scope selection dialog. It is recommended that
+ * @return a name for this scope appropriate for the locale which
+ * will be used in the scope selection dialog. It is recommended that
* the name be no more than 20 characters long.
*/
public abstract String getName(Locale locale);
-
+
/**
* In the default implementation of this method an IndexSee element is in scope
- * if it's target is in scope. May be overridden to exclude more IndexSee elements
+ * if it's target is in scope. May be overridden to exclude more IndexSee elements
* from the scope
* @param see
* @return true if the target is in scope
@@ -66,23 +66,23 @@ public abstract class AbstractHelpScope {
public boolean inScope(IIndexSee see) {
return hasInScopeChildren(see);
}
-
+
/**
* The help system can build the trees faster if it knows that an out of
- * scope element cannot have child elements which are in scope. This
+ * scope element cannot have child elements which are in scope. This
* is called a hierarchical scope. If an out of scope element can have
- * in scope children this function should be overridden and the help
+ * in scope children this function should be overridden and the help
* system will perform a deeper search.
*/
public boolean isHierarchicalScope() {
return true;
}
-
+
/**
* Convenience method to make it easier to write subclasses
- * In the case of an IIndexSee element this method tests
+ * In the case of an IIndexSee element this method tests
* to see if the target is in scope. For all other elements
- * it tests all children and if this is not a hierarchical scope
+ * it tests all children and if this is not a hierarchical scope
* all descendants are tested.
* @param element An element which may have children
* @return true if at least one child is in scope
@@ -90,6 +90,6 @@ public abstract class AbstractHelpScope {
public final boolean hasInScopeChildren(IUAElement element) {
return ScopeUtils.hasInScopeChildren(element, this);
}
-
+
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/base/IHelpScopeProducer.java b/org.eclipse.help.base/src/org/eclipse/help/base/IHelpScopeProducer.java
index 5fe3b58cc..ca4e4c2c3 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/base/IHelpScopeProducer.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/base/IHelpScopeProducer.java
@@ -14,21 +14,21 @@ package org.eclipse.help.base;
/**
* Producer capable of generating or otherwise obtaining AbstractHelpScopes
* for filtering the help system. Scopes can be defined either by adding a
- * 'scope' or 'scopeProducer' element to the
+ * 'scope' or 'scopeProducer' element to the
* <code>"org.eclipse.help.base.scope"</code> extension point.
- *
+ *
* The 'scopeProducer' allows for runtime scopes to be created.
- *
- *
+ *
+ *
* @since 3.6
*/
public interface IHelpScopeProducer {
-
+
/**
* Obtains a list of IScopeHandles, which in turn will contain
* AbstracHelpScope implementations. Use this method to create
* or load AbstractHelpScopes at runtime.
- *
+ *
* @return an array of the contributed scope handles. May not be <code>null</code>.
*/
public IScopeHandle[] getScopeHandles();
diff --git a/org.eclipse.help.base/src/org/eclipse/help/base/IScopeHandle.java b/org.eclipse.help.base/src/org/eclipse/help/base/IScopeHandle.java
index 4ee8a0daa..ca250be24 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/base/IScopeHandle.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/base/IScopeHandle.java
@@ -14,21 +14,21 @@ package org.eclipse.help.base;
/**
* Container class for associating AbstractHelpScopes with an ID
- *
+ *
* @since 3.6
*/
public interface IScopeHandle {
/**
* Get the AbstractHelpScope associated with this handle
- *
+ *
* @return AbstractHelpScope
*/
public AbstractHelpScope getScope();
-
+
/**
* Get the String ID associated with this handle
- *
+ *
* @return ID
*/
public String getId();
diff --git a/org.eclipse.help.base/src/org/eclipse/help/browser/IBrowser.java b/org.eclipse.help.base/src/org/eclipse/help/browser/IBrowser.java
index a52f6e589..efdbaa352 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/browser/IBrowser.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/browser/IBrowser.java
@@ -12,7 +12,7 @@ package org.eclipse.help.browser;
/**
* Represents a web browser that can be used by clients to display documents for
* the given URLs.
- *
+ *
* @since 2.1
*/
public interface IBrowser {
@@ -22,27 +22,27 @@ public interface IBrowser {
public void close();
/**
* Queries the browser if close method is supported.
- *
+ *
* @return true if the method is fully implemented
*/
public boolean isCloseSupported();
/**
* Displays document with the given URL, and makes the browser visible. This
* method starts the browser if necessary.
- *
+ *
* @param url
* the URL to display in the browser
*/
public void displayURL(String url) throws Exception;
/**
* Queries the browser if setLocation method is supported.
- *
+ *
* @return true if the method is fully implemented
*/
public boolean isSetLocationSupported();
/**
* Queries the browser if setSize method is supported.
- *
+ *
* @return true if the method is fully implemented
*/
public boolean isSetSizeSupported();
@@ -50,7 +50,7 @@ public interface IBrowser {
* Causes the browser to be moved to the specified location. If the actual
* browser is not visible, the next time it becomes visible, it will be
* shown at the give location
- *
+ *
* @param x
* horizontal coordinates of the left-top external corner
* @param y
@@ -61,7 +61,7 @@ public interface IBrowser {
* Causes the browser to be resized to the specified size. If the actual
* browser is not visible, the next time it becomes visible, it will be
* shown with the give size.
- *
+ *
* @param width
* width in pixels
* @param height
diff --git a/org.eclipse.help.base/src/org/eclipse/help/browser/IBrowserFactory.java b/org.eclipse.help.base/src/org/eclipse/help/browser/IBrowserFactory.java
index 402f9e6cd..009af26c0 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/browser/IBrowserFactory.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/browser/IBrowserFactory.java
@@ -12,13 +12,13 @@ package org.eclipse.help.browser;
/**
* Implementators of <code>org.eclipse.help.base.browser</code> extension
* points must provide implementation of this interface.
- *
+ *
* @since 2.1
*/
public interface IBrowserFactory {
/**
* Checks whether the factory can work on the user system.
- *
+ *
* @return false if the factory cannot work on this system; for example the
* required native browser required by browser adapters that it
* creates is not installed.
@@ -26,7 +26,7 @@ public interface IBrowserFactory {
public boolean isAvailable();
/**
* Obtains a new instance of a web browser.
- *
+ *
* @return instance of IBrowser
*/
public IBrowser createBrowser();
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 8642afffd..8b4bfbe10 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
@@ -33,19 +33,19 @@ import org.osgi.framework.Bundle;
* Base Help System.
*/
public final class BaseHelpSystem {
-
+
private static final BaseHelpSystem instance = new BaseHelpSystem();
-
+
public static final String BOOKMARKS = "bookmarks"; //$NON-NLS-1$
public static final String WORKING_SETS = "workingSets"; //$NON-NLS-1$
public static final String WORKING_SET = "workingSet"; //$NON-NLS-1$
-
+
public static final int MODE_WORKBENCH = 0;
public static final int MODE_INFOCENTER = 1;
public static final int MODE_STANDALONE = 2;
private int mode = MODE_WORKBENCH;
-
+
private SearchManager searchManager;
private WorkingSetManager workingSetManager;
private BookmarkManager bookmarkManager;
@@ -79,7 +79,7 @@ public final class BaseHelpSystem {
}
return getInstance().searchManager;
}
-
+
/*
* Returns the local search manager which deals only with the local content
* and is called by the global search manager.
@@ -166,7 +166,7 @@ public final class BaseHelpSystem {
new Status(IStatus.ERROR, HelpBasePlugin.PLUGIN_ID, 0,
"Error launching help.", e)); //$NON-NLS-1$
}
-
+
/*
* Assigns the provider responsible for providing help
* document content.
@@ -192,7 +192,7 @@ public final class BaseHelpSystem {
public static URL resolve(String href, boolean documentOnly) {
String url = null;
if (href == null || href.indexOf("://") != -1 //$NON-NLS-1$
- || isFileProtocol(href))
+ || isFileProtocol(href))
url = href;
else {
BaseHelpSystem.ensureWebappRunning();
@@ -236,9 +236,9 @@ public final class BaseHelpSystem {
private static boolean isFileProtocol(String href) {
// Test for file: or /file:
int index = href.indexOf("file:"); //$NON-NLS-1$
- return ( index == 0 || (index == 1 && href.charAt(0) == '/' ));
+ return ( index == 0 || (index == 1 && href.charAt(0) == '/' ));
}
-
+
public static String unresolve(URL url) {
return unresolve(url.toString());
}
@@ -299,7 +299,7 @@ public final class BaseHelpSystem {
/**
* Obtains name of the Eclipse product
- *
+ *
* @return String
*/
public static String getProductName() {
@@ -311,12 +311,12 @@ public final class BaseHelpSystem {
return name == null ? "" : name; //$NON-NLS-1$
}
- public static void runLiveHelp(String pluginID, String className, String arg) {
+ public static void runLiveHelp(String pluginID, String className, String arg) {
Bundle bundle = Platform.getBundle(pluginID);
if (bundle == null) {
return;
}
-
+
try {
Class<?> c = bundle.loadClass(className);
Object o = c.newInstance();
@@ -334,9 +334,9 @@ public final class BaseHelpSystem {
} catch (Exception e) {
}
}
-
+
/**
- * Called when index.jsp is opened, check to see if we index.jsp is running outside out server in which
+ * Called when index.jsp is opened, check to see if we index.jsp is running outside out server in which
* case set the mode to infocenter
*/
public static void checkMode() {
@@ -344,5 +344,5 @@ public final class BaseHelpSystem {
setMode(MODE_INFOCENTER);
}
}
-
+
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/BookmarkManager.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/BookmarkManager.java
index 4f7843e6e..a5c8d584b 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/BookmarkManager.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/BookmarkManager.java
@@ -26,7 +26,7 @@ import org.osgi.service.prefs.BackingStoreException;
* between the web app and the help view. The manager implements Observable so
* that views can be notified on bookmark changes. The webapp does not use this
* feature.
- *
+ *
* @since 3.1
*/
public class BookmarkManager extends Observable {
@@ -44,7 +44,7 @@ public class BookmarkManager extends Observable {
// everything changed (by the webapp)
public static final int WORLD_CHANGED = 5;
-
+
private ArrayList<Bookmark> bookmarks;
public static class Bookmark implements IHelpResource {
@@ -182,7 +182,7 @@ public class BookmarkManager extends Observable {
/**
* Ensures that string does not contains ',' or '|' characters.
- *
+ *
* @param s
* @return String
*/
@@ -197,11 +197,11 @@ public class BookmarkManager extends Observable {
s = TString.change(s, "\\comma", ","); //$NON-NLS-1$ //$NON-NLS-2$
return TString.change(s, "\\escape", "\\"); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
private String readBookmarks() {
return Platform.getPreferencesService().getString(HelpBasePlugin.PLUGIN_ID, BaseHelpSystem.BOOKMARKS, "", null); //$NON-NLS-1$
}
-
+
private void saveBookmarks(String bookmarks) {
IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(HelpBasePlugin.PLUGIN_ID);
prefs.put(BaseHelpSystem.BOOKMARKS, bookmarks);
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpApplication.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpApplication.java
index 062e2194b..0aed640c0 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpApplication.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpApplication.java
@@ -59,7 +59,7 @@ public class HelpApplication implements IApplication, IExecutableExtension {
if (status == STATE_RESTARTING) {
return EXIT_RESTART;
}
-
+
writeHostAndPort();
obtainLock();
@@ -81,17 +81,17 @@ public class HelpApplication implements IApplication, IExecutableExtension {
}
return EXIT_OK;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.equinox.app.IApplication#stop()
*/
public void stop() {
stopHelp();
-
+
// wait until start has finished
synchronized(this) {};
}
-
+
/**
* Causes help service to stop and exit
*/
@@ -124,7 +124,7 @@ public class HelpApplication implements IApplication, IExecutableExtension {
BaseHelpSystem.setMode(BaseHelpSystem.MODE_STANDALONE);
}
}
-
+
private void writeHostAndPort() throws IOException {
Properties p = new Properties();
p.put("host", WebappManager.getHost()); //$NON-NLS-1$
@@ -147,7 +147,7 @@ public class HelpApplication implements IApplication, IExecutableExtension {
}
}
-
+
private void obtainLock() {
File lockFile = new File(metadata, APPLICATION_LOCK_FILE);
try {
@@ -157,7 +157,7 @@ public class HelpApplication implements IApplication, IExecutableExtension {
lock = null;
}
}
-
+
private void releaseLock() {
if (lock != null) {
try {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBasePlugin.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBasePlugin.java
index e8c9bdeee..d71c6b710 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBasePlugin.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBasePlugin.java
@@ -116,7 +116,7 @@ public class HelpBasePlugin extends Plugin {
public static void setActivitySupport(IHelpActivitySupport activitySupport) {
getDefault().helpActivitySupport = activitySupport;
}
-
+
public static BundleContext getBundleContext() {
return getDefault().context;
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBasePreferenceInitializer.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBasePreferenceInitializer.java
index 7482d602e..d397e8d0a 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBasePreferenceInitializer.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBasePreferenceInitializer.java
@@ -24,7 +24,7 @@ public class HelpBasePreferenceInitializer extends
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
*/
public void initializeDefaultPreferences() {
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 c5fe3a1b0..85d651627 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
@@ -34,11 +34,11 @@ public class HelpDisplay {
private static AbstractHelpDisplay helpDisplay;
private static final String HELP_DISPLAY_EXTENSION_ID = "org.eclipse.help.base.display"; //$NON-NLS-1$
private static final String HELP_DISPLAY_CLASS_ATTRIBUTE = "class"; //$NON-NLS-1$
-
+
private static class DefaultDisplay extends AbstractHelpDisplay {
-
+
public String getHelpHome(String hostname, int port, String tab) {
- String helpURL = getFramesetURL();
+ String helpURL = getFramesetURL();
if (tab != null) {
helpURL += "?tab=" + tab; //$NON-NLS-1$
}
@@ -46,11 +46,11 @@ public class HelpDisplay {
}
public String getHelpForTopic(String topic, String hostname, int port) {
- return getFramesetURL() + "?topic=" + topic; //$NON-NLS-1$
+ return getFramesetURL() + "?topic=" + topic; //$NON-NLS-1$
}
-
+
}
-
+
/**
* Constructor.
*/
@@ -107,7 +107,7 @@ public class HelpDisplay {
/**
* Display help for the a given topic and related topics.
- *
+ *
* @param context
* context for which related topics will be displayed
* @param topic
@@ -144,7 +144,7 @@ public class HelpDisplay {
/**
* Display help to search view for given query and selected topic.
- *
+ *
* @param searchQuery
* search query in URL format key=value&key=value
* @param topic
@@ -186,12 +186,12 @@ public class HelpDisplay {
helpURL = getHelpDisplay().getHelpHome( WebappManager.getHost(), WebappManager.getPort(), null);
} else if (helpURL.startsWith("tab=")) { //$NON-NLS-1$
String tab = helpURL.substring("tab=".length()); //$NON-NLS-1$
- helpURL = getHelpDisplay().getHelpHome( WebappManager.getHost(), WebappManager.getPort(), tab);
+ helpURL = getHelpDisplay().getHelpHome( WebappManager.getHost(), WebappManager.getPort(), tab);
} else if (helpURL.startsWith("topic=")) { //$NON-NLS-1$
String topic = helpURL.substring("topic=".length()); //$NON-NLS-1$
- helpURL = getHelpDisplay().getHelpForTopic( topic, WebappManager.getHost(), WebappManager.getPort());
- }
-
+ helpURL = getHelpDisplay().getHelpForTopic( topic, WebappManager.getHost(), WebappManager.getPort());
+ }
+
BaseHelpSystem.getHelpBrowser(forceExternal)
.displayURL(helpURL);
} catch (Exception e) {
@@ -239,7 +239,7 @@ public class HelpDisplay {
/**
* If href contains URL parameter noframes=true return href with that
* paramter removed, otherwise returns null
- *
+ *
* @param href
* @return String or null
*/
@@ -271,7 +271,7 @@ public class HelpDisplay {
public void setHrefOpenedFromHelpDisplay(String hrefOpenedFromHelpDisplay) {
this.hrefOpenedFromHelpDisplay = hrefOpenedFromHelpDisplay;
}
-
+
private static void createHelpDisplay() {
IExtensionPoint point = Platform.getExtensionRegistry()
.getExtensionPoint(HELP_DISPLAY_EXTENSION_ID );
@@ -281,7 +281,7 @@ public class HelpDisplay {
// We need to pick up the non-default configuration
IConfigurationElement[] elements = extensions[0]
.getConfigurationElements();
- if (elements.length == 0)
+ if (elements.length == 0)
return;
IConfigurationElement displayElement = elements[0];
// Instantiate the help display
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpEvaluationContext.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpEvaluationContext.java
index 44415b725..72bcb65d7 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpEvaluationContext.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpEvaluationContext.java
@@ -23,7 +23,7 @@ public final class HelpEvaluationContext {
private static final String VARIABLE_PLATFORM = "platform"; //$NON-NLS-1$
private static EvaluationContext context;
-
+
/*
* Returns the evaluation context to use in help documents.
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpActivitySupport.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpActivitySupport.java
index aabf27f94..5bcf64279 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpActivitySupport.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpActivitySupport.java
@@ -20,7 +20,7 @@ public interface IHelpActivitySupport {
* Checks if href matches an enabled activity. If it does not match any
* defined activites, it is assumed to be enabled. If Help role filtering is
* disabled, this method always returns <code>true</code>.
- *
+ *
* @param href
* @return
*/
@@ -29,7 +29,7 @@ public interface IHelpActivitySupport {
/**
* Checks if href is matches an enabled activity. If it does not match any
* defined activites, it is assumed to be enabled.
- *
+ *
* @param href
* the topic href
* @return <code>true</code> if role for this href is enabled,
@@ -41,7 +41,7 @@ public interface IHelpActivitySupport {
* Checks whether topic belongs to a TOC that mathes enabled activity.
* Enabled children TOCs are searched if linked by also enabled TOCs.
* Additionally topic may match description topic of a root TOC.
- *
+ *
* @return true if topic belongs to an enabled TOC
* @param href
* @param locale
@@ -51,7 +51,7 @@ public interface IHelpActivitySupport {
/**
* Enables activities with patterns matching the href
- *
+ *
* @param href
*/
public void enableActivities(String href);
@@ -65,14 +65,14 @@ public interface IHelpActivitySupport {
/**
* Returns the message to show in the warning dialog when filtering is
* toggled off.
- *
+ *
* @return the message for the filtering warning dialog
*/
public String getShowAllMessage();
/**
* Returns document message for disabled activities.
- *
+ *
* @param embedded
* if <code>true</code>, the message will be added to a
* document in the workbench window. Otherwise, it will be shown
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpBaseConstants.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpBaseConstants.java
index aa8d05119..d37e2c96c 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpBaseConstants.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpBaseConstants.java
@@ -36,5 +36,5 @@ public interface IHelpBaseConstants {
String P_KEY_SHOW_SEARCH_DESCRIPTION = "showSearchDescription"; //$NON-NLS-1$
String P_KEY_SHOW_SEARCH_CATEGORIES = "showSearchCategories"; //$NON-NLS-1$
String P_SHOW_BREADCRUMBS = "showBreadcrumbs"; //$NON-NLS-1$
- String P_PAGE_NOT_FOUND = "page_not_found"; //$NON-NLS-1$
+ String P_PAGE_NOT_FOUND = "page_not_found"; //$NON-NLS-1$
}
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 e164ad328..ad04b1948 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
@@ -27,7 +27,7 @@ import org.eclipse.osgi.util.NLS;
* application org.eclipse.help.indexTool
*/
public class IndexToolApplication implements IApplication {
-
+
/* (non-Javadoc)
* @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
*/
@@ -62,7 +62,7 @@ public class IndexToolApplication implements IApplication {
*/
public synchronized void stop() {
}
-
+
private void preindex(String outputDir, Locale locale) throws Exception {
File indexPath = new File(HelpBasePlugin.getConfigurationDirectory(),
"index/" + locale); //$NON-NLS-1$
@@ -94,7 +94,7 @@ public class IndexToolApplication implements IApplication {
/**
* Recursively deletes directory and files.
- *
+ *
* @param file
* @throws IOException
*/
@@ -113,7 +113,7 @@ public class IndexToolApplication implements IApplication {
/**
* Adds files in a directory to a zip stream
- *
+ *
* @param dir
* directory with files to zip
* @param zout
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 04cf02f2d..358a20c92 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
@@ -34,14 +34,14 @@ import org.osgi.service.prefs.BackingStoreException;
*/
public class MissingContentManager {
-
+
private static final String HELP_PROTOCOL = "help:"; //$NON-NLS-1$
private static final String EXTENSION_POINT_ID_TOC = HelpPlugin.PLUGIN_ID + ".toc"; //$NON-NLS-1$
private static final String ELEMENT_NAME_PLACEHOLDER = "placeholder"; //$NON-NLS-1$
private static final String ATTRIBUTE_NAME_PLUGIN = "plugin"; //$NON-NLS-1$
private static final String ATTRIBUTE_NAME_PLACEHOLDER_PAGE = "placeholderPage"; //$NON-NLS-1$
public static final String IGNORE_MISSING_PLACEHOLDER_PREFERENCE = "ignorePlaceholders"; //$NON-NLS-1$
-
+
// Hrefs which are processed by org.eclipse.help.internal.webapp.StatusProducer
public static final String REMOTE_STATUS_HREF = "NetworkHelpStatus.html"; //$NON-NLS-1$
public static final String REMOTE_STATUS_HELP_VIEW_HREF = "NetworkHelpStatusHV.html"; //$NON-NLS-1$
@@ -49,7 +49,7 @@ public class MissingContentManager {
public static final String MISSING_TOPIC_PATH = "missingTopic/"; //$NON-NLS-1$
public static final String MISSING_BOOKS_HREF = "MissingBooks.html"; //$NON-NLS-1$
public static final String MISSING_BOOKS_HELP_VIEW_HREF = "MissingBooksHV.html"; //$NON-NLS-1$
-
+
/*
* A place holder defines a page to be shown when a documentation page
* which matches the specified path not installed
@@ -58,7 +58,7 @@ public class MissingContentManager {
public String path;
public String bundle;
public String placeholderPage;
-
+
public Placeholder(String path, String bundle, String placeholderPage) {
this.path = path;
this.bundle = bundle;
@@ -69,20 +69,20 @@ public class MissingContentManager {
return o.path.compareTo(path);
}
}
-
+
private static MissingContentManager instance;
private List<Placeholder> placeholders;
private Set<String> bundlesToIgnore; // A set of bundles the user does not want to see reference to
-
+
public static MissingContentManager getInstance() {
if ( instance == null ) {
instance = new MissingContentManager();
}
return instance;
}
-
+
/*
- * Read the extension registry
+ * Read the extension registry
*/
private MissingContentManager() {
IExtensionRegistry registry = Platform.getExtensionRegistry();
@@ -119,9 +119,9 @@ public class MissingContentManager {
while (tokenizer.hasMoreTokens()) {
bundlesToIgnore.add(tokenizer.nextToken());
}
- }
+ }
}
-
+
/**
* Called when a page cannot be found
* @param path the path of the page that could not be loaded
@@ -136,13 +136,13 @@ public class MissingContentManager {
} else {
return "/org.eclipse.help.webapp/" + MISSING_TOPIC_PATH + path.substring(HELP_PROTOCOL.length()); //$NON-NLS-1$
}
- }
+ }
}
return Platform.getPreferencesService().getString(HelpBasePlugin.PLUGIN_ID, "page_not_found", null, null); //$NON-NLS-1$
- }
-
+ }
+
/**
- *
+ *
* @return true if there is an unresolved place holder and this is not an infocenter
*/
public boolean isUnresolvedPlaceholders() {
@@ -152,23 +152,23 @@ public class MissingContentManager {
Placeholder[] unresolvedPlaceHolders = getUnresolvedPlaceholders();
return unresolvedPlaceHolders.length > 0;
}
-
+
/**
* If any help is missing returns an appropriate page
- * @return null if no help is unavailable or an appropriate page if
- * the plug-in that corresponds to a place holder is not available.
+ * @return null if no help is unavailable or an appropriate page if
+ * the plug-in that corresponds to a place holder is not available.
* The returned page will be in the format /plug-in/path.
*/
- public String getHelpMissingPage(boolean isHelpView) {
+ public String getHelpMissingPage(boolean isHelpView) {
Placeholder[] unresolvedPlaceHolders = getUnresolvedPlaceholders();
if (unresolvedPlaceHolders.length == 0) {
return null;
} else {
String suffix = isHelpView ? MISSING_BOOKS_HELP_VIEW_HREF : MISSING_BOOKS_HREF;
return "/org.eclipse.help.webapp" + '/'+ suffix; //$NON-NLS-1$
- }
+ }
}
-
+
/**
* Get the page to be shown when some remote help is known to be unavailable
*/
@@ -176,14 +176,14 @@ public class MissingContentManager {
if ( BaseHelpSystem.getMode()!=BaseHelpSystem.MODE_INFOCENTER ) {
String suffix = isHelpView ? REMOTE_STATUS_HELP_VIEW_HREF : REMOTE_STATUS_HREF;
return "/org.eclipse.help.webapp/" + suffix; //$NON-NLS-1$
- }
+ }
return null;
}
public Placeholder[] getUnresolvedPlaceholders() {
List<Placeholder> unresolved;
unresolved = new ArrayList<Placeholder>();
- for (Iterator<Placeholder> iter = placeholders.iterator(); iter.hasNext(); ) {
+ for (Iterator<Placeholder> iter = placeholders.iterator(); iter.hasNext(); ) {
Placeholder ph = iter.next();
String bundle = ph.bundle;
if (bundle != null && !bundlesToIgnore.contains(bundle) ) {
@@ -194,11 +194,11 @@ public class MissingContentManager {
}
return unresolved.toArray(new Placeholder[unresolved.size()]);
}
-
+
// Modifies the preferences to ignore any bundles that are currently unresolved placeholders
public void ignoreAllMissingPlaceholders() {
Placeholder[] unresolved = getUnresolvedPlaceholders();
- String ignoredBundles = Platform.getPreferencesService().getString(HelpBasePlugin.PLUGIN_ID, IGNORE_MISSING_PLACEHOLDER_PREFERENCE, "", null); //$NON-NLS-1$
+ String ignoredBundles = Platform.getPreferencesService().getString(HelpBasePlugin.PLUGIN_ID, IGNORE_MISSING_PLACEHOLDER_PREFERENCE, "", null); //$NON-NLS-1$
for ( int i = 0; i < unresolved.length; i++) {
String bundle = unresolved[i].bundle;
bundlesToIgnore.add(bundle);
@@ -208,7 +208,7 @@ public class MissingContentManager {
ignoredBundles = ignoredBundles + bundle;
}
- IScopeContext instanceScope = InstanceScope.INSTANCE;
+ IScopeContext instanceScope = InstanceScope.INSTANCE;
IEclipsePreferences prefs = instanceScope.getNode(HelpBasePlugin.PLUGIN_ID);
prefs.put(IGNORE_MISSING_PLACEHOLDER_PREFERENCE, ignoredBundles);
try {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/DefaultPreferenceFileHandler.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/DefaultPreferenceFileHandler.java
index 7b43a64ab..430a497b2 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/DefaultPreferenceFileHandler.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/DefaultPreferenceFileHandler.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -33,7 +33,7 @@ public class DefaultPreferenceFileHandler extends PreferenceFileHandler {
icEnabledPreference = prefs.get(IHelpBaseConstants.P_KEY_REMOTE_HELP_ICEnabled, ""); //$NON-NLS-1$
isRemoteOn = prefs.getBoolean(IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, false);
isRemoteHelpPreferred = prefs.getBoolean(IHelpBaseConstants.P_KEY_REMOTE_HELP_PREFERRED, false);
-
+
//Get host array first, and initialize values
if(hostPreference.length()==0)
{
@@ -45,14 +45,14 @@ public class DefaultPreferenceFileHandler extends PreferenceFileHandler {
this.hostEntries = hostPreference.split(PREFERENCE_ENTRY_DELIMITER);
numHostEntries=hostEntries.length;
}
-
+
// Get the preference values
this.nameEntries = getValues(namePreference, ""); //$NON-NLS-1$
this.pathEntries = getValues(pathPreference, "/"); //$NON-NLS-1$
this.protocolEntries = getValues(protocolPreference, "http"); //$NON-NLS-1$
this.portEntries = getValues(portPreference, "80"); //$NON-NLS-1$
this.isICEnabled = getValues(icEnabledPreference, "true"); //$NON-NLS-1$
-
+
// The size of any of the array elements should equal the number of remote infocenters
if (this.nameEntries == null)
@@ -61,13 +61,13 @@ public class DefaultPreferenceFileHandler extends PreferenceFileHandler {
this.numEntries = this.nameEntries.length;
}
-
- public boolean isRemoteHelpOn() {
- return isRemoteOn;
+
+ public boolean isRemoteHelpOn() {
+ return isRemoteOn;
}
-
+
public boolean isRemoteHelpPreferred() {
return isRemoteHelpPreferred;
}
-
+
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/HttpsUtility.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/HttpsUtility.java
index ae5fe0f3f..fc2138b1d 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/HttpsUtility.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/HttpsUtility.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -25,7 +25,7 @@ public class HttpsUtility {
private static final String PARAM_LANG = "lang"; //$NON-NLS-1$
private final static int SOCKET_TIMEOUT = 5000; //milliseconds
-
+
public static HttpsURLConnection getConnection(URL httpsURL)
{
try
@@ -41,7 +41,7 @@ public class HttpsUtility {
e.printStackTrace();
return null;
}
- }
+ }
public static InputStream getHttpsStream(URL httpsURL)
{
try {
@@ -52,11 +52,11 @@ public class HttpsUtility {
return null;
}
}
-
+
public static InputStream getHttpsInputStream(String thisProtocol,String thisHost, String thisPort, String thisPath, String locale)
{
try {
- URL url = new URL(thisProtocol, thisHost, new Integer(thisPort) .intValue(),
+ URL url = new URL(thisProtocol, thisHost, new Integer(thisPort) .intValue(),
thisPath + PATH_TOC + '?' + PARAM_LANG + '=' + locale);
return getHttpsStream(url);
} catch (Exception e) {
@@ -64,18 +64,18 @@ public class HttpsUtility {
return null;
}
}
-
+
public static URL getHttpsURL(String thisProtocol,String thisHost, int thisPort, String thisPath)
{
try {
- return new URL(thisProtocol, thisHost, new Integer(thisPort) .intValue(),
+ return new URL(thisProtocol, thisHost, new Integer(thisPort) .intValue(),
thisPath + PATH_TOC);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
-
+
public static URL getHttpsURL(String urlPath)
{
try {
@@ -85,12 +85,12 @@ public class HttpsUtility {
return null;
}
}
-
+
public static URL getHttpsURL(String thisProtocol,String thisHost, String thisPort, String thisPath)
{
return getHttpsURL(thisProtocol,thisHost,Integer.parseInt(thisPort),thisPath);
}
-
+
public static boolean canConnectToHttpsURL(String urlConnection)
{
try
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/PreferenceFileHandler.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/PreferenceFileHandler.java
index d0913a4ea..403030e42 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/PreferenceFileHandler.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/PreferenceFileHandler.java
@@ -34,7 +34,7 @@ public class PreferenceFileHandler {
public static final int LOCAL_HELP_ONLY=0;
public static final int LOCAL_HELP_PRIORITY=1;
public static final int REMOTE_HELP_PRIORITY=2;
-
+
public PreferenceFileHandler() {
/*
@@ -67,14 +67,14 @@ public class PreferenceFileHandler {
this.hostEntries = hostPreference.split(PREFERENCE_ENTRY_DELIMITER);
numHostEntries=hostEntries.length;
}
-
+
// Get the preference values
this.nameEntries = getValues(namePreference, ""); //$NON-NLS-1$
this.pathEntries = getValues(pathPreference, "/"); //$NON-NLS-1$
this.protocolEntries = getValues(protocolPreference, "http"); //$NON-NLS-1$
this.portEntries = getValues(portPreference, "80"); //$NON-NLS-1$
this.isICEnabled = getValues(icEnabledPreference, "true"); //$NON-NLS-1$
-
+
// The size of any of the array elements should equal the number of remote infocenters
if (this.nameEntries == null)
@@ -87,40 +87,40 @@ public class PreferenceFileHandler {
if (numHostEntries==0) //preference equals ""
return new String[0];//NEW
-
+
// Split the string and return an array of Strings
String [] currEntries;
String [] updatedArray=null;
-
+
if(!preferenceEntry.equals("")) //$NON-NLS-1$
currEntries=preferenceEntry.split(PREFERENCE_ENTRY_DELIMITER);
else
currEntries = new String[0];
-
+
if(currEntries.length!=numHostEntries) //Current Entry not equals to Hosts
{
int i;
-
+
updatedArray=new String[numHostEntries];
-
+
if(currEntries.length>numHostEntries) //More in this array then host. Only take values for # of hosts
{
for(i=0;i<numHostEntries;i++)
{
updatedArray[i]=currEntries[i];
}
-
+
}
else //Less values. Append values based off or array types
{
int entryCount=0;
-
+
for(i=0;i<currEntries.length;i++)
{
updatedArray[i]=currEntries[i];
entryCount=entryCount+1;
}
-
+
for(i=entryCount;i<numHostEntries;i++)
{
updatedArray[i]=appendString;
@@ -128,22 +128,22 @@ public class PreferenceFileHandler {
}
currEntries=updatedArray;
}
-
+
return currEntries;
}
/**
* This methods writes the remote infocenters in the table model to the preferences.ini.
- *
+ *
* @param List
* of RemoteIC Objects
- *
+ *
*/
public static void commitRemoteICs(RemoteIC[] remoteICs) {
RemoteIC remote_ic = null;
- String name = "", host = "", path = "", protocol="", port = "", enabledString = ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ String name = "", host = "", path = "", protocol="", port = "", enabledString = ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
boolean enabled;
int numICs = remoteICs.length;
@@ -188,9 +188,9 @@ public class PreferenceFileHandler {
}
/**
- *
+ *
* This method returns an ArrayList containing all RemoteIC entries in the preferences
- *
+ *
*/
public ArrayList<RemoteIC> getRemoteICList() {
ArrayList<RemoteIC> remoteICList = new ArrayList<RemoteIC>();
@@ -228,7 +228,7 @@ public class PreferenceFileHandler {
public static int getEmbeddedHelpOption() {
boolean isRemoteOn = Platform.getPreferencesService().getBoolean
(HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, false, null);
-
+
boolean isRemotePreferred = Platform.getPreferencesService().getBoolean
(HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PREFERRED, false, null);
@@ -245,7 +245,7 @@ public class PreferenceFileHandler {
return REMOTE_HELP_PRIORITY;
}
}
-
+
public String[] getHostEntries() {
return hostEntries;
}
@@ -257,7 +257,7 @@ public class PreferenceFileHandler {
public String[] getPathEntries() {
return pathEntries;
}
-
+
public String[] getProtocolEntries() {
return protocolEntries;
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContentLocator.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContentLocator.java
index fc7740855..a63e64128 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContentLocator.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContentLocator.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -18,15 +18,15 @@ public class RemoteContentLocator {
private static Map<String, String> InfoCenterMap = null; // hash table
public RemoteContentLocator() {
-
+
}
public static void addContentPage(String contributorID, String InfoCenterUrl) {
-
+
if (InfoCenterMap == null){
InfoCenterMap = new TreeMap<String, String>(); // sorted map
}
-
+
InfoCenterMap.put(contributorID, InfoCenterUrl);
}
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 5a0d07bf5..f98b6d589 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
@@ -55,7 +55,7 @@ public class RemoteContextProvider extends AbstractContextProvider {
if (isEnabled[i].equals("true")) { //$NON-NLS-1$
InputStream in = null;
try {
-
+
HttpURLConnection connection;
if(protocols[i].equals(PROTOCOL))
{
@@ -63,7 +63,7 @@ public class RemoteContextProvider extends AbstractContextProvider {
connection = (HttpURLConnection)ProxyUtil.getConnection(url);
if (connection.getResponseCode() == 200) {
in = connection.getInputStream();
-
+
}
}
else
@@ -71,12 +71,12 @@ public class RemoteContextProvider extends AbstractContextProvider {
url = HttpsUtility.getHttpsURL(protocols[i], host[i], port[i], path[i]+ PATH_CONTEXT + '?' + PARAM_ID + '=' + id + '&' + PARAM_LANG + '=' + locale);
in = HttpsUtility.getHttpsStream(url);
}
-
+
if (reader == null) {
reader = new DocumentReader();
}
return (Context) reader.read(in);
-
+
} catch (IOException e) {
String msg = "I/O error while trying to contact the remote help server"; //$NON-NLS-1$
HelpBasePlugin.logError(msg, e);
@@ -102,7 +102,7 @@ public class RemoteContextProvider extends AbstractContextProvider {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.help.AbstractContextProvider#getPlugins()
*/
public String[] getPlugins() {
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 2758ae542..427afc39d 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
@@ -29,7 +29,7 @@ public class RemoteExtensionProvider extends AbstractContentExtensionProvider {
private static final String PATH_EXTENSIONS = "/extension"; //$NON-NLS-1$
private static final String PROTOCOL_HTTP = "http"; //$NON-NLS-1$
-
+
private DocumentReader reader;
public RemoteExtensionProvider() {
@@ -39,7 +39,7 @@ public class RemoteExtensionProvider extends AbstractContentExtensionProvider {
}
});
}
-
+
public IContentExtension[] getContentExtensions(String locale) {
if (RemoteHelp.isEnabled()) {
List<IContentExtension> contributions = new ArrayList<IContentExtension>();
@@ -50,7 +50,7 @@ public class RemoteExtensionProvider extends AbstractContentExtensionProvider {
InputStream in = null;
try {
URL url = RemoteHelp.getURL(ic, PATH_EXTENSIONS);
-
+
if(url.getProtocol().equalsIgnoreCase(PROTOCOL_HTTP))
{
in = ProxyUtil.getStream(url);
@@ -59,7 +59,7 @@ public class RemoteExtensionProvider extends AbstractContentExtensionProvider {
{
in = HttpsUtility.getHttpsStream(url);
}
-
+
if (reader == null) {
reader = new DocumentReader();
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteHelp.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteHelp.java
index 30c6315e2..ad70b39cd 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteHelp.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteHelp.java
@@ -39,7 +39,7 @@ public class RemoteHelp {
}
listeners.add(listener);
}
-
+
/*
* Removes a listener.
*/
@@ -48,7 +48,7 @@ public class RemoteHelp {
listeners.remove(listener);
}
}
-
+
/*
* Signals all registered listeners that remote help preferences have
* changed.
@@ -62,7 +62,7 @@ public class RemoteHelp {
}
}
}
-
+
public static URL getURL(int ic, String pathSuffix) throws MalformedURLException {
PreferenceFileHandler handler = new PreferenceFileHandler();
String host = handler.getHostEntries()[ic];
@@ -74,15 +74,15 @@ public class RemoteHelp {
port = Integer.parseInt(handler.getPortEntries()[ic]);
} catch (NumberFormatException e) {
throw new MalformedURLException();
- }
+ }
if(protocol.equalsIgnoreCase(PROTOCOL_HTTPS))
url = HttpsUtility.getHttpsURL(protocol,host,port,path);
else
url = new URL(PROTOCOL_HTTP, host, port, path);
-
+
return url;
}
-
+
/*
* Returns whether or not the help system is currently configured for remote
* help content.
@@ -90,14 +90,14 @@ public class RemoteHelp {
public static boolean isEnabled() {
return Platform.getPreferencesService().getBoolean(HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, false, null);
}
-
+
/*
* Clears the error status for remote help.
*/
public static void clearError() {
error = null;
}
-
+
/*
* Returns the error produced during a previous remote help
* query, or null if there was none.
@@ -105,7 +105,7 @@ public class RemoteHelp {
public static Throwable getError() {
return error;
}
-
+
/*
* Sets the latest exception to have occured while communicating
* with the remote help server.
@@ -113,5 +113,5 @@ public class RemoteHelp {
public static void setError(Throwable t) {
error = t;
}
-
+
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteHelpInputStream.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteHelpInputStream.java
index f371d494c..30f4ae6a3 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteHelpInputStream.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteHelpInputStream.java
@@ -22,54 +22,54 @@ import java.io.InputStream;
public class RemoteHelpInputStream extends InputStream{
private InputStream is;
-
+
public RemoteHelpInputStream(){
is=null;
}
public RemoteHelpInputStream(InputStream is) {
- this.is=is;
+ this.is=is;
}
-
+
public InputStream getInputStream(){
return this.is;
}
-
+
public int read() throws IOException {
return is.read();
}
-
+
public int available() throws IOException {
return is.available();
}
-
+
public void close() throws IOException {
is.close();
}
-
+
public synchronized void mark(int arg0) {
is.mark(arg0);
}
-
+
public boolean markSupported() {
return is.markSupported();
}
-
+
public int read(byte[] b) throws IOException {
return is.read(b);
}
-
+
public int read(byte[] b, int off, int len) throws IOException {
return is.read(b, off, len);
}
-
+
public synchronized void reset() throws IOException {
is.reset();
}
-
+
public long skip(long n) throws IOException {
return is.skip(n);
}
-
-
+
+
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIC.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIC.java
index ffcb2b0fb..1aef06b53 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIC.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIC.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -15,19 +15,19 @@ public class RemoteIC {
private boolean enabled = false;
private String name = ""; //$NON-NLS-1$
-
+
private String host = ""; //$NON-NLS-1$
private String path = ""; //$NON-NLS-1$
-
+
private String protocol = ""; //$NON-NLS-1$
-
+
private String port;
-
+
private static final String PROTOCOL_HTTP = "http"; //$NON-NLS-1$
-
+
public RemoteIC(boolean enabled, String name, String host, String path, String port){
-
+
this.enabled = enabled;
this.name = name;
this.host = host;
@@ -37,14 +37,14 @@ public class RemoteIC {
}
public RemoteIC(boolean enabled, String name, String host, String path, String protocol, String port){
-
+
this.enabled = enabled;
this.name = name;
this.host = host;
this.path = path;
this.protocol = protocol;
this.port = port;
-
+
}
public String getHost() {
return host;
@@ -53,7 +53,7 @@ public class RemoteIC {
public String getPath() {
return path;
}
-
+
public String getProtocol() {
return protocol;
}
@@ -85,7 +85,7 @@ public class RemoteIC {
public void setPath(String path) {
this.path = path;
}
-
+
public void setProtocol(String protocol) {
this.protocol = protocol;
}
@@ -93,15 +93,15 @@ public class RemoteIC {
public void setPort(String port) {
this.port = port;
}
-
+
//I added this method, which overrides the original "equal" method in the class Object
-
+
public boolean equals(Object anotherObject)throws ClassCastException {
if (!(anotherObject instanceof RemoteIC))
return false;
if ( !(((RemoteIC) anotherObject).getName().equals(this.getName())))
- return false;
+ return false;
if ( !(((RemoteIC) anotherObject).getHost().equals(this.getHost())))
return false;
if ( !(((RemoteIC) anotherObject).getPath().equals(this.getPath())))
@@ -109,10 +109,10 @@ public class RemoteIC {
if ( !(((RemoteIC) anotherObject).getProtocol().equals(this.getProtocol())))
return false;
if ( !(((RemoteIC) anotherObject).getPort().equals(this.getPort())))
- return false;
+ return false;
if ( !(((RemoteIC) anotherObject).isEnabled()==this.isEnabled()))
return false;
-
+
//if we made it here, the the objects are the same
return true;
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIndexParser.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIndexParser.java
index 75064b90e..d770c3dbd 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIndexParser.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIndexParser.java
@@ -31,7 +31,7 @@ import org.xml.sax.helpers.DefaultHandler;
public class RemoteIndexParser extends DefaultHandler {
private DocumentReader reader;
-
+
/*
* Parses the given serialized indexes and returns generated model objects.
*/
@@ -49,7 +49,7 @@ public class RemoteIndexParser extends DefaultHandler {
contribution.setLocale(child.getAttribute("locale")); //$NON-NLS-1$
contribution.setIndex((Index)child.getChildren()[0]);
contributions[i] = contribution;
- }
+ }
return contributions;
}
}
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 1cae29655..6cd5c62a7 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
@@ -32,7 +32,7 @@ public class RemoteIndexProvider extends AbstractIndexProvider {
private static final String PATH_INDEX = "/index"; //$NON-NLS-1$
private static final String PARAM_LANG = "lang"; //$NON-NLS-1$
private static final String PROTOCOL_HTTP = "http"; //$NON-NLS-1$
-
+
/*
* Constructs a new remote index provider, which listens for remote
* help preference changes.
@@ -44,7 +44,7 @@ public class RemoteIndexProvider extends AbstractIndexProvider {
}
});
}
-
+
/* (non-Javadoc)
* @see org.eclipse.help.AbstractIndexProvider#getIndexContributions(String)
*/
@@ -62,7 +62,7 @@ public class RemoteIndexProvider extends AbstractIndexProvider {
InputStream in = null;
try {
URL url;
-
+
if(protocol[ic].equals(PROTOCOL_HTTP))
{
url = RemoteHelp.getURL(ic, PATH_INDEX + '?' + PARAM_LANG + '=' + locale);
@@ -73,7 +73,7 @@ public class RemoteIndexProvider extends AbstractIndexProvider {
url = HttpsUtility.getHttpsURL(protocol[ic], host[ic], port[ic], path[ic]+PATH_INDEX + '?' + PARAM_LANG + '=' + locale);
in = HttpsUtility.getHttpsStream(url);
}
-
+
RemoteIndexParser parser = new RemoteIndexParser();
IIndexContribution[] result = parser.parse(in);
for (int contrib = 0; contrib < result.length; contrib++) {
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 cc2eb701c..d3a16ba99 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
@@ -3,7 +3,7 @@
* accompanying materials are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors: IBM Corporation - initial API and implementation
**************************************************************************************************/
package org.eclipse.help.internal.base.remote;
@@ -46,7 +46,7 @@ public class RemoteSearchManager {
String path[] = prefHandler.getPathEntries();
String [] protocols = prefHandler.getProtocolEntries();
String isEnabled[] = prefHandler.isEnabled();
-
+
try {
// InfoCenters ignore remote content
if (RemoteHelp.isEnabled()) {
@@ -58,7 +58,7 @@ public class RemoteSearchManager {
InputStream in = null;
try {
URL url;
-
+
if(protocols[i].equals(PROTOCOL_HTTP))
{
url = new URL("http", host[i], new Integer(port[i]).intValue(), path[i] + PATH_SEARCH + '?' + PARAM_PHRASE + '=' + URLCoder.encode(searchQuery.getSearchWord()) + '&' + PARAM_LANG + '=' + searchQuery.getLocale()); //$NON-NLS-1$
@@ -66,11 +66,11 @@ public class RemoteSearchManager {
}
else
{
- url = HttpsUtility.getHttpsURL(protocols[i], host[i], port[i], path[i]+ PATH_SEARCH + '?' + PARAM_PHRASE + '=' + URLCoder.encode(searchQuery.getSearchWord()) + '&' + PARAM_LANG + '=' + searchQuery.getLocale());
+ url = HttpsUtility.getHttpsURL(protocols[i], host[i], port[i], path[i]+ PATH_SEARCH + '?' + PARAM_PHRASE + '=' + URLCoder.encode(searchQuery.getSearchWord()) + '&' + PARAM_LANG + '=' + searchQuery.getLocale());
in = HttpsUtility.getHttpsStream(url);
}
-
- RemoteSearchParser parser = new RemoteSearchParser();
+
+ RemoteSearchParser parser = new RemoteSearchParser();
// parse the XML-serialized search results
List<SearchHit> hits = parser.parse(in, new SubProgressMonitor(pm, 100));
collector.addHits(hits, null);
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteSearchParser.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteSearchParser.java
index a76074e11..e35969620 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteSearchParser.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteSearchParser.java
@@ -48,10 +48,10 @@ public class RemoteSearchParser extends DefaultHandler {
init();
parser.parse(in, this);
monitor.worked(1);
- monitor.done();
+ monitor.done();
return hits;
}
-
+
/*
* Initializes the parser's state for a new search. Must be called
* before each parse.
@@ -74,7 +74,7 @@ public class RemoteSearchParser extends DefaultHandler {
parser = SAXParserFactory.newInstance().newSAXParser();
}
}
-
+
/* (non-Javadoc)
* @see org.xml.sax.helpers.DefaultHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
*/
@@ -86,7 +86,7 @@ public class RemoteSearchParser extends DefaultHandler {
handleSummary(attributes);
}
}
-
+
/* (non-Javadoc)
* @see org.xml.sax.helpers.DefaultHandler#endElement(java.lang.String, java.lang.String, java.lang.String)
*/
@@ -126,16 +126,16 @@ public class RemoteSearchParser extends DefaultHandler {
hits.add(hit);
stack.push(hit);
}
-
+
private void handleSummary(Attributes attr) {
// prepare the buffer to receive text summary
summary = new StringBuffer();
}
-
+
/*
* Note: throws clause does not declare IOException due to a bug in
* sun jdk: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6327149
- *
+ *
* @see org.xml.sax.helpers.DefaultHandler#resolveEntity(java.lang.String, java.lang.String)
*/
public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteStatusData.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteStatusData.java
index bae4d6448..c502cbdf3 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteStatusData.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteStatusData.java
@@ -24,10 +24,10 @@ import org.eclipse.help.internal.base.IHelpBaseConstants;
import org.eclipse.help.internal.base.util.TestConnectionUtility;
public class RemoteStatusData {
-
+
private static int TIMEOUT = 60 * 1000;
-
-
+
+
/*
* Convenience method to see if any remote help
* is down
@@ -41,29 +41,29 @@ public class RemoteStatusData {
for (int s=0;s<sites.size();s++)
if (!isConnected(sites.get(s)))
return true;
-
+
return false;
}
/*
* Checks each URL in the ArrayList site to see if
- * a network connection can be opened to
+ * a network connection can be opened to
* url+/index.jsp
- *
+ *
* Returns a subset of sites that cannot be connected.
* May be empty, or may be the same as sites
*/
public static ArrayList<URL> checkSitesConnectivity(ArrayList<URL> sites)
{
ArrayList<URL> badSites = new ArrayList<URL>();
-
+
for (int i=0;i<sites.size();i++)
if (!isConnected(sites.get(i)))
badSites.add(sites.get(i));
-
+
return badSites;
}
-
+
public static boolean isConnected(URL site)
{
ConnectionCache cache = ConnectionCache.getCache();
@@ -71,28 +71,28 @@ public class RemoteStatusData {
return cache.isConnected(site);
}catch(CoreException e)
{
- boolean connected = TestConnectionUtility.testConnection(site.getHost(),
+ boolean connected = TestConnectionUtility.testConnection(site.getHost(),
"" + site.getPort(), site.getPath(), site.getProtocol()); //$NON-NLS-1$
cache.put(site, connected);
cache.resetTimer();
return connected;
}
}
-
+
/*
* Loads the remote sites stored in preferences,
* and places them as URLs in an ArrayList.
- *
+ *
* Returns the ArrayList with sites in URL form
*/
public static ArrayList<URL> getRemoteSites()
{
ArrayList<URL> sites = new ArrayList<URL>();
-
- boolean remoteHelpEnabled =
+
+ boolean remoteHelpEnabled =
Platform.getPreferencesService().getBoolean(
HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, false,null);
-
+
if (!remoteHelpEnabled)
return sites;
@@ -106,8 +106,8 @@ public class RemoteStatusData {
HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PORT, "", null).split(","); //$NON-NLS-1$ //$NON-NLS-2$
String enableds[] = Platform.getPreferencesService().getString(
HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ICEnabled, "", null).split(","); //$NON-NLS-1$ //$NON-NLS-2$
-
-
+
+
for (int i=0;i<hosts.length;i++)
{
try{
@@ -127,25 +127,25 @@ public class RemoteStatusData {
public static void clearCache() {
ConnectionCache.clear();
}
-
+
private static class ConnectionCache
{
private static ConnectionCache instance;
-
+
private Hashtable<URL, Boolean> cache;
private long start;
-
+
private ConnectionCache(){
-
+
cache = new Hashtable<URL, Boolean>();
resetTimer();
}
-
+
public void resetTimer()
{
start = new Date().getTime();
}
-
+
public static ConnectionCache getCache()
{
if (instance==null || instance.isExpired())
@@ -154,28 +154,28 @@ public class RemoteStatusData {
}
return instance;
}
-
+
public static void clear()
{
instance = null;
}
-
+
public boolean isExpired()
{
long now = new Date().getTime();
-
+
return (now > start + TIMEOUT);
}
-
+
public boolean isConnected(URL url) throws CoreException
{
Boolean b = cache.get(url);
if (b==null)
throw new CoreException(new Status(IStatus.ERROR,HelpBasePlugin.PLUGIN_ID,"Cache Unavailable")); //$NON-NLS-1$
-
+
return b.booleanValue();
}
-
+
public void put(URL url,boolean connected)
{
cache.put(url,new Boolean(connected));
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocParser.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocParser.java
index 2c61d86b3..1c0394b24 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocParser.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocParser.java
@@ -3,7 +3,7 @@
* accompanying materials are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors: IBM Corporation - initial API and implementation
**************************************************************************************************/
package org.eclipse.help.internal.base.remote;
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 30055fbe9..6ab978f6d 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
@@ -46,7 +46,7 @@ public class RemoteTocProvider extends AbstractTocProvider {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.help.AbstractTocProvider#getTocContributions(java.lang.String)
*/
public ITocContribution[] getTocContributions(String locale) {
@@ -83,12 +83,12 @@ public class RemoteTocProvider extends AbstractTocProvider {
for (int i = numICs-1; i >= 0; i--) {
if (isEnabled[i].equalsIgnoreCase("true")) { //$NON-NLS-1$
try {
-
+
if(protocol[i].equalsIgnoreCase(PROTOCOL))
{
- url = new URL(protocol[i], host[i], new Integer(port[i]) .intValue(),
+ url = new URL(protocol[i], host[i], new Integer(port[i]) .intValue(),
path[i] + PATH_TOC + '?' + PARAM_LANG + '=' + locale);
-
+
in = ProxyUtil.getStream(url);
urlStr = PROTOCOL + "://"+host[i] + ":" + port[i] + path[i]; //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -145,15 +145,15 @@ public class RemoteTocProvider extends AbstractTocProvider {
return new ITocContribution[0];
}
-
-
+
+
/* (non-Javadoc)
* @see org.eclipse.help.AbstractTocProvider#getPriority()
*/
public int getPriority() {
-
+
int helpOption=PreferenceFileHandler.getEmbeddedHelpOption();
-
+
if(helpOption ==PreferenceFileHandler.LOCAL_HELP_ONLY || helpOption==PreferenceFileHandler.LOCAL_HELP_PRIORITY)
return TOC_FILE_PRIORITY+1;
else return DEFAULT_PRIORITY-1;
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java
index acce3b34e..23d3be655 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java
@@ -41,11 +41,11 @@ public class CriteriaHelpScope extends AbstractHelpScope {
if(null == criteriaScope) {
this.criteriaScope = new CriterionResource[0];
} else {
- this.criteriaScope = new CriterionResource[criteriaScope.size()];
+ this.criteriaScope = new CriterionResource[criteriaScope.size()];
criteriaScope.toArray(this.criteriaScope);
}
}
-
+
public boolean inScope(IToc toc) {
if(null == toc){
if(null == criteriaScope || 0 == criteriaScope.length){
@@ -80,11 +80,11 @@ public class CriteriaHelpScope extends AbstractHelpScope {
String value = String.valueOf(valueIterator.next());
if (value.equals(UNCATEGORIZED)) {
if (!ownCriteria.containsKey(key)) {
- continue outer;
+ continue outer;
}
} else {
if (null != ownCriteria.get(key) && ownCriteria.get(key).contains(value))
- continue outer;
+ continue outer;
}
}
return false;
@@ -97,7 +97,7 @@ public class CriteriaHelpScope extends AbstractHelpScope {
CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria);
return criteriaMap;
}
-
+
private Map<String, Set<String>> getCriteriaInfo(ICriteria[] criteria) {
Map<String, Set<String>> criteriaMap = new HashMap<String, Set<String>>();
CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria);
@@ -111,5 +111,5 @@ public class CriteriaHelpScope extends AbstractHelpScope {
public String getName(Locale locale) {
return null;
}
-
+
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/EnablementScope.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/EnablementScope.java
index 6e0063ab3..c887a2cdf 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/EnablementScope.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/EnablementScope.java
@@ -38,7 +38,7 @@ public class EnablementScope extends AbstractHelpScope {
public boolean inScope(IIndexSee see) {
return true;
}
-
+
/**
* @return the name for the system locale. This filter only applies to
* the help system running in workbench mode so there is not need to
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/IntersectionScope.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/IntersectionScope.java
index e7d7d2eb5..1eec0fb6f 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/IntersectionScope.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/IntersectionScope.java
@@ -25,9 +25,9 @@ import org.eclipse.help.base.AbstractHelpScope;
*/
public class IntersectionScope extends AbstractHelpScope {
-
+
AbstractHelpScope[] scopes;
-
+
public IntersectionScope(AbstractHelpScope[] scopes) {
this.scopes = scopes;
}
@@ -71,7 +71,7 @@ public class IntersectionScope extends AbstractHelpScope {
public String getName(Locale locale) {
return null;
}
-
+
public boolean isHierarchicalScope() {
for (int scope = 0; scope < scopes.length; scope ++) {
if (!scopes[scope].isHierarchicalScope()) {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeHandle.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeHandle.java
index 0465ff523..19768382a 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeHandle.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeHandle.java
@@ -15,10 +15,10 @@ import org.eclipse.help.base.AbstractHelpScope;
import org.eclipse.help.base.IScopeHandle;
public class ScopeHandle implements IScopeHandle{
-
- private AbstractHelpScope scope;
+
+ private AbstractHelpScope scope;
private String id;
-
+
public ScopeHandle( String id, AbstractHelpScope scope) {
this.id = id;
this.scope = scope;
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 87697fab3..261856520 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
@@ -35,27 +35,27 @@ public class ScopeRegistry {
public static final String SCOPE_OR = "|"; //$NON-NLS-1$
private static List<IScopeHandle> scopes = null;
-
+
private static ScopeRegistry instance;
private boolean initialized = false;
-
+
private ScopeRegistry() {
}
-
+
public static ScopeRegistry getInstance() {
if (instance == null)
instance = new ScopeRegistry();
return instance;
}
-
+
public AbstractHelpScope getScope(String id) {
if (id == null) {
return new UniversalScope();
}
readScopes();
-
-
+
+
// Lookup in scope registry
for (Iterator<IScopeHandle> iter = scopes.iterator(); iter.hasNext();) {
IScopeHandle handle = iter.next();
@@ -69,7 +69,7 @@ public class ScopeRegistry {
synchronized private void readScopes() {
if (initialized ) {
return;
- }
+ }
scopes = new ArrayList<IScopeHandle>();
IExtensionRegistry registry = Platform.getExtensionRegistry();
IConfigurationElement[] elements = registry
@@ -97,7 +97,7 @@ public class ScopeRegistry {
}
initialized = true;
}
-
+
public IScopeHandle[] getScopes() {
readScopes();
return scopes.toArray(new IScopeHandle[scopes.size()]);
@@ -106,21 +106,21 @@ public class ScopeRegistry {
/**
* Parse logical sets of Scopes. All phrases in the
* array are intersected together
- *
+ *
* @param phrases
* @return
*/
public AbstractHelpScope parseScopePhrases(String phrases[])
{
ArrayList<AbstractHelpScope> scopes = new ArrayList<AbstractHelpScope>();
-
+
for (int p=0;p<phrases.length;p++)
{
AbstractHelpScope scope = parseScopePhrase(phrases[p]);
if (scope!=null)
scopes.add(scope);
}
-
+
if (scopes.size()==0)
return null;
if (scopes.size()==1)
@@ -129,11 +129,11 @@ public class ScopeRegistry {
scopes.toArray(
new AbstractHelpScope[scopes.size()]));
}
-
+
/**
* Parse a logical phrase of scope names. i.e.:
* (A^B)|C
- *
+ *
* @param phrase
* @return
*/
@@ -141,12 +141,12 @@ public class ScopeRegistry {
{
if (!(phrase.startsWith("(") && !phrase.startsWith("("))) //$NON-NLS-1$ //$NON-NLS-2$
phrase = '('+phrase+')';
-
+
Stack<TempScope> scopeStack = new Stack<TempScope>();
ScopePhrase scopePhrase = new ScopePhrase(phrase);
-
+
String elem;
-
+
while ((elem = scopePhrase.getNextElement())!=null)
{
if (elem.equals("(")) //$NON-NLS-1$
@@ -185,27 +185,27 @@ public class ScopeRegistry {
}
return null;
}
-
+
/**
* A class used to parse a logical scope phrase, by
* returning each part of the phrase as a separate element
- *
+ *
*/
class ScopePhrase{
-
+
private String phrase;
private int cursor;
-
+
public ScopePhrase(String phrase)
{
this.phrase = phrase;
this.cursor = 0;
}
-
+
public String getNextElement()
{
String next = ""; //$NON-NLS-1$
-
+
for (;cursor<phrase.length();cursor++)
{
char current = phrase.charAt(cursor);
@@ -223,7 +223,7 @@ public class ScopeRegistry {
return null;
return next;
}
-
+
private String format(String next,char current)
{
if (next.equals("")) //$NON-NLS-1$
@@ -239,27 +239,27 @@ public class ScopeRegistry {
/**
* A class used to contruct a logical AbstractHelpScope based
* on one Scope, or a union/intersection of scopes.
- *
+ *
*/
private class TempScope
{
public final static int SELF=0;
public final static int UNION=1;
public final static int INTERSECTION=2;
-
+
private ArrayList<AbstractHelpScope> kids = new ArrayList<AbstractHelpScope>();
private int type;
-
+
public void setType(int type)
{
this.type = type;
}
-
+
public void add(AbstractHelpScope kid)
{
kids.add(kid);
}
-
+
public AbstractHelpScope getScope()
{
switch (type){
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeUtils.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeUtils.java
index 0b96055ed..005d67776 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeUtils.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeUtils.java
@@ -26,11 +26,11 @@ import org.eclipse.help.internal.index.Index;
import org.eclipse.help.internal.index.IndexSee;
/**
- * Utilities to test for enabled topics, index entries etc.
+ * Utilities to test for enabled topics, index entries etc.
*/
public class ScopeUtils {
-
+
/*
* Function to determine whether a topic should be shown in the toc.
@@ -43,7 +43,7 @@ public class ScopeUtils {
return false;
}
return hasInScopeDescendent(toc, scope);
-
+
}
/*
@@ -58,7 +58,7 @@ public class ScopeUtils {
}
return !scope.isHierarchicalScope() && hasInScopeDescendent(topic, scope);
}
-
+
/*
* Function to determine whether an entry should be shown in the index.
* For hierarchical scopes the element itself must be in scope.
@@ -79,13 +79,13 @@ public class ScopeUtils {
public static boolean hasInScopeDescendent(ITopic topic, AbstractHelpScope scope) {
ITopic[] subtopics = topic.getSubtopics();
for (int i = 0; i < subtopics.length; i++) {
- if (showInTree(subtopics[i], scope)) {
+ if (showInTree(subtopics[i], scope)) {
return true;
}
}
return false;
}
-
+
/*
* Returns true if one of the children meets the conditions
* necessary to be shown in the Toc tree
@@ -93,13 +93,13 @@ public class ScopeUtils {
public static boolean hasInScopeDescendent(IToc toc, AbstractHelpScope scope) {
ITopic[] topics = toc.getTopics();
for (int i = 0; i < topics.length; i++) {
- if (showInTree(topics[i], scope)) {
+ if (showInTree(topics[i], scope)) {
return true;
}
}
return false;
}
-
+
/*
* Returns true if one of the children meets the conditions
* necessary to be shown in the Index
@@ -143,11 +143,11 @@ public class ScopeUtils {
if (target == null) {
return false;
}
- return showInTree(target, scope);
+ return showInTree(target, scope);
}
return false;
}
-
+
public static boolean showInTree(IIndexSee see, AbstractHelpScope scope) {
if (scope.isHierarchicalScope() && !scope.inScope(see)) {
return false;
@@ -165,7 +165,7 @@ public class ScopeUtils {
if (target == null) {
return false;
}
- return showInTree(target, scope);
+ return showInTree(target, scope);
}
return false;
}
@@ -173,7 +173,7 @@ public class ScopeUtils {
/**
* Filter out any disabled entries from an array
* @param entries an array of entries
- * @param scope
+ * @param scope
* @return an array containing only those entries which are enabled
*/
public static IIndexEntry[] inScopeEntries(IIndexEntry[] entries, AbstractHelpScope scope) {
@@ -194,7 +194,7 @@ public class ScopeUtils {
/**
* Filter out any disabled topics from an array
* @param topics an array of topics
- * @param scope
+ * @param scope
* @return an array containing only those topics which are enabled
*/
public static ITopic[] inScopeTopics(ITopic[] topics, AbstractHelpScope scope) {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/SearchScopeScope.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/SearchScopeScope.java
index 51577e4f0..9f740cdce 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/SearchScopeScope.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/SearchScopeScope.java
@@ -41,7 +41,7 @@ public class SearchScopeScope extends AbstractHelpScope {
public boolean inScope(IIndexSee see) {
return false;
}
-
+
/**
* @return the name for the system locale. This filter only applies to
* the help system running in workbench mode so there is not need to
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/UnionScope.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/UnionScope.java
index a29cc3f4d..19f022df0 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/UnionScope.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/UnionScope.java
@@ -25,9 +25,9 @@ import org.eclipse.help.base.AbstractHelpScope;
*/
public class UnionScope extends AbstractHelpScope {
-
+
AbstractHelpScope[] scopes;
-
+
public UnionScope(AbstractHelpScope[] scopes) {
this.scopes = scopes;
}
@@ -71,7 +71,7 @@ public class UnionScope extends AbstractHelpScope {
public String getName(Locale locale) {
return null;
}
-
+
public boolean isHierarchicalScope() {
for (int scope = 0; scope < scopes.length; scope ++) {
if (!scopes[scope].isHierarchicalScope()) {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java
index 7b2ffb47d..9604ee020 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java
@@ -36,21 +36,21 @@ import org.eclipse.help.internal.workingset.IHelpWorkingSetManager;
import org.eclipse.help.internal.workingset.WorkingSet;
public class WorkingSetScope extends AbstractHelpScope {
-
+
private static final String UNCATEGORIZED = "Uncategorized"; //$NON-NLS-1$
-
+
private WorkingSet workingSet;
private AdaptableHelpResource[] elements;
private CriterionResource[] criteria;
private String name;
public WorkingSetScope(String scope, IHelpWorkingSetManager manager, String name) {
- workingSet = manager.getWorkingSet(scope);
+ workingSet = manager.getWorkingSet(scope);
elements = workingSet.getElements();
criteria = workingSet.getCriteria();
this.name = name;
}
-
+
public WorkingSetScope(WorkingSet wset, String name) {
workingSet = wset;
elements = workingSet.getElements();
@@ -65,13 +65,13 @@ public class WorkingSetScope extends AbstractHelpScope {
return inContentScope(toc);
}
}
-
+
private boolean inContentScope(IToc toc) {
- for (int i = 0; i < elements.length; i++) {
+ for (int i = 0; i < elements.length; i++) {
for (AdaptableHelpResource adaptable = elements[i]; adaptable != null; ) {
- Object itoc = adaptable.getAdapter(IToc.class);
+ Object itoc = adaptable.getAdapter(IToc.class);
if (toc == itoc) {
- return true;
+ return true;
}
IAdaptable parent= adaptable.getParent();
if (parent instanceof AdaptableHelpResource) {
@@ -79,11 +79,11 @@ public class WorkingSetScope extends AbstractHelpScope {
} else {
adaptable = null;
}
- }
+ }
}
return false;
}
-
+
private boolean inCriteriaScope(IToc toc) {
if(null == toc){
if(null == criteria || 0 == criteria.length){
@@ -94,7 +94,7 @@ public class WorkingSetScope extends AbstractHelpScope {
ICriteria[] criteriaOfToc = CriteriaProviderRegistry.getInstance().getAllCriteria(toc);
return isCriteriaInScope(criteriaOfToc);
}
-
+
private boolean isCriteriaInScope(ICriteria[] criteriaOfTopic) {
if(null ==criteria){
return true;
@@ -107,24 +107,24 @@ public class WorkingSetScope extends AbstractHelpScope {
String value = String.valueOf(valueIterator.next());
if (value.equals(UNCATEGORIZED)) {
if (!ownCriteria.containsKey(key)) {
- continue outer;
+ continue outer;
}
} else {
if (null != ownCriteria.get(key) && ownCriteria.get(key).contains(value))
- continue outer;
+ continue outer;
}
}
return false;
}
return true;
}
-
+
private Map<String, Set<String>> getCriteriaInfo(CriterionResource[] criteria) {
Map<String, Set<String>> criteriaMap = new HashMap<String, Set<String>>();
CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria);
return criteriaMap;
}
-
+
private Map<String, Set<String>> getCriteriaInfo(ICriteria[] criteria) {
Map<String, Set<String>> criteriaMap = new HashMap<String, Set<String>>();
CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria);
@@ -138,7 +138,7 @@ public class WorkingSetScope extends AbstractHelpScope {
return inContentScope(topic);
}
}
-
+
private boolean inContentScope(ITopic topic) {
Set<IUAElement> topics = new HashSet<IUAElement>();
IToc toc = null;
@@ -150,7 +150,7 @@ public class WorkingSetScope extends AbstractHelpScope {
uae = null;
} else if (uae instanceof IIndexEntry) {
return isHrefInScope(topic.getHref());
- } else {
+ } else {
if (uae instanceof ITopic) {
topics.add(uae);
}
@@ -197,7 +197,7 @@ public class WorkingSetScope extends AbstractHelpScope {
}
return false;
}
-
+
private boolean inCriteriaScope(ITopic topic) {
if(null == topic){
if(null == criteria || 0 == criteria.length){
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java
index ab8fbec3c..66eafd00d 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java
@@ -21,7 +21,7 @@ import org.eclipse.help.ICriteria;
import org.eclipse.help.internal.criteria.CriterionResource;
public class CriteriaUtilities {
-
+
public static List<String> getCriteriaValues(String rawValues) {
List<String> result = new ArrayList<String>();
if (rawValues != null) {
@@ -35,7 +35,7 @@ public class CriteriaUtilities {
}
return result;
}
-
+
public static void addCriteriaToMap(Map<String, Set<String>> map, ICriteria[] criteria) {
for (int i = 0; i < criteria.length; ++i) {
ICriteria criterion = criteria[i];
@@ -49,16 +49,16 @@ public class CriteriaUtilities {
}
existingValueSet.addAll(values);
map.put(name, existingValueSet);
- }
+ }
}
}
-
+
public static void addCriteriaToMap(Map<String, Set<String>> map, CriterionResource[] criteria) {
for(int i = 0; i < criteria.length; ++ i){
CriterionResource criterion = criteria[i];
String criterionName = criterion.getCriterionName();
List<String> criterionValues = criterion.getCriterionValues();
-
+
Set<String> existedValueSet = map.get(criterionName);
if (null == existedValueSet)
existedValueSet = new HashSet<String>();
@@ -66,5 +66,5 @@ public class CriteriaUtilities {
map.put(criterionName, existedValueSet);
}
}
-
+
}
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 731f4a176..b178a938c 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
@@ -22,14 +22,14 @@ import org.eclipse.help.internal.*;
public class HelpProperties extends Properties {
private static final long serialVersionUID = 1L;
-
+
private File file = null;
protected String name = null;
/**
* Creates empty Properties for the specified plugin
- *
+ *
* @param name
* name of the file;
* @param plugin
@@ -41,7 +41,7 @@ public class HelpProperties extends Properties {
/**
* Creates empty Properties persisted in the specified directory
- *
+ *
* @param name
* name of the file;
* @param dir
@@ -55,7 +55,7 @@ public class HelpProperties extends Properties {
/**
* Restores contents of the Properties from a file.
- *
+ *
* @return true if persistant data was read in
*/
public boolean restore() {
@@ -85,7 +85,7 @@ public class HelpProperties extends Properties {
/**
* Saves contents of the table to a file.
- *
+ *
* @return true if operation was successful
*/
public boolean save() {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/IndexUtils.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/IndexUtils.java
index d8be1b6b3..73ebc1f53 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/IndexUtils.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/IndexUtils.java
@@ -19,7 +19,7 @@ import org.eclipse.help.IUAElement;
import org.eclipse.help.internal.UAElement;
public class IndexUtils {
-
+
/**
* Return a path representing all of the elements in the path of the see target
* For example if the see targets Eclipse / PDE the result will be an array
@@ -47,7 +47,7 @@ public class IndexUtils {
if (path[depth].equals(entryKeyword)) {
if (path.length == depth + 1) {
return new IIndexEntry[] { indexEntry };
- }
+ }
IIndexEntry[] targets = findSeeTargets(indexEntry, see, depth + 1);
IIndexEntry[] result = new IIndexEntry[targets.length + 1];
result[0] = indexEntry;
@@ -58,7 +58,7 @@ public class IndexUtils {
}
return new IIndexEntry[0];
}
-
+
public static String[] getPath(IIndexSee see) {
IIndexSubpath[] subpaths = see.getSubpathElements();
String[] result = new String[1 + subpaths.length];
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/LinkUtil.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/LinkUtil.java
index be438b856..087631051 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/LinkUtil.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/LinkUtil.java
@@ -8,9 +8,9 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-
+
package org.eclipse.help.internal.base.util;
-
+
public class LinkUtil {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/ProxyUtil.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/ProxyUtil.java
index c5308ab66..45a7e49f9 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/ProxyUtil.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/ProxyUtil.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -36,7 +36,7 @@ import org.eclipse.core.runtime.preferences.InstanceScope;
public class ProxyUtil {
-
+
public static boolean isAuthConnSupported()
{
try {
@@ -47,18 +47,18 @@ public class ProxyUtil {
}
return false;
}
-
+
public static IProxyData getProxy(URL url)
{
if (!isAuthConnSupported())
return null;
-
+
IProxyService service = ProxyManager.getProxyManager();
IProxyData data[];
-
+
if (!service.isProxiesEnabled())
return null;
-
+
try {
URI uri = url.toURI();
if (shouldBypass(uri))
@@ -68,18 +68,18 @@ public class ProxyUtil {
e.printStackTrace();
return null;
}
-
+
if (data.length==0)
return null;
return data[0];
}
-
+
public static boolean shouldBypass(URI uri)
{
String host = uri.getHost();
if (host==null)
return true;
-
+
List<String> hosts = getProxyBypassHosts();
if (hosts.contains(host))
return true;
@@ -87,14 +87,14 @@ public class ProxyUtil {
return true;
return false;
}
-
+
public static List<String> getProxyBypassHosts()
{
List<String> hosts = new ArrayList<String>();
if (!isAuthConnSupported())
return hosts;
-
+
IProxyService service = ProxyManager.getProxyManager();
String manuals[] = service.getNonProxiedHosts();
String natives[] = null;
@@ -108,7 +108,7 @@ public class ProxyUtil {
hosts.add(natives[n]);
return hosts;
}
-
+
public static URLConnection getConnection(URL url) throws IOException
{
IProxyData data = getProxy(url);
@@ -124,24 +124,24 @@ public class ProxyUtil {
return url.openConnection(proxy);
}
-
+
public static InputStream getStream(URL url) throws IOException
{
return getConnection(url).getInputStream();
}
-
- private static class ProxyAuthenticator extends Authenticator {
-
- private String user, password;
-
- public ProxyAuthenticator(String user, String password) {
- this.user = user;
- this.password = password;
- }
-
- protected PasswordAuthentication getPasswordAuthentication() {
- return new PasswordAuthentication(user, password.toCharArray());
- }
- }
+
+ private static class ProxyAuthenticator extends Authenticator {
+
+ private String user, password;
+
+ public ProxyAuthenticator(String user, String password) {
+ this.user = user;
+ this.password = password;
+ }
+
+ protected PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication(user, password.toCharArray());
+ }
+ }
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/TestConnectionUtility.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/TestConnectionUtility.java
index ac84dcbc8..57bbf2b67 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/TestConnectionUtility.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/TestConnectionUtility.java
@@ -4,11 +4,11 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-
+
package org.eclipse.help.internal.base.util;
import java.io.BufferedReader;
@@ -27,9 +27,9 @@ public class TestConnectionUtility {
private static final String PATH_TOC = "/toc"; //$NON-NLS-1$
private static final String PROTOCOL = "http"; //$NON-NLS-1$
private static final String PROTOCOL_HTTPS = "https"; //$NON-NLS-1$
-
+
private final static int SOCKET_TIMEOUT = 5000; //milliseconds
-
+
public static boolean testConnection(String thisHost, String thisPort,
String thisPath, String thisProtocol) {
@@ -60,7 +60,7 @@ public class TestConnectionUtility {
}
return validConnection;
}
-
+
private static boolean isValidToc(URL url)
{
InputStream in = null;
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 3fc1fd725..d80e8f8e6 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
@@ -173,7 +173,7 @@ public class BrowserManager {
});
}
// initialize current browser
- String curBrowserID =
+ String curBrowserID =
Platform.getPreferencesService().getString(HelpBasePlugin.PLUGIN_ID, DEFAULT_BROWSER_ID_KEY, null, null);
if (curBrowserID != null && (!"".equals(curBrowserID))) { //$NON-NLS-1$
setCurrentBrowserID(curBrowserID);
@@ -182,7 +182,7 @@ public class BrowserManager {
if (currentBrowserDesc == null) {
setCurrentBrowserID(getDefaultBrowserID());
}
- setAlwaysUseExternal(
+ setAlwaysUseExternal(
Platform.getPreferencesService().getBoolean(HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_ALWAYS_EXTERNAL_BROWSER, false, null));
}
@@ -248,7 +248,7 @@ public class BrowserManager {
/**
* Gets the currentBrowserID.
- *
+ *
* @return Returns a String or null if not set
*/
public String getCurrentBrowserID() {
@@ -262,7 +262,7 @@ public class BrowserManager {
/**
* Gets the currentBrowserID.
- *
+ *
* @return Returns a String or null if not set
*/
public String getCurrentInternalBrowserID() {
@@ -277,7 +277,7 @@ public class BrowserManager {
/**
* Gets the currentBrowserID.
- *
+ *
* @return Returns a String or null if not set
*/
public String getDefaultBrowserID() {
@@ -292,7 +292,7 @@ public class BrowserManager {
/**
* Sets the currentBrowserID. If browser of given ID does not exists, the
* method does nothing
- *
+ *
* @param currentAdapterID
* The ID of the adapter to to set as current
*/
@@ -311,7 +311,7 @@ public class BrowserManager {
/**
* Sets the defaultBrowserID. If browser of given ID does not exists, the
* method does nothing
- *
+ *
* @param defaultAdapterID
* The ID of the adapter to to set as default
*/
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 954899a9d..26365446d 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
@@ -20,7 +20,7 @@ import org.eclipse.osgi.service.environment.*;
import org.eclipse.osgi.util.NLS;
/**
- *
+ *
*/
public class CustomBrowser implements IBrowser {
public static final String CUSTOM_BROWSER_PATH_KEY = "custom_browser_path"; //$NON-NLS-1$
@@ -95,7 +95,7 @@ public class CustomBrowser implements IBrowser {
/**
* Creates the final command to launch.
- *
+ *
* @param path
* @param url
* @return String[]
@@ -152,11 +152,11 @@ public class CustomBrowser implements IBrowser {
tokenList.toArray(command);
return command;
}
-
+
/**
* Replaces any occurrences of <code>"%1"</code> or <code>%1</code> with
* the URL.
- *
+ *
* @param token
* The token in which the substitutions should be made; must not
* be <code>null</code>.
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 98b07107a..86947ecb8 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
@@ -49,7 +49,7 @@ public class MozillaBrowserAdapter implements IBrowser {
/**
* Constructor
- *
+ *
* @executable executable filename to launch
* @executableName name of the program to display when error occurs
*/
@@ -195,7 +195,7 @@ public class MozillaBrowserAdapter implements IBrowser {
/**
* On some OSes 0 is always returned by netscape -remote. It is
* necessary to examine ouput to find out failure
- *
+ *
* @param outputs
* @param errors
* @return @throws
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/browser/MozillaFactory.java b/org.eclipse.help.base/src/org/eclipse/help/internal/browser/MozillaFactory.java
index 672c23976..d0d9c6658 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/browser/MozillaFactory.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/browser/MozillaFactory.java
@@ -62,7 +62,7 @@ public class MozillaFactory implements IBrowserFactory, IExecutableExtension {
/**
* On some OSes 0 is always returned by "which" command it is necessary to
* examine ouput to find out failure.
- *
+ *
* @param outputs
* @param errors
* @return @throws
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLConnection.java b/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLConnection.java
index 00a7abe04..62caddf50 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLConnection.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLConnection.java
@@ -50,9 +50,9 @@ public class HelpURLConnection extends URLConnection {
public final static String PLUGINS_ROOT = "PLUGINS_ROOT/"; //$NON-NLS-1$
private final static String PATH_RTOPIC = "/rtopic"; //$NON-NLS-1$
private static final String PROTOCOL_HTTP = "http://"; //$NON-NLS-1$
-
+
private static Hashtable<String, String[]> templates = new Hashtable<String, String[]>();
-
+
// document caching - disabled if running in dev mode
protected static boolean cachingEnabled = true;
static {
@@ -81,7 +81,7 @@ public class HelpURLConnection extends URLConnection {
public HelpURLConnection(URL url) {
this(url, false);
}
-
+
public HelpURLConnection(URL url, boolean localOnly) {
super(url);
this.localOnly = localOnly;
@@ -128,19 +128,19 @@ public class HelpURLConnection extends URLConnection {
throw new IOException("Resource not found."); //$NON-NLS-1$
}
- int helpOption=localOnly ? PreferenceFileHandler.LOCAL_HELP_ONLY
+ int helpOption=localOnly ? PreferenceFileHandler.LOCAL_HELP_ONLY
: PreferenceFileHandler.getEmbeddedHelpOption();
InputStream in = null;
if (plugin != null && (helpOption==PreferenceFileHandler.LOCAL_HELP_ONLY || helpOption==PreferenceFileHandler.LOCAL_HELP_PRIORITY)) {
in = getLocalHelp(plugin);
- }
- if (in == null && (helpOption==PreferenceFileHandler.LOCAL_HELP_PRIORITY || helpOption==PreferenceFileHandler.REMOTE_HELP_PRIORITY)) {
-
+ }
+ if (in == null && (helpOption==PreferenceFileHandler.LOCAL_HELP_PRIORITY || helpOption==PreferenceFileHandler.REMOTE_HELP_PRIORITY)) {
+
in = openFromRemoteServer(getHref(), getLocale());
if( in != null ){
in = new RemoteHelpInputStream(in);
}
- if(in==null && plugin!=null && helpOption==PreferenceFileHandler.REMOTE_HELP_PRIORITY)
+ if(in==null && plugin!=null && helpOption==PreferenceFileHandler.REMOTE_HELP_PRIORITY)
{
in = getLocalHelp(plugin);
}
@@ -232,7 +232,7 @@ public class HelpURLConnection extends URLConnection {
}
/**
- *
+ *
*/
public Vector getMultiValue(String name) {
if (arguments != null) {
@@ -245,7 +245,7 @@ public class HelpURLConnection extends URLConnection {
}
/**
- *
+ *
*/
public String getValue(String name) {
if (arguments == null)
@@ -329,7 +329,7 @@ public class HelpURLConnection extends URLConnection {
/**
* Obtains ID of plugin that contributes appserver implementation. *
- *
+ *
* @return plug-in ID or null
*/
private static String getAppserverImplPluginId() {
@@ -391,7 +391,7 @@ public class HelpURLConnection extends URLConnection {
InputStream in;
if (remoteURL == null) {
in = tryOpeningAllServers(pathSuffix);
- } else {
+ } else {
in = openRemoteStream(remoteURL, pathSuffix);
}
@@ -399,13 +399,13 @@ public class HelpURLConnection extends URLConnection {
}
return null;
}
-
+
private InputStream getUnverifiedStream(String remoteURL,String pathSuffix)
{
URL url;
InputStream in = null;
try {
-
+
if(remoteURL.startsWith(PROTOCOL_HTTP))
{
url = new URL(remoteURL + pathSuffix);
@@ -417,16 +417,16 @@ public class HelpURLConnection extends URLConnection {
url = HttpsUtility.getHttpsURL(remoteURL + pathSuffix);
in = HttpsUtility.getHttpsStream(url);
}
-
+
} catch (Exception e) {
// File not found on this server
}
return in;
}
-
+
private InputStream openRemoteStream(String remoteURL, String pathSuffix) {
- InputStream in = getUnverifiedStream(remoteURL,pathSuffix);
+ InputStream in = getUnverifiedStream(remoteURL,pathSuffix);
String errPage[] = templates.get(remoteURL);
if (errPage==null)
@@ -444,13 +444,13 @@ public class HelpURLConnection extends URLConnection {
}
}
-
+
// No error page, InfoCenter is at least 3.6, so it is
// returning null already.
if (errPage.length==0)
return in;
-
- // Check to see if the URL is the error page for the
+
+ // Check to see if the URL is the error page for the
// remote IC. If so, return null.
if (compare(errPage,getUnverifiedStream(remoteURL,pathSuffix)))
{
@@ -461,7 +461,7 @@ public class HelpURLConnection extends URLConnection {
}
return in;
}
-
+
private boolean compare(String lines[],InputStream in)
{
try{
@@ -470,12 +470,12 @@ public class HelpURLConnection extends URLConnection {
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String line;
int count = 0;
-
+
while ((line = br.readLine())!=null)
{
if (count>lines.length)
return false;
-
+
if (!lines[count].equals(line))
return false;
count++;
@@ -488,14 +488,14 @@ public class HelpURLConnection extends URLConnection {
{}
return false;
}
-
+
private String getPageText(InputStream in) {
try{
if (in!=null)
{
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String line,result=""; //$NON-NLS-1$
-
+
while ((line = br.readLine())!=null)
{
result+=line+'\n';
@@ -505,7 +505,7 @@ public class HelpURLConnection extends URLConnection {
return result;
}
}catch(Exception ex){}
-
+
return null;
}
@@ -520,7 +520,7 @@ public class HelpURLConnection extends URLConnection {
int numICs = host.length;
for (int i = 0; i < numICs; i++) {
- if (isEnabled[i].equalsIgnoreCase("true")) { //$NON-NLS-1$
+ if (isEnabled[i].equalsIgnoreCase("true")) { //$NON-NLS-1$
String urlStr = protocol[i]+"://" + host[i] + ':' + port[i] + path[i]; //$NON-NLS-1$
InputStream is = openRemoteStream(urlStr, pathSuffix);
if (is != null) {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLStreamHandler.java b/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLStreamHandler.java
index 4a7394ad5..378b0ec43 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLStreamHandler.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLStreamHandler.java
@@ -31,7 +31,7 @@ public class HelpURLStreamHandler extends URLStreamHandler {
}
return null;
}
-
+
public static URLStreamHandler getDefault() {
if (instance == null) {
instance = new HelpURLStreamHandler();
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 a0b116958..36124dc93 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
@@ -3,7 +3,7 @@
* accompanying materials are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors: IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.help.internal.search;
@@ -55,7 +55,7 @@ public class AnalyzerDescriptor {
/**
* Gets the analyzer.
- *
+ *
* @return Returns a Analyzer
*/
public Analyzer getAnalyzer() {
@@ -64,7 +64,7 @@ public class AnalyzerDescriptor {
/**
* Gets the id.
- *
+ *
* @return Returns a String
*/
public String getId() {
@@ -73,7 +73,7 @@ public class AnalyzerDescriptor {
/**
* Gets the language for the analyzer
- *
+ *
* @return Returns a String
*/
public String getLang() {
@@ -88,7 +88,7 @@ public class AnalyzerDescriptor {
* Creates analyzer for a locale, if it is configured in the
* org.eclipse.help.luceneAnalyzer extension point. The identifier of the
* analyzer and locale and lang are also set.
- *
+ *
* @return Analyzer or null if no analyzer is configured for given locale.
*/
private Analyzer createAnalyzer(String locale) {
@@ -138,7 +138,7 @@ public class AnalyzerDescriptor {
* Checks whether analyzer is compatible with a given analyzer. The ID has
* the form [plugin_id]#[plugin_version]?locale=[locale], for example:
* org.eclipse.help.base#3.1.0?locale=ru
- *
+ *
* @param analyzerId
* id of analyzer used in the past by the index; id has a form:
* [plugin.id]#[version]?locale=[locale]
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/AnalyzerFactory.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/AnalyzerFactory.java
index 69609ee2a..4ea3b217f 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/AnalyzerFactory.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/AnalyzerFactory.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -53,7 +53,7 @@ public class AnalyzerFactory implements IExecutableExtension{
return new RussianAnalyzer(version);
//unknown language
return null;
-
+
}
public void setInitializationData(IConfigurationElement config, String propertyName, Object data)
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java
index 4e6786cd1..13157cf9f 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/Analyzer_en.java
@@ -31,9 +31,9 @@ public final class Analyzer_en extends Analyzer {
public final TokenStream tokenStream(String fieldName, Reader reader) {
return new PorterStemFilter(new StopFilter(false, new LowerCaseAndDigitsTokenizer(reader), getStopWords(), false));
}
-
+
private Set<String> stopWords;
-
+
private Set<String> getStopWords() {
if ( stopWords == null ) {
stopWords = new HashSet<String>();
@@ -43,7 +43,7 @@ public final class Analyzer_en extends Analyzer {
}
return stopWords;
}
-
+
/**
* Array of English stop words. Differs from StandardAnalyzer's default stop
* words by not having "for", "if", and "this" that are java keywords.
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 50258d2b8..b176e9de3 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
@@ -3,7 +3,7 @@
* accompanying materials are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors: IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.help.internal.search;
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/HTMLDocParser.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/HTMLDocParser.java
index 9e42fa5cc..857a70c3a 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/HTMLDocParser.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/HTMLDocParser.java
@@ -114,7 +114,7 @@ public class HTMLDocParser {
return ""; //$NON-NLS-1$
}
}
-
+
public Reader getContentReader() throws IOException {
if (htmlParser == null) {
throw new NullPointerException();
@@ -125,7 +125,7 @@ public class HTMLDocParser {
* Private. Parses HTML to extract document encoding specified in HTTP
* equivalent META tag in the document header. Example of such META tag is
* <META HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
- *
+ *
* @return String or null if encoding not found
*/
public static String getCharsetFromHTML(InputStream is) {
@@ -345,7 +345,7 @@ public class HTMLDocParser {
* Parses HTTP1.1 Content-Type entity-header field for example,
* Content-Type: text/html; charset=ISO-8859-4, and extracts charset
* parameter value of the media sub type.
- *
+ *
* @return value of charset parameter, for example ISO-8859-4 or null if
* parameter does not exist
*/
@@ -363,7 +363,7 @@ public class HTMLDocParser {
}
return null;
}
-
+
public Exception getException() {
if (htmlParser != null) {
return htmlParser.getException();
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/HTMLSearchParticipant.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/HTMLSearchParticipant.java
index a855870bd..34c3d69a5 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/HTMLSearchParticipant.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/HTMLSearchParticipant.java
@@ -45,14 +45,14 @@ public class HTMLSearchParticipant extends SearchParticipant {
// if it's XHTML, forward it on to the proper search participant
if (isXHTML(pluginId, url)) {
LocalSearchManager manager = BaseHelpSystem.getLocalSearchManager();
- SearchParticipant participant = manager.getParticipant(HELP_BASE_XHTML);
+ SearchParticipant participant = manager.getParticipant(HELP_BASE_XHTML);
if (participant == null) {
participant = getXhtmlParticipant();
}
return participant.addDocument((IHelpSearchIndex) index, pluginId, name, url, id, doc);
}
// otherwise, treat it as HTML
- else {
+ else {
try {
try {
try {
@@ -63,10 +63,10 @@ public class HTMLSearchParticipant extends SearchParticipant {
+ name + " cannot be opened.", //$NON-NLS-1$
null);
}
- doc.addContents(parser.getContentReader(), parser.getContentReader());
+ doc.addContents(parser.getContentReader(), parser.getContentReader());
String title = parser.getTitle();
doc.setTitle(title);
- doc.setSummary(parser.getSummary(title));
+ doc.setSummary(parser.getSummary(title));
if (parser.getException() != null) {
return new Status(IStatus.ERROR, HelpBasePlugin.PLUGIN_ID, IStatus.ERROR,
"Parse error occurred while adding document " + name //$NON-NLS-1$
@@ -85,7 +85,7 @@ public class HTMLSearchParticipant extends SearchParticipant {
return Status.OK_STATUS;
}
}
-
+
private SearchParticipant getXhtmlParticipant() {
if (xhtmlParticipant == null) {
xhtmlParticipant = new XHTMLSearchParticipant();
@@ -95,7 +95,7 @@ public class HTMLSearchParticipant extends SearchParticipant {
/**
* Returns whether or not the given content should be treated as XHTML.
- *
+ *
* @param pluginId the plugin id containing the content
* @param url the URL to the content
* @return whether the content should be treated as XHTML
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchHitCollector.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchHitCollector.java
index b18209db4..106b6a2b1 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchHitCollector.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchHitCollector.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -16,14 +16,14 @@ import java.util.List;
* Search hit collector. The search engine adds hits to it.
*/
public interface ISearchHitCollector {
-
+
/**
* Adds hits to the result.
- *
+ *
* @param hits the List of raw hits
*/
public void addHits(List<SearchHit> hits, String wordsSearched);
-
+
/**
* An exception occurred in the search. Implementing subclasses should either
* rethrow the exception or save a local copy and test for it later.
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 f524df818..457b27764 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
@@ -47,17 +47,17 @@ import org.eclipse.help.search.SearchParticipant;
* returned by its getIndexUpdateOperation() method.
*/
class IndexingOperation {
-
+
private static final String ELEMENT_NAME_INDEX = "index"; //$NON-NLS-1$
private static final String ATTRIBUTE_NAME_PATH = "path"; //$NON-NLS-1$
-
+
private int numAdded;
private int numRemoved;
private SearchIndex index = null;
/**
* Construct indexing operation.
- *
+ *
* @param ix
* ISearchIndex already opened
*/
@@ -73,7 +73,7 @@ class IndexingOperation {
/**
* Executes indexing, given the progress monitor.
- *
+ *
* @param pm
* progres monitor to be used during this long operation for
* reporting progress
@@ -392,7 +392,7 @@ class IndexingOperation {
HelpBasePlugin.logError("Failed to retrieve documents from one of the help search participants: " + participants[j].getClass().getName() + "; skipping this one.", t); //$NON-NLS-1$ //$NON-NLS-2$
continue;
}
-
+
for (Iterator<String> docs = set.iterator(); docs.hasNext();) {
String doc = docs.next();
String id = null;
@@ -415,7 +415,7 @@ class IndexingOperation {
if (url != null) {
addedDocs.add(url);
}
- }
+ }
}
return addedDocs;
}
@@ -424,7 +424,7 @@ class IndexingOperation {
for (Iterator<String> iter = addedContributors.iterator(); iter.hasNext();) {
String id = iter.next();
System.out.println("Updating search index for contributor :" + id); //$NON-NLS-1$
- }
+ }
}
/**
@@ -466,7 +466,7 @@ class IndexingOperation {
for (int i = 0; i < subtopics.length; i++)
add(subtopics[i], hrefs);
}
-
+
private void add(String href, Set<String> hrefs) {
if (href != null
&& !href.equals("") && !href.startsWith("http://") && !href.startsWith("https://")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -499,17 +499,17 @@ class IndexingOperation {
/**
* Obtains PluginIndexes pointing to prebuilt indexes
- *
+ *
* @param pluginIds
* @param locale
* @return
*/
private PrebuiltIndexes getIndexesToAdd(Collection<String> pluginIds) {
PrebuiltIndexes indexes = new PrebuiltIndexes(index);
-
+
IExtensionRegistry registry = Platform.getExtensionRegistry();
IConfigurationElement[] elements = registry.getConfigurationElementsFor(TocFileProvider.EXTENSION_POINT_ID_TOC);
-
+
for (int i=0;i<elements.length;++i) {
IConfigurationElement elem = elements[i];
try {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/InfoCenter.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/InfoCenter.java
index 072248517..b312b9f63 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/InfoCenter.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/InfoCenter.java
@@ -33,16 +33,16 @@ import org.xml.sax.*;
* by running a query on the remote InfoCenter and presenting the results
* locally. Instances of this engine type are required to supply the URL to the
* InfoCenter.
- *
+ *
* <p>
* This class is made public in order to be instantiated and parametrized
* directly in the extentsions. Clients are required to supply the required URL
* as a parameter <code>url</code>.
- *
+ *
* <p>
* This class is not expected to be subclassed or otherwise accessed
* programmatically.
- *
+ *
* @since 3.1
*/
@@ -131,7 +131,7 @@ public final class InfoCenter implements ISearchEngine {
return url + "topic" + href; //$NON-NLS-1$
}
if (url.indexOf('?')> 0) {
- return url + "topic" + href + "&noframes=true"; //$NON-NLS-1$ //$NON-NLS-2$
+ return url + "topic" + href + "&noframes=true"; //$NON-NLS-1$ //$NON-NLS-2$
}
return url + "topic" + href + "?noframes=true"; //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -146,7 +146,7 @@ public final class InfoCenter implements ISearchEngine {
/*
* (non-Javadoc)
- *
+ *
* @see ISearchEngine#run(String, ISearchScope,
* ISearchEngineResultCollector, IProgressMonitor)
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/LimitedSizeCharArrayWriter.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/LimitedSizeCharArrayWriter.java
index b65c139f3..c2e6a5db3 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/LimitedSizeCharArrayWriter.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/LimitedSizeCharArrayWriter.java
@@ -15,7 +15,7 @@ import java.io.CharArrayWriter;
import java.io.IOException;
public class LimitedSizeCharArrayWriter extends CharArrayWriter {
-
+
private long maxSize;
private long size = 0;
@@ -23,33 +23,33 @@ public class LimitedSizeCharArrayWriter extends CharArrayWriter {
super();
this.maxSize = maxSize;
}
-
+
public void write(char[] c, int off, int len) {
size += len;
super.write(c, off, len);
}
-
+
public void write(char[] cbuf) throws IOException {
size += cbuf.length;
if (size < maxSize) {
super.write(cbuf);
}
}
-
+
public void write(String str, int off, int len) {
size += len;
if (size < maxSize) {
super.write(str, off, len);
}
}
-
+
public void write(int c) {
size += 1;
if (size < maxSize) {
super.write(c);
}
}
-
+
public void write(String str) throws IOException {
size += str.length();
if (size < maxSize) {
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 d5578e7bb..e928591fb 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
@@ -142,18 +142,18 @@ public class LocalSearchManager {
* Converts the given TopDocs object into a List of raw SearchHits.
* Hits objects are immutable and can't be instantiated from outside
* Lucene.
- * @param searcher
- *
+ * @param searcher
+ *
* @param hits the TopDocs object to convert
* @return a List of raw SearchHits
*/
public static List<SearchHit> asList(TopDocs topDocs, IndexSearcher searcher) {
List<SearchHit> list = new ArrayList<SearchHit>(topDocs.scoreDocs.length);
-
+
for (int i=0; i<topDocs.scoreDocs.length; ++i) {
try {
- Document doc = searcher.doc(topDocs.scoreDocs[i].doc);
+ Document doc = searcher.doc(topDocs.scoreDocs[i].doc);
float score = topDocs.scoreDocs[i].score;
String href = doc.get("name"); //$NON-NLS-1$
String summary = doc.get("summary"); //$NON-NLS-1$
@@ -170,7 +170,7 @@ public class LocalSearchManager {
}
return list;
}
-
+
/**
* Public for use by indexing tool
*/
@@ -188,7 +188,7 @@ public class LocalSearchManager {
/**
* Obtains AnalyzerDescriptor that indexing and search should use for a given locale.
- *
+ *
* @param locale
* 2 or 5 character locale representation
*/
@@ -231,12 +231,12 @@ public class LocalSearchManager {
}
return false;
}
-
+
/**
* Returns whether or not a participant with the given headless attribute should be
* enabled in the current mode. Participants that support headless are always enabled, and
* those that don't are only enabled when in workbench mode.
- *
+ *
* @param headless whether or not the participant supports headless mode
* @return whether or not the participant should be enabled
*/
@@ -295,7 +295,7 @@ public class LocalSearchManager {
/**
* Returns the lucene search participant with the given id, or null if it could not
* be found.
- *
+ *
* @param participantId the participant's unique id
* @return the participant with the given id
*/
@@ -306,10 +306,10 @@ public class LocalSearchManager {
}
return null;
}
-
+
/**
* Returns a TOC file participant for the provided plug-in and file name.
- *
+ *
* @param pluginId
* @param fileName
* @return The matching participant, or <code>null</code>
@@ -331,7 +331,7 @@ public class LocalSearchManager {
/**
* Returns whether or not the given search participant is bound to the given
* plugin.
- *
+ *
* @param pluginId the id of the plugin
* @param participantId the id of the search participant
* @return whether or not the participant is bound to the plugin
@@ -349,10 +349,10 @@ public class LocalSearchManager {
}
return false;
}
-
+
/**
* Returns a set of plug-in Ids that have search participants or bindings.
- *
+ *
* @return a set of plug-in Ids
*/
@@ -385,7 +385,7 @@ public class LocalSearchManager {
set.add(element.getContributor().getName());
}
}
-
+
/**
* Loops through all the loaded search participants and notifies them that they can drop the
* cached data to reduce runtime memory footprint.
@@ -434,7 +434,7 @@ public class LocalSearchManager {
continue;
if (list == null)
list = new ArrayList<ParticipantDescriptor>();
- ParticipantDescriptor desc = new ParticipantDescriptor(element);
+ ParticipantDescriptor desc = new ParticipantDescriptor(element);
list.add(desc);
searchParticipantsById.put(desc.getId(), desc);
}
@@ -446,7 +446,7 @@ public class LocalSearchManager {
/**
* Locates the
- *
+ *
* @param list
* @param binding
* @return
@@ -489,7 +489,7 @@ public class LocalSearchManager {
/**
* Returns an array of search participants with the global scope (no extensions).
- *
+ *
* @return an array of the global search participants.
*/
@@ -511,7 +511,7 @@ public class LocalSearchManager {
globalSearchParticipants = new ArrayList<ParticipantDescriptor>();
addSearchParticipants();
}
-
+
private void addSearchParticipants() {
IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(
SEARCH_PARTICIPANT_XP_FULLNAME);
@@ -549,10 +549,10 @@ public class LocalSearchManager {
index.search(searchQuery, collector);
}
}
-
+
/**
* Updates index. Checks if all contributions were indexed. If not, it indexes them.
- *
+ *
* @throws OperationCanceledException
* if indexing was cancelled
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchDocument.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchDocument.java
index d5362c070..60a545db4 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchDocument.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchDocument.java
@@ -19,11 +19,11 @@ import org.apache.lucene.document.Field;
import org.eclipse.help.search.ISearchDocument;
/**
- * Class which adapts a Lucene Document to ISearchDocument.
+ * Class which adapts a Lucene Document to ISearchDocument.
*/
public class LuceneSearchDocument implements ISearchDocument {
-
+
private Document doc;
public LuceneSearchDocument(Document document) {
@@ -37,18 +37,18 @@ public class LuceneSearchDocument implements ISearchDocument {
}
public void setSummary(String summary) {
- doc.add(new Field("summary", summary, Field.Store.YES, Field.Index.NO)); //$NON-NLS-1$
+ doc.add(new Field("summary", summary, Field.Store.YES, Field.Index.NO)); //$NON-NLS-1$
}
public void addContents(String contents) {
doc.add(new Field("contents", new StringReader(contents))); //$NON-NLS-1$
- doc.add(new Field("exact_contents", new StringReader(contents))); //$NON-NLS-1$
+ doc.add(new Field("exact_contents", new StringReader(contents))); //$NON-NLS-1$
}
public void setHasFilters(boolean hasFilters) {
- doc.add(new Field("filters", Boolean.toString(hasFilters), Field.Store.YES, Field.Index.NO)); //$NON-NLS-1$
+ doc.add(new Field("filters", Boolean.toString(hasFilters), Field.Store.YES, Field.Index.NO)); //$NON-NLS-1$
}
-
+
public Document getDocument() {
return doc;
}
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 9466a90e1..ca9cd6763 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
@@ -177,7 +177,7 @@ public class PluginIndex {
/**
* Creates id of prebuilt index
- *
+ *
* @param prefix
* index directory prefix, e.g. "", "ws/gtk"
* @return indexId string, e.g. "/", "/ws/gtk"
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginVersionInfo.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginVersionInfo.java
index b0f0b3fe0..6f7e95de2 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginVersionInfo.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/PluginVersionInfo.java
@@ -49,7 +49,7 @@ public class PluginVersionInfo extends HelpProperties {
/**
* Creates table of current contributing plugins and their fragments with
* versions.
- *
+ *
* @param name
* the name of the file to serialize the data to
* @param docBundleIds
@@ -108,7 +108,7 @@ public class PluginVersionInfo extends HelpProperties {
/**
* Detects changes in contributions or their version since last time the
* contribution table was saved.
- *
+ *
* @return true if contributions have changed
*/
public boolean detectChange() {
@@ -142,7 +142,7 @@ public class PluginVersionInfo extends HelpProperties {
if (!this.containsKey(oneContr)) {
// plugin has been removed
removed.add(oneContr);
- }
+ }
}
hasChanged = added.size() > 0 || removed.size() > 0;
doComparison = false;
@@ -172,7 +172,7 @@ public class PluginVersionInfo extends HelpProperties {
/**
* Saves contributions to a file. After this method is called, calls to
* detectChange() will return false.
- *
+ *
* @return true if operation was successful
*/
public boolean save() {
@@ -191,7 +191,7 @@ public class PluginVersionInfo extends HelpProperties {
* Compares plugins and versions represented as a string for equality String
* have form id1\nverison1\nid2\nversion2 String are equal of they contain
* the same set of IDs and their corresponding version equal
- *
+ *
* @return true if plugins and versions match
*/
private boolean compare(String versions, String oldVersions) {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/PrebuiltIndexes.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/PrebuiltIndexes.java
index 531266825..674bc6791 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/PrebuiltIndexes.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/PrebuiltIndexes.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -17,7 +17,7 @@ import java.util.Set;
/**
* Plugins with prebuilt search indexes.
- *
+ *
*/
public class PrebuiltIndexes {
private SearchIndex targetIndex;
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/ProgressDistributor.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/ProgressDistributor.java
index cb32876e3..8db0f2e10 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/ProgressDistributor.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/ProgressDistributor.java
@@ -112,7 +112,7 @@ public class ProgressDistributor implements IProgressMonitor {
public synchronized void worked(int work) {
internalWorked(work);
}
-
+
public synchronized void addMonitor(IProgressMonitor m) {
if (totalWork > -1)
m.beginTask(taskName, totalWork);
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java
index 00c2799a3..9cc690e19 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryBuilder.java
@@ -81,7 +81,7 @@ public class QueryBuilder {
searchWords = searchWords + "\""; //$NON-NLS-1$
withinQuotation = !withinQuotation;
}
-
+
StringTokenizer qTokenizer = new StringTokenizer(searchWords,"\"",true); //$NON-NLS-1$
int orCount = 0; // keep track of number of ORs to disallow too many
while (qTokenizer.hasMoreTokens()) {
@@ -237,14 +237,14 @@ public class QueryBuilder {
}
/**
* Get a list of tokens corresponding to a search word or phrase
- *
+ *
* @return List of String
*/
private List<String> analyzeText(Analyzer analyzer, String fieldName, String text) {
List<String> words = new ArrayList<String>(1);
Reader reader = new StringReader(text);
TokenStream tStream = analyzer.tokenStream(fieldName, reader);
-
+
CharTermAttribute termAttribute = (CharTermAttribute) tStream.getAttribute(CharTermAttribute.class);
try {
while (tStream.incrementToken()) {
@@ -254,12 +254,12 @@ public class QueryBuilder {
reader.close();
} catch (IOException ioe) {
}
-
+
return words;
}
/**
* Obtains Lucene Query from tokens
- *
+ *
* @return Query or null if no query could be created
*/
private Query createLuceneQuery(List<QueryWordsToken> searchTokens, String[] fieldNames,
@@ -278,7 +278,7 @@ public class QueryBuilder {
}
/**
* Obtains Lucene queries for token sequences separated at OR.
- *
+ *
* @return List of Query (could be empty)
*/
private List<Query> getRequiredQueries(List<QueryWordsToken> tokens, String[] fieldNames,
@@ -313,7 +313,7 @@ public class QueryBuilder {
}
/**
* Obtains Lucene Query for tokens containing only AND and NOT operators.
- *
+ *
* @return BooleanQuery or null if no query could be created from the tokens
*/
private Query getRequiredQuery(List<QueryWordsToken> requiredTokens, String[] fieldNames,
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchHit.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchHit.java
index 3990c8664..dc3f88049 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchHit.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchHit.java
@@ -3,7 +3,7 @@
* accompanying materials are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors: IBM Corporation - initial API and implementation
**************************************************************************************************/
package org.eclipse.help.internal.search;
@@ -31,7 +31,7 @@ public class SearchHit implements ISearchEngineResult2, Comparable<SearchHit> {
/**
* Constructs a new SearchHit.
- *
+ *
* @param href the href to the document
* @param label a label describing the hit
* @param summary a summary paragraph further describing the hit
@@ -52,7 +52,7 @@ public class SearchHit implements ISearchEngineResult2, Comparable<SearchHit> {
this.participantId = participantId;
this.isPotentialHit = isPotentialHit;
}
-
+
public int compareTo(SearchHit o) {
if (o == this) {
return 0;
@@ -71,7 +71,7 @@ public class SearchHit implements ISearchEngineResult2, Comparable<SearchHit> {
}
return false;
}
-
+
public String getHref() {
return href;
}
@@ -87,11 +87,11 @@ public class SearchHit implements ISearchEngineResult2, Comparable<SearchHit> {
public IToc getToc() {
return toc;
}
-
+
public int hashCode() {
return href.hashCode();
}
-
+
public void setLabel(String label) {
this.label = label;
}
@@ -99,7 +99,7 @@ public class SearchHit implements ISearchEngineResult2, Comparable<SearchHit> {
public void setHref(String href) {
this.href = href;
}
-
+
public void setPotentialHit(boolean isPotentialHit) {
this.isPotentialHit = isPotentialHit;
}
@@ -141,9 +141,9 @@ public class SearchHit implements ISearchEngineResult2, Comparable<SearchHit> {
public String getId() {
return participantId + "/" + id; //$NON-NLS-1$
}
-
+
public String getRawId() {
- return id;
+ return id;
}
public String getParticipantId() {
@@ -159,7 +159,7 @@ public class SearchHit implements ISearchEngineResult2, Comparable<SearchHit> {
public boolean canOpen() {
return participantId != null;
}
-
+
public boolean isPotentialHit() {
return isPotentialHit;
}
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 9320986a2..a66e73e48 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
@@ -80,7 +80,7 @@ public class SearchIndex implements IHelpSearchIndex {
private IndexWriter iw;
private File indexDir;
-
+
private Directory luceneDirectory;
private String locale;
@@ -132,7 +132,7 @@ public class SearchIndex implements IHelpSearchIndex {
/**
* Constructor.
- *
+ *
* @param locale
* the locale this index uses
* @param analyzerDesc
@@ -145,7 +145,7 @@ public class SearchIndex implements IHelpSearchIndex {
/**
* Alternative constructor that provides index directory.
- *
+ *
* @param indexDir
* @param locale
* @param analyzerDesc
@@ -159,7 +159,7 @@ public class SearchIndex implements IHelpSearchIndex {
this.analyzerDescriptor = analyzerDesc;
this.tocManager = tocManager;
this.indexDir = indexDir;
-
+
this.relativePath = relativePath;
// System.out.println("Index for a relative path: "+relativePath);
inconsistencyFile = new File(indexDir.getParentFile(), locale + ".inconsistent"); //$NON-NLS-1$
@@ -188,7 +188,7 @@ public class SearchIndex implements IHelpSearchIndex {
/**
* Indexes one document from a stream. Index has to be open and close outside of this method
- *
+ *
* @param name
* the document identifier (could be a URL)
* @param url
@@ -252,12 +252,12 @@ public class SearchIndex implements IHelpSearchIndex {
/**
* Add any extra fields that need to be added to this document. Subclasses
* should override to add more fields.
- *
+ *
* @param doc the document to add fields to
*/
protected void addExtraFields(Document doc) {
}
-
+
/**
* Starts additions. To be called before adding documents.
*/
@@ -324,7 +324,7 @@ public class SearchIndex implements IHelpSearchIndex {
/**
* Deletes a single document from the index.
- *
+ *
* @param name -
* document name
* @return IStatus
@@ -364,7 +364,7 @@ public class SearchIndex implements IHelpSearchIndex {
indexedDocs = null;
setInconsistent(false);
}
-
+
/*
* The searcher's index reader has it's stuff in memory so it won't
* know about this change. Close it so that it gets reloaded next search.
@@ -396,7 +396,7 @@ public class SearchIndex implements IHelpSearchIndex {
indexedDocs = null;
getDocPlugins().save();
saveDependencies();
-
+
/*
* The searcher's index reader has it's stuff in memory so it won't
* know about this change. Close it so that it gets reloaded next search.
@@ -438,7 +438,7 @@ public class SearchIndex implements IHelpSearchIndex {
/**
* If
- *
+ *
* @param dirs
* @param monitor
* @return Map. Keys are /pluginid/href of all merged Docs. Values are null for added document,
@@ -555,7 +555,7 @@ public class SearchIndex implements IHelpSearchIndex {
/**
* Removes documents containing term1 and term2
- *
+ *
* @param doc1
* @param docs2
* @throws IOException
@@ -595,7 +595,7 @@ public class SearchIndex implements IHelpSearchIndex {
/**
* Checks if index exists and is usable.
- *
+ *
* @return true if index exists
*/
public boolean exists() {
@@ -626,7 +626,7 @@ public class SearchIndex implements IHelpSearchIndex {
openSearcher();
}
TopDocs topDocs = searcher.search(luceneQuery, null, 1000);
- collector.addHits(LocalSearchManager.asList(topDocs, searcher), highlightTerms);
+ collector.addHits(LocalSearchManager.asList(topDocs, searcher), highlightTerms);
}
} catch (BooleanQuery.TooManyClauses tmc) {
collector.addQTCException(new QueryTooComplexException());
@@ -671,7 +671,7 @@ public class SearchIndex implements IHelpSearchIndex {
/**
* Sets the list of all plug-ns in this session. This method is used for external indexer.
- *
+ *
* @param docPlugins
*/
public void setDocPlugins(PluginVersionInfo docPlugins) {
@@ -680,7 +680,7 @@ public class SearchIndex implements IHelpSearchIndex {
/**
* We use HelpProperties, but a list would suffice. We only need the key values.
- *
+ *
* @return HelpProperties, keys are URLs of indexed documents
*/
public HelpProperties getIndexedDocs() {
@@ -758,7 +758,7 @@ public class SearchIndex implements IHelpSearchIndex {
+ luceneBundle.getHeaders().get(Constants.BUNDLE_VERSION);
getDependencies().put(DEPENDENCIES_KEY_LUCENE, luceneBundleVersion);
} else {
- getDependencies().put(DEPENDENCIES_KEY_LUCENE, ""); //$NON-NLS-1$
+ getDependencies().put(DEPENDENCIES_KEY_LUCENE, ""); //$NON-NLS-1$
}
getDependencies().save();
}
@@ -962,7 +962,7 @@ public class SearchIndex implements IHelpSearchIndex {
// The RandomAccessFile raf cannot be closed yet because closing it will release the
// lock. It will be closed when the lock is released.
lock = l;
- return true;
+ return true;
}
logLockFailure(null);
} catch (IOException ioe) {
@@ -980,10 +980,10 @@ public class SearchIndex implements IHelpSearchIndex {
}
private static boolean errorReported = false;
-
+
private void logLockFailure(IOException ioe) {
if (!errorReported) {
- HelpBasePlugin.logError("Unable to Lock Help Search Index", ioe); //$NON-NLS-1$
+ HelpBasePlugin.logError("Unable to Lock Help Search Index", ioe); //$NON-NLS-1$
errorReported = true;
}
}
@@ -994,7 +994,7 @@ public class SearchIndex implements IHelpSearchIndex {
/**
* Deletes the lock file. The lock must be released prior to this call.
- *
+ *
* @return <code>true</code> if the file has been deleted, <code>false</code> otherwise.
*/
@@ -1016,12 +1016,12 @@ public class SearchIndex implements IHelpSearchIndex {
lock = null;
}
if (raf != null ) {
- try {
+ try {
raf.close();
} catch (IOException ioe) {
}
raf = null;
- }
+ }
}
public static String getIndexableHref(String url) {
@@ -1047,7 +1047,7 @@ public class SearchIndex implements IHelpSearchIndex {
/**
* Checks if document is indexable, and creates a URL to obtain contents.
- *
+ *
* @param locale
* @param url
* specified in the navigation
@@ -1059,7 +1059,7 @@ public class SearchIndex implements IHelpSearchIndex {
/**
* Checks if document is indexable, and creates a URL to obtain contents.
- *
+ *
* @param locale
* @param url
* @param participantId
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 b31802242..7496ce367 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
@@ -39,7 +39,7 @@ public class SearchManager {
private LocalSearchManager localManager = new LocalSearchManager();
private RemoteSearchManager remoteManager = new RemoteSearchManager();
-
+
private class SearchState {
public IProgressMonitor localMonitor;
@@ -79,9 +79,9 @@ public class SearchManager {
* Constructs a new SearchManager.
*/
public SearchManager() {
-
+
}
-
+
/*
* Perform the given search both locally and remotely if configured.
*/
@@ -110,17 +110,17 @@ public class SearchManager {
throws QueryTooComplexException {
SearchState state = new SearchState();
state.searchQuery = searchQuery;
-
+
pm.beginTask("", 100); //$NON-NLS-1$
-
+
// allocate half of the progress bar for each
state.localMonitor = new SubProgressMonitor(pm, 50, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL);
state.remoteMonitor = new SubProgressMonitor(pm, 50, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL);
-
+
// start both searches in parallel
state.localSearchJob.schedule();
state.remoteSearchJob.schedule();
-
+
// wait until finished
try {
state.localSearchJob.join();
@@ -135,7 +135,7 @@ public class SearchManager {
state.bufferedCollector.flush(collector);
pm.done();
}
-
+
/**
* Performs the federated search.
*/
@@ -145,7 +145,7 @@ public class SearchManager {
job.schedule();
}
}
-
+
/*
* Returns the manager responsible for handling local searching.
*/
@@ -166,28 +166,28 @@ public class SearchManager {
public void close() {
localManager.close();
}
-
+
/*
* Gets the list of registered search processors
*/
public static AbstractSearchProcessor[] getSearchProcessors()
{
- IConfigurationElement[] configs =
+ IConfigurationElement[] configs =
Platform.getExtensionRegistry().getConfigurationElementsFor("org.eclipse.help.base.searchProcessor"); //$NON-NLS-1$
-
+
ArrayList<Object> processors = new ArrayList<Object>();
-
+
for (int c=0;c<configs.length;c++)
{
try {
processors.add(
configs[c].createExecutableExtension("class"));//$NON-NLS-1$
- } catch (CoreException e) {}
+ } catch (CoreException e) {}
}
-
+
return processors.toArray(new AbstractSearchProcessor[processors.size()]);
}
-
+
/*
* Convert Lucene SearchHits to ISearchResults
*/
@@ -239,9 +239,9 @@ public class SearchManager {
results[r].isPotentialHit());
}
return hits;
- }
-
-
+ }
+
+
/*
* Buffers hits, and only sends them off to the wrapped collector
* when flush() is called.
@@ -249,7 +249,7 @@ public class SearchManager {
private class BufferedSearchHitCollector implements ISearchHitCollector {
private Set<SearchHit> allHits = new HashSet<SearchHit>();
private String wordsSearched = null;
-
+
/* (non-Javadoc)
* @see org.eclipse.help.internal.search.ISearchHitCollector#addHits(java.util.List, java.lang.String)
*/
@@ -259,7 +259,7 @@ public class SearchManager {
}
allHits.addAll(hits);
}
-
+
/*
* Send all the buffered hits to the underlying collector,
* and reset the buffers.
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 8bff51001..0d37821fe 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,7 @@ import org.eclipse.help.internal.base.HelpBasePlugin;
/**
* Progress monitor for search
- *
+ *
* @since 2.0
*/
public class SearchProgressMonitor implements IProgressMonitor {
@@ -100,7 +100,7 @@ public class SearchProgressMonitor implements IProgressMonitor {
/**
* Gets the isCancelled.
- *
+ *
* @return Returns a boolean
*/
public boolean isCanceled() {
@@ -116,7 +116,7 @@ public class SearchProgressMonitor implements IProgressMonitor {
/**
* Gets the isStarted.
- *
+ *
* @return Returns a boolean
*/
public boolean isStarted() {
@@ -125,7 +125,7 @@ public class SearchProgressMonitor implements IProgressMonitor {
/**
* Gets the isDone.
- *
+ *
* @return Returns a boolean
*/
public boolean isDone() {
@@ -134,7 +134,7 @@ public class SearchProgressMonitor implements IProgressMonitor {
/**
* Sets the isCanceled.
- *
+ *
* @param canceled
* The isCanceled to set
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchQuery.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchQuery.java
index 1121a10a3..2c44e2cfd 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchQuery.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchQuery.java
@@ -35,7 +35,7 @@ public class SearchQuery implements ISearchQuery {
}
/**
* Returns the fieldNames.
- *
+ *
* @return Collection
*/
public Collection<String> getFieldNames() {
@@ -44,7 +44,7 @@ public class SearchQuery implements ISearchQuery {
/**
* Returns the fieldSearch.
- *
+ *
* @return boolean
*/
public boolean isFieldSearch() {
@@ -53,7 +53,7 @@ public class SearchQuery implements ISearchQuery {
/**
* Returns the locale.
- *
+ *
* @return String
*/
public String getLocale() {
@@ -62,7 +62,7 @@ public class SearchQuery implements ISearchQuery {
/**
* Returns the searchWord.
- *
+ *
* @return String
*/
public String getSearchWord() {
@@ -71,7 +71,7 @@ public class SearchQuery implements ISearchQuery {
/**
* Sets the fieldNames.
- *
+ *
* @param fieldNames
* The fieldNames to set
*/
@@ -81,7 +81,7 @@ public class SearchQuery implements ISearchQuery {
/**
* Sets the fieldSearch.
- *
+ *
* @param fieldSearch
* The fieldSearch to set
*/
@@ -91,7 +91,7 @@ public class SearchQuery implements ISearchQuery {
/**
* Sets the locale.
- *
+ *
* @param locale
* The locale to set
*/
@@ -101,7 +101,7 @@ public class SearchQuery implements ISearchQuery {
/**
* Sets the searchWord.
- *
+ *
* @param searchWord
* The searchWord to set
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResult.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResult.java
index cb0127f8c..0ee1b6e8d 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResult.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResult.java
@@ -28,19 +28,19 @@ public class SearchResult implements ISearchResult{
private float score;
private IToc toc;
private boolean isPotentialHit;
-
+
public String getHref() {
return href;
}
-
+
public void setHref(String href) {
this.href = href;
}
-
+
public String getId() {
return id;
}
-
+
public void setId(String id) {
this.id = id;
}
@@ -48,7 +48,7 @@ public class SearchResult implements ISearchResult{
public String getDescription() {
return description;
}
-
+
public void setDescription(String description) {
this.description = description;
}
@@ -56,51 +56,51 @@ public class SearchResult implements ISearchResult{
public String getSummary() {
return summary;
}
-
+
public void setSummary(String summary) {
this.summary = summary;
}
-
+
public String getLabel() {
return label;
}
-
+
public void setLabel(String label) {
this.label = label;
}
-
+
public URL getIcon() {
return icon;
}
-
+
public void setIcon(URL icon) {
this.icon = icon;
}
-
+
public float getScore() {
return score;
}
-
+
public void setScore(float score) {
this.score = score;
}
-
+
public IToc getToc() {
return toc;
}
-
+
public void setToc(IToc toc) {
this.toc = toc;
}
-
+
public String getParticipantId() {
return participantId;
}
-
+
public void setParticipantId(String participantId) {
this.participantId = participantId;
}
@@ -112,5 +112,5 @@ public class SearchResult implements ISearchResult{
public void setPotentialHit(boolean isPotentialHit) {
this.isPotentialHit = isPotentialHit;
}
-
+
}
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 6a158ec8d..d0cd0fdf8 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* 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
@@ -48,10 +48,10 @@ public class SearchResults implements ISearchHitCollector {
public SearchResults(WorkingSet[] workingSets, int maxHits, String locale) {
this(workingSets, maxHits, locale, false);
}
-
+
/**
* Constructor
- *
+ *
* @param workingSets
* working sets or null if no filtering
*/
@@ -62,7 +62,7 @@ public class SearchResults implements ISearchHitCollector {
this.criteriaScope = new CriteriaHelpScope(getCriteriaScopes(workingSets));
this.isQuickSearch = isQuickSearch;
}
-
+
public void setFilter(AbstractHelpScope filter) {
this.filter = filter;
}
@@ -70,12 +70,12 @@ public class SearchResults implements ISearchHitCollector {
/* (non-Javadoc)
* @see org.eclipse.help.internal.search.ISearchHitCollector#addHits(List, String)
*/
- public void addHits(List<SearchHit> hits, String highlightTerms) {
+ public void addHits(List<SearchHit> hits, String highlightTerms) {
String urlEncodedWords = URLCoder.encode(highlightTerms);
List<SearchHit> searchHitList = new ArrayList<SearchHit>();
float scoreScale = 1.0f;
boolean scoreScaleSet = false;
-
+
Iterator<SearchHit> iter = hits.iterator();
for (int filteredHits = 0; filteredHits < maxHits && iter.hasNext(); ) {
SearchHit rawHit = iter.next();
@@ -128,7 +128,7 @@ public class SearchResults implements ISearchHitCollector {
if (label == null || "".equals(label)) { //$NON-NLS-1$
label = href;
}
-
+
// Set document href
if (urlEncodedWords.length() > 0) {
href += "?resultof=" + urlEncodedWords; //$NON-NLS-1$
@@ -140,7 +140,7 @@ public class SearchResults implements ISearchHitCollector {
.toArray(new SearchHit[searchHitList.size()]);
}
-
+
public void setHits(SearchHit hits[])
{
searchHits = hits;
@@ -159,8 +159,8 @@ public class SearchResults implements ISearchHitCollector {
return scope;
}
}
- }
-
+ }
+
// add root toc's extradir topics to search scope
if (!isQuickSearch) {
IToc tocRoot = getTocForScope(scope, locale);
@@ -196,7 +196,7 @@ public class SearchResults implements ISearchHitCollector {
IToc toc=(IToc)scope.getAdapter(IToc.class);
href=toc.getTopic(null).getHref();
}
-
+
if (href != null && href.length() > 0) {
return getTocForTopic(href, locale);
} else {
@@ -228,7 +228,7 @@ public class SearchResults implements ISearchHitCollector {
if (filter == null || filter.inScope(topic)) {
return nextToc;
}
- }
+ }
// Test for href attached to Toc element
topic = nextToc.getTopic(null);
if (topic != null && href != null && href.equals(topic.getHref())) {
@@ -252,13 +252,13 @@ public class SearchResults implements ISearchHitCollector {
/**
* Gets the searchHits.
- *
+ *
* @return Returns a SearchHit[]
*/
public SearchHit[] getSearchHits() {
return searchHits;
}
-
+
public QueryTooComplexException getException() {
return searchException;
}
@@ -266,7 +266,7 @@ public class SearchResults implements ISearchHitCollector {
/**
* Returns a collection of adaptable help resources that are roots for
* filtering.
- *
+ *
* @return Collection
*/
private ArrayList<AdaptableHelpResource> getScopes(WorkingSet[] wSets) {
@@ -281,18 +281,18 @@ public class SearchResults implements ISearchHitCollector {
}
return scopes;
}
-
+
private ArrayList<CriterionResource> getCriteriaScopes(WorkingSet[] wSets){
if (wSets == null)
return null;
-
+
ArrayList<CriterionResource> criteriaScopes = new ArrayList<CriterionResource>(wSets.length);
for (int w = 0; w < wSets.length; w++) {
CriterionResource[] elements = wSets[w].getCriteria();
for (int i = 0; i < elements.length; i++)
criteriaScopes.add(elements[i]);
}
- return criteriaScopes;
+ return criteriaScopes;
}
public void addQTCException(QueryTooComplexException exception) throws QueryTooComplexException {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/WebSearch.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/WebSearch.java
index 46e10e0f4..0bec404f2 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/WebSearch.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/WebSearch.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -31,11 +31,11 @@ import org.eclipse.help.search.ISearchScope;
* 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>.
- *
+ *
* <p>
* This class is not expected to be subclassed or otherwise accessed
* programmatically.
- *
+ *
* @since 3.1
*/
public final class WebSearch implements ISearchEngine {
@@ -92,7 +92,7 @@ public final class WebSearch implements ISearchEngine {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.help.internal.search.federated.ISearchEngineResult#getCategory()
*/
public IHelpResource getCategory() {
@@ -110,7 +110,7 @@ public final class WebSearch implements ISearchEngine {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.help.internal.search.federated.ISearchEngine#run(java.lang.String,
* org.eclipse.help.internal.search.ISearchScope,
* org.eclipse.help.internal.search.federated.ISearchEngineResultCollector,
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/WordTokenStream.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/WordTokenStream.java
index 136059964..0b70cf75f 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/WordTokenStream.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/WordTokenStream.java
@@ -27,7 +27,7 @@ public final class WordTokenStream extends Tokenizer {
private final Reader reader;
private final BreakIterator boundary;
private StringBuffer strbuf;
-
+
private int start = 0;
private final CharTermAttribute termAtt = addAttribute(CharTermAttribute.class);
@@ -72,14 +72,14 @@ public final class WordTokenStream extends Tokenizer {
if (c < 0) {
reader.close();
}
-
+
boundary.setText(strbuf.toString());
start = boundary.first();
}
else {
start = boundary.next();
}
-
+
for (end = boundary.next(); end != BreakIterator.DONE; start = end, end = boundary.next()) {
// determine if it is a word
// any letter or digit between boundaries means it is a word
@@ -95,15 +95,15 @@ public final class WordTokenStream extends Tokenizer {
}
}
}
-
- return false;
+
+ return false;
}
-
+
public void reset() throws IOException {
super.reset();
clearAttributes();
}
-
+
public void close() throws IOException {
/// Unlikely to be called as this is a reused
if (this.reader != null) {
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 8e9ac8604..8412b9854 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,7 @@ import org.xml.sax.Attributes;
* The search participant responsible for indexing XHTML documents.
*/
public class XHTMLSearchParticipant extends SearchParticipantXML {
-
+
private static final String KEYWORDS = "keywords"; //$NON-NLS-1$
private static final String META_TAG = "meta"; //$NON-NLS-1$
private static final String DESCRIPTION = "description"; //$NON-NLS-1$
@@ -32,13 +32,13 @@ public class XHTMLSearchParticipant extends SearchParticipantXML {
private String title;
private String summary;
private boolean hasDescriptionMetaTag = false;
-
+
/* (non-Javadoc)
* @see org.eclipse.help.search.XMLSearchParticipant#handleEndElement(java.lang.String, org.eclipse.help.search.XMLSearchParticipant.IParsedXMLContent)
*/
protected void handleEndElement(String name, IParsedXMLContent data) {
}
-
+
/* (non-Javadoc)
* @see org.eclipse.help.search.XMLSearchParticipant#handleStartElement(java.lang.String, org.xml.sax.Attributes, org.eclipse.help.search.XMLSearchParticipant.IParsedXMLContent)
*/
@@ -65,11 +65,11 @@ public class XHTMLSearchParticipant extends SearchParticipantXML {
}
}
}
-
+
protected void handleStartDocument(IParsedXMLContent data) {
hasDescriptionMetaTag = false;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.help.search.XMLSearchParticipant#handleText(java.lang.String, org.eclipse.help.search.XMLSearchParticipant.IParsedXMLContent)
*/
@@ -84,7 +84,7 @@ public class XHTMLSearchParticipant extends SearchParticipantXML {
}
} else if (path.segment(1).equalsIgnoreCase("head")) { //$NON-NLS-1$
if (path.segment(path.segmentCount() -1).equalsIgnoreCase("title")) { //$NON-NLS-1$
- if (title == null) {
+ if (title == null) {
title = text;
} else {
title = title + text;
@@ -93,7 +93,7 @@ public class XHTMLSearchParticipant extends SearchParticipantXML {
}
}
}
-
+
private boolean isSkipped(String tag) {
return tag.equals("script"); //$NON-NLS-1$
}
@@ -111,7 +111,7 @@ public class XHTMLSearchParticipant extends SearchParticipantXML {
return in;
}
}
-
+
public String getSummary() {
return summary;
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/FederatedSearchEntry.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/FederatedSearchEntry.java
index cd191fd81..b1096f7aa 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/FederatedSearchEntry.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/FederatedSearchEntry.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,7 @@ public class FederatedSearchEntry {
private ISearchEngineResultCollector collector;
/**
- *
+ *
*/
public FederatedSearchEntry(String engineId, String engineName, ISearchScope scope, ISearchEngine engine, ISearchEngineResultCollector collector) {
this.engineId = engineId;
@@ -32,14 +32,14 @@ public class FederatedSearchEntry {
this.engine = engine;
this.collector = collector;
}
-
+
public String getEngineId() {
return engineId;
}
-
+
public String getEngineName() {
return engineName;
- }
+ }
public ISearchEngine getEngine() {
return engine;
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/FederatedSearchJob.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/FederatedSearchJob.java
index b69120ab2..723c8582d 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/FederatedSearchJob.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/FederatedSearchJob.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -29,7 +29,7 @@ public class FederatedSearchJob extends Job {
this.expression = expression;
this.entry = entry;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.internal.jobs.InternalJob#run(org.eclipse.core.runtime.IProgressMonitor)
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/IndexerJob.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/IndexerJob.java
index e57198def..0eb315cbc 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/IndexerJob.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/IndexerJob.java
@@ -19,7 +19,7 @@ import org.eclipse.help.internal.search.SearchIndexWithIndexingProgress;
public class IndexerJob extends Job {
public static final String FAMILY = "org.eclipse.help.base.indexer"; //$NON-NLS-1$
public IndexerJob() {
- super(HelpBaseResources.IndexerJob_name);
+ super(HelpBaseResources.IndexerJob_name);
}
protected IStatus run(IProgressMonitor monitor) {
SearchIndexWithIndexingProgress index = BaseHelpSystem.getLocalSearchManager().getIndex(Platform.getNL());
@@ -39,7 +39,7 @@ public class IndexerJob extends Job {
return Status.CANCEL_STATUS;
}
catch (Exception e) {
- return new Status(IStatus.ERROR, HelpBasePlugin.PLUGIN_ID, IStatus.OK, HelpBaseResources.IndexerJob_error, e);
+ return new Status(IStatus.ERROR, HelpBasePlugin.PLUGIN_ID, IStatus.OK, HelpBaseResources.IndexerJob_error, e);
}
}
public boolean belongsTo(Object family) {
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 1da7efe3b..c44b9fac7 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
@@ -29,10 +29,10 @@ public class LocalHelp implements ISearchEngine2 {
private static final int MAX_HITS = 500;
private List<String> altList;
-
+
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.help.internal.search.federated.ISearchEngine#run(java.lang.String,
* org.eclipse.help.internal.search.ISearchScope,
* org.eclipse.help.internal.search.federated.ISearchEngineResultCollector,
@@ -46,7 +46,7 @@ public class LocalHelp implements ISearchEngine2 {
altList = new ArrayList<String>();
for (int p=0;p<processors.length;p++)
{
- SearchProcessorInfo result =
+ SearchProcessorInfo result =
processors[p].preSearch(query);
if (result!=null)
{
@@ -62,8 +62,8 @@ public class LocalHelp implements ISearchEngine2 {
}
}
Collections.sort(altList);
-
-
+
+
SearchQuery searchQuery = new SearchQuery();
searchQuery.setSearchWord(query);
WorkingSet[] workingSets = null;
@@ -92,7 +92,7 @@ public class LocalHelp implements ISearchEngine2 {
results = tmp;
}
}
-
+
if (reset)
{
SearchHit hits[] = SearchManager.convertResultsToHits(results);
@@ -105,7 +105,7 @@ public class LocalHelp implements ISearchEngine2 {
private void postResults(SearchResults results,
ISearchEngineResultCollector collector, boolean activityFiltering) {
if (results.getException() != null) {
- collector.error(new Status(IStatus.ERROR, HelpBasePlugin.PLUGIN_ID,
+ collector.error(new Status(IStatus.ERROR, HelpBasePlugin.PLUGIN_ID,
HelpBaseResources.HelpSearch_QueryTooComplex, results.getException()));
}
SearchHit[] searchHits = results.getSearchHits();
@@ -140,12 +140,12 @@ public class LocalHelp implements ISearchEngine2 {
public String toAbsoluteHref(String href, boolean frames) {
return null;
}
-
+
public List<String> getAlternates()
{
return altList;
}
-
+
public boolean open(String id) {
int sep = id.indexOf('/');
if (sep== -1)
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/LocalHelpScope.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/LocalHelpScope.java
index 73c342f5c..62b6499dd 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/LocalHelpScope.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/LocalHelpScope.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -20,11 +20,11 @@ public class LocalHelpScope implements ISearchScope {
this.workingSet = workingSet;
this.capabilityFiltered = capabilityFiltered;
}
-
+
public WorkingSet getWorkingSet() {
return workingSet;
}
-
+
public boolean getCapabilityFiltered() {
return capabilityFiltered;
}
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 9b96c3827..66b63ed1e 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
@@ -30,23 +30,23 @@ import org.osgi.framework.ServiceReference;
public class JettyHelpServer extends HelpServer {
-
- private abstract class WorkerThread extends Thread {
+
+ private abstract class WorkerThread extends Thread {
private Throwable exception;
public WorkerThread(String name) {
super(name);
}
-
+
public synchronized void setException(Throwable status) {
this.exception = status;
}
-
+
public synchronized Throwable getException() {
return exception;
}
}
-
+
private final class StartServerThread extends WorkerThread {
private final String webappName;
@@ -64,17 +64,17 @@ public class JettyHelpServer extends HelpServer {
d.put("http.port", new Integer(getPortParameter())); //$NON-NLS-1$
// set the base URL
- d.put("context.path", getContextPath()); //$NON-NLS-1$
- d.put("other.info", getOtherInfo()); //$NON-NLS-1$
+ d.put("context.path", getContextPath()); //$NON-NLS-1$
+ d.put("other.info", getOtherInfo()); //$NON-NLS-1$
d.put(JettyConstants.CONTEXT_SESSIONINACTIVEINTERVAL, new Integer(SESSION_TIMEOUT_INTERVAL_IN_SECONDS));
// suppress Jetty INFO/DEBUG messages to stderr
- Logger.getLogger("org.mortbay").setLevel(Level.WARNING); //$NON-NLS-1$
+ Logger.getLogger("org.mortbay").setLevel(Level.WARNING); //$NON-NLS-1$
- if (bindServerToHostname()) {
+ if (bindServerToHostname()) {
d.put("http.host", getHost()); //$NON-NLS-1$
- }
-
+ }
+
JettyConfigurator.startServer(webappName, d);
} catch (Throwable t) {
setException(t);
@@ -96,7 +96,7 @@ public class JettyHelpServer extends HelpServer {
JettyConfigurator.stopServer(webappName);
port = -1;
} catch (Throwable t) {
- setException(t);
+ setException(t);
}
}
}
@@ -105,11 +105,11 @@ public class JettyHelpServer extends HelpServer {
private String host;
protected int port = -1;
protected static final int AUTO_SELECT_JETTY_PORT = 0;
-
- public void start(final String webappName) throws Exception {
- WorkerThread startRunnable = new StartServerThread(webappName);
- execute(startRunnable);
- checkBundle();
+
+ public void start(final String webappName) throws Exception {
+ WorkerThread startRunnable = new StartServerThread(webappName);
+ execute(startRunnable);
+ checkBundle();
}
/*
@@ -141,7 +141,7 @@ public class JettyHelpServer extends HelpServer {
HelpBasePlugin.logError("An error occured while stopping the help server", e); //$NON-NLS-1$
}
}
-
+
private void execute(WorkerThread runnable) throws Exception {
boolean interrupted = false;
Thread thread = runnable;
@@ -157,7 +157,7 @@ public class JettyHelpServer extends HelpServer {
}
if (interrupted)
Thread.currentThread().interrupt();
-
+
Throwable t = runnable.getException();
if (t != null) {
@@ -186,12 +186,12 @@ public class JettyHelpServer extends HelpServer {
}
}
}
-
+
/*
* Get the port number which will be passed to Jetty
*/
protected int getPortParameter() {
- if (port == -1) {
+ if (port == -1) {
return AUTO_SELECT_JETTY_PORT;
}
return port;
@@ -212,12 +212,12 @@ public class JettyHelpServer extends HelpServer {
protected String getOtherInfo() {
return "org.eclipse.help"; //$NON-NLS-1$
- }
-
+ }
+
protected String getContextPath() {
return "/help"; //$NON-NLS-1$
}
-
+
public boolean bindServerToHostname() {
if (BaseHelpSystem.getMode() == BaseHelpSystem.MODE_WORKBENCH) {
return true;
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 bbf737292..5a4009e0f 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
@@ -19,7 +19,7 @@ import org.eclipse.help.internal.base.HelpBasePlugin;
import org.eclipse.help.server.HelpServer;
public class WebappManager {
-
+
private static HelpServer server;
private static final String SERVER_EXTENSION_ID = "org.eclipse.help.base.server"; //$NON-NLS-1$
private static final String SERVER_CLASS_ATTRIBUTE = "class"; //$NON-NLS-1$
@@ -33,7 +33,7 @@ public class WebappManager {
}
return server;
}
-
+
public static void start(String webappName) throws Exception {
getHelpServer().start(webappName);
}
@@ -49,7 +49,7 @@ public class WebappManager {
public static String getHost() {
return getHelpServer().getHost();
}
-
+
private static void createWebappServer() {
IExtensionPoint point = Platform.getExtensionRegistry()
.getExtensionPoint(SERVER_EXTENSION_ID );
@@ -59,7 +59,7 @@ public class WebappManager {
// We need to pick up the non-default configuration
IConfigurationElement[] elements = extensions[0]
.getConfigurationElements();
- if (elements.length == 0)
+ if (elements.length == 0)
return;
IConfigurationElement serverElement = elements[0];
// Instantiate the app server
@@ -72,5 +72,5 @@ public class WebappManager {
}
}
}
-
+
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/EclipseConnection.java b/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/EclipseConnection.java
index 80e012671..faabbc6ed 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/EclipseConnection.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/EclipseConnection.java
@@ -62,7 +62,7 @@ public class EclipseConnection {
if (Options.isDebug()) {
System.out.println("Warning: URL Host: " //$NON-NLS-1$
+ urlHostName + " vs. " //$NON-NLS-1$
- + session.getPeerHost());
+ + session.getPeerHost());
}
return true;
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/EclipseController.java b/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/EclipseController.java
index 59d125564..d775ec45d 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/EclipseController.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/EclipseController.java
@@ -58,7 +58,7 @@ public class EclipseController implements EclipseLifeCycleListener {
/**
* Constructs help system
- *
+ *
* @param applicationId
* ID of Eclipse help application
* @param args
@@ -209,7 +209,7 @@ public class EclipseController implements EclipseLifeCycleListener {
/**
* Builds a URL that communicates the specified command to help control
* servlet.
- *
+ *
* @param command
* standalone help system command e.g. "displayHelp"
* @param parameters
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/Options.java b/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/Options.java
index ea347a867..fb5d2f65e 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/Options.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/Options.java
@@ -68,24 +68,24 @@ public class Options {
// User ID of the administrator
private static String adminId = null;
-
+
// Password of the administrator
private static String adminPassword = null;
-
+
// location of the trustStore to use if SSL
// connection must be established
private static String trustStoreLocation = null;
-
+
// password of the trustStore to use if SSL
// connection must be established
private static String trustStorePassword = null;
-
+
// update parameters, ex: "version=1.0.0", "from=file:///c:/site"
private static String[] updateParameters;
/**
* Initializes options.
- *
+ *
* @param appId
* eclipse application id
* @param args
@@ -107,7 +107,7 @@ public class Options {
/**
* Initializes options.
- *
+ *
* @param appId
* eclipse application id
* @param options
@@ -197,25 +197,25 @@ public class Options {
if (ports != null && ports.size() > 0) {
port = ports.get(0);
}
-
+
// consume - adminId option
List<String> adminIds = extractOption(eclipseArgs, "-adminId"); //$NON-NLS-1$
if (adminIds != null && adminIds.size() > 0) {
adminId = adminIds.get(0);
}
-
+
// consume - admin option
List<String> adminPasswords = extractOption(eclipseArgs, "-adminPassword"); //$NON-NLS-1$
if (adminPasswords != null && adminPasswords.size() > 0) {
adminPassword = adminPasswords.get(0);
}
-
+
// consume - trustStoreLocation option
List<String> trustStoreLocations = extractOption(eclipseArgs, "-trustStoreLocation"); //$NON-NLS-1$
if (trustStoreLocations != null && trustStoreLocations.size() > 0) {
trustStoreLocation = trustStoreLocations.get(0);
}
-
+
// consume - trustStoreLocation option
List<String> trustStorePasswords = extractOption(eclipseArgs, "-trustStorePassword"); //$NON-NLS-1$
if (trustStorePasswords != null && trustStorePasswords.size() > 0) {
@@ -284,19 +284,19 @@ public class Options {
public static String getAdminId() {
return adminId;
}
-
+
public static String getAdminPassword() {
return adminPassword;
}
-
+
public static String getTrustStoreLocation() {
return trustStoreLocation;
}
-
+
public static String getTrustStorePassword() {
return trustStorePassword;
}
-
+
public static File getConnectionFile() {
return hostPortFile;
}
@@ -327,7 +327,7 @@ public class Options {
/**
* Removes specified option and its list of values from a list of options
- *
+ *
* @param optionName
* name of the option e.g. -data
* @return List of String values of the specified option, or null if option
@@ -362,7 +362,7 @@ public class Options {
/**
* Obtains specified option and its list of values from a list of options
- *
+ *
* @param optionName
* name of the option e.g. -data
* @param options
@@ -402,7 +402,7 @@ public class Options {
/**
* Returns the useExe.
- *
+ *
* @return boolean
*/
public static boolean useExe() {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneHelp.java b/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneHelp.java
index cdb249c92..ef23c344a 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneHelp.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneHelp.java
@@ -19,7 +19,7 @@ import org.eclipse.help.internal.base.*;
* its help system implementation, and controling it. This class can be used
* instantiated and used in a Java program, or can be launched from command line
* to execute single help action.
- *
+ *
* Usage as a Java component:
* <ul>
* <li>create an instantance of this class and then hold onto this instance for
@@ -36,7 +36,7 @@ public class StandaloneHelp extends EclipseController {
/**
* Constructs help system
- *
+ *
* @param args
* array of String options and their values Option
* <code>-eclipseHome dir</code> specifies Eclipse installation
@@ -91,7 +91,7 @@ public class StandaloneHelp extends EclipseController {
public void displayHelp(String href) throws Exception {
sendHelpCommand("displayHelp", new String[]{"href=" + href}); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
/**
* @see org.eclipse.help.standalone.Help#displayHelp()
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneInfocenter.java b/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneInfocenter.java
index 292215f97..c7c2cf7a7 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneInfocenter.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneInfocenter.java
@@ -27,7 +27,7 @@ public class StandaloneInfocenter extends EclipseController {
/**
* Constructs help system
- *
+ *
* @param args
* array of String options and their values Option
* <code>-eclipseHome dir</code> specifies Eclipse installation
@@ -56,7 +56,7 @@ public class StandaloneInfocenter extends EclipseController {
}
});
HttpURLConnection.setFollowRedirects(true);
-
+
if (infocenter.executeCommand(helpCommand)) {
return;
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/validation/TocValidator.java b/org.eclipse.help.base/src/org/eclipse/help/internal/validation/TocValidator.java
index f9636e9a3..95a348a1d 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/validation/TocValidator.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/validation/TocValidator.java
@@ -33,10 +33,10 @@ import org.xml.sax.SAXException;
public class TocValidator {
private static final boolean DEBUG = false;
-
+
private HashMap<String, Object> processedTocs;
private TocFileParser parser;
-
+
public static class BrokenLink {
private String tocID;
private String href;
@@ -49,17 +49,17 @@ public class TocValidator {
public String getHref() {
return href; }
}
-
+
public static abstract class Filter {
abstract public boolean isIncluded(String href);
}
-
+
public static class PassThroughFilter extends Filter {
public boolean isIncluded(String href) {
return true;
}
}
-
+
/**
* Checks the validity of all <code>href</code> attributes on <code>topic</code> elements in the toc and the
* <code>topic</code> attribute on the <code>toc</code> element if there is one. Also checks validity of any
@@ -75,7 +75,7 @@ public class TocValidator {
public static ArrayList<BrokenLink> validate(String[] hrefs) throws IOException, SAXException, ParserConfigurationException{
return filteredValidate(hrefs, new PassThroughFilter());
}
-
+
public static ArrayList<BrokenLink> filteredValidate (String[] hrefs, Filter filter) throws IOException, SAXException, ParserConfigurationException{
TocValidator v = new TocValidator();
ArrayList<BrokenLink> result = new ArrayList<BrokenLink>();
@@ -83,16 +83,16 @@ public class TocValidator {
v.processToc(hrefs[i], null, result, filter);
return result;
}
-
+
private TocValidator() {
processedTocs = new HashMap<String, Object>();
parser = new TocFileParser();
}
-
+
/* Checks validity of all links in a given toc. If all links are valid, an empty ArrayList is returned.
* Otherwise an ArrayList of BrokenLink objects is returned.
*/
- private void processToc(String href, String plugin, ArrayList<BrokenLink> result, Filter filter)
+ private void processToc(String href, String plugin, ArrayList<BrokenLink> result, Filter filter)
throws IOException, SAXException, ParserConfigurationException {
String path;
if (href.startsWith("/")) { //$NON-NLS-1$
@@ -119,7 +119,7 @@ public class TocValidator {
TocContribution contribution = parser.parse(new TocFile(plugin,path, true, "en", null, null)); //$NON-NLS-1$
process(contribution.getToc(), plugin, path, result, filter);
}
-
+
/* Checks validity of all links in the given IUAElement and recursively calls itself to check all children.
* If there are any links to other tocs, calls the processToc method to validate them. If any broken links
* are found, an appropriate BrokenLink object will be added to the result ArrayList.
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableHelpResource.java b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableHelpResource.java
index 59f507de0..ddb449b8c 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableHelpResource.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableHelpResource.java
@@ -54,7 +54,7 @@ public abstract class AdaptableHelpResource
/**
* Tests the receiver and the object for equality
- *
+ *
* @param object
* object to compare the receiver to
* @return true=the object equals the receiver, the name is the same. false
@@ -73,7 +73,7 @@ public abstract class AdaptableHelpResource
/**
* Returns the hash code.
- *
+ *
* @return the hash code.
*/
public int hashCode() {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableSelectedToc.java b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableSelectedToc.java
index e9ce8fbef..2e0793e3f 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableSelectedToc.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableSelectedToc.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -43,7 +43,7 @@ public class AdaptableSelectedToc extends AdaptableHelpResource {
/**
* When href is exactly the href of the selected toc, then return the selected topic
* Otherwise, return null
- *
+ *
* @param href
* The topic's href value.
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableSelectedTopic.java b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableSelectedTopic.java
index 06112bc8c..800c69d06 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableSelectedTopic.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableSelectedTopic.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -41,7 +41,7 @@ public class AdaptableSelectedTopic extends AdaptableHelpResource {
/**
* When href is exactly the href of the selected topic, then return the selected topic
* Otherwise, return null
- *
+ *
* @param href
* The topic's href value.
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTocsArray.java b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTocsArray.java
index 407d19f4f..eb5cc7fd4 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTocsArray.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTocsArray.java
@@ -70,7 +70,7 @@ public class AdaptableTocsArray implements IAdaptable {
/**
* Tests the receiver and the object for equality
- *
+ *
* @param object
* object to compare the receiver to
* @return true=the object equals the receiver, the name is the same. false
@@ -91,7 +91,7 @@ public class AdaptableTocsArray implements IAdaptable {
/**
* Returns the hash code.
- *
+ *
* @return the hash code.
*/
public int hashCode() {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTopic.java b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTopic.java
index bc4f3547d..90a1c51cb 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTopic.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableTopic.java
@@ -62,7 +62,7 @@ public class AdaptableTopic extends AdaptableHelpResource {
* Returns a topic with the specified href. <br>
* It is possible that multiple tocs have the same href, in which case there
* is no guarantee which one is returned.
- *
+ *
* @param href
* The topic's href value.
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/IHelpWorkingSetManager.java b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/IHelpWorkingSetManager.java
index 2016c25bd..95fc23faa 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/IHelpWorkingSetManager.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/IHelpWorkingSetManager.java
@@ -17,7 +17,7 @@ import org.eclipse.help.internal.criteria.CriterionResource;
/**
* The working set manager stores help working sets. Working sets are persisted
* whenever one is added or removed.
- *
+ *
* @since 3.0
*/
public interface IHelpWorkingSetManager {
@@ -35,16 +35,16 @@ public interface IHelpWorkingSetManager {
AdaptableHelpResource[] elements);
public WorkingSet createWorkingSet(String name, AdaptableHelpResource[] elements, CriterionResource[] criteria);
-
+
/**
* Returns a working set by name
- *
+ *
*/
public WorkingSet getWorkingSet(String name);
/**
* Implements IWorkingSetManager.
- *
+ *
* @see org.eclipse.ui.IWorkingSetManager#getWorkingSets()
*/
public WorkingSet[] getWorkingSets();
@@ -57,7 +57,7 @@ public interface IHelpWorkingSetManager {
/**
* Persists all working sets. Should only be called by the webapp working
* set dialog.
- *
+ *
* @param changedWorkingSet
* the working set that has changed
*/
@@ -71,14 +71,14 @@ public interface IHelpWorkingSetManager {
public String getCurrentWorkingSet();
public void setCurrentWorkingSet(String workingSet);
-
+
public boolean isCriteriaScopeEnabled();
-
+
public String[] getCriterionIds();
-
+
public String[] getCriterionValueIds(String criterionId);
-
+
public String getCriterionDisplayName(String criterionId);
-
+
public String getCriterionValueDisplayName(String criterionId, String criterionValueId);
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSet.java b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSet.java
index ba8cceb24..c03b0b808 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSet.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSet.java
@@ -30,28 +30,28 @@ public class WorkingSet {
public WorkingSet(String name, List<AdaptableHelpResource> elements) {
this(name, elements, null);
}
-
+
public WorkingSet(String name, List<AdaptableHelpResource> elements, List<CriterionResource> criteria) {
this.name = name;
-
+
if (elements == null)
elements = new ArrayList<AdaptableHelpResource>();
this.elements = elements;
-
+
if (criteria != null) {
this.criteria = criteria;
} else {
this.criteria = new ArrayList<CriterionResource>();
- }
+ }
}
public WorkingSet(String name, AdaptableHelpResource[] elements) {
this(name, elements, null);
}
-
+
public WorkingSet(String name, AdaptableHelpResource[] elements, CriterionResource[] criteria) {
this.name = name;
-
+
if (elements == null)
elements = new AdaptableHelpResource[0];
@@ -59,7 +59,7 @@ public class WorkingSet {
for (int i = 0; i < elements.length; i++) {
this.elements.add(elements[i]);
}
-
+
if (criteria == null)
criteria = new CriterionResource[0];
@@ -97,15 +97,15 @@ public class WorkingSet {
for (int i = 0; i < elements.length; i++)
this.elements.add(elements[i]);
}
-
-
+
+
public void setCriteria(CriterionResource[] criteria) {
this.criteria = new ArrayList<CriterionResource>(criteria.length);
for(int i = 0; i < criteria.length; i++) {
this.criteria.add(criteria[i]);
}
}
-
+
public CriterionResource[] getCriteria(){
CriterionResource[] array = new CriterionResource[criteria.size()];
criteria.toArray(array);
@@ -117,7 +117,7 @@ public class WorkingSet {
Element ws = doc.createElement("workingSet"); //$NON-NLS-1$
ws.setAttribute("name", name); //$NON-NLS-1$
parent.appendChild(ws);
-
+
Element contents = doc.createElement("contents"); //$NON-NLS-1$
ws.appendChild(contents);
for (Iterator<AdaptableHelpResource> it = elements.iterator(); it.hasNext();) {
@@ -126,11 +126,11 @@ public class WorkingSet {
helpResource.saveState(child);
contents.appendChild(child);
}
-
+
if (!criteria.isEmpty()){
Element criteriaElement = doc.createElement("criteria"); //$NON-NLS-1$
ws.appendChild(criteriaElement);
-
+
for(Iterator<CriterionResource> iterator = criteria.iterator(); iterator.hasNext();){
Element criterionItem = doc.createElement("criterion"); //$NON-NLS-1$
criteriaElement.appendChild(criterionItem);
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetComparator.java b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetComparator.java
index c57688851..dbff35692 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetComparator.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetComparator.java
@@ -21,7 +21,7 @@ public class WorkingSetComparator implements Comparator<WorkingSet> {
/**
* Implements Comparator.
- *
+ *
* @see Comparator#compare(Object, Object)
*/
public int compare(WorkingSet o1,WorkingSet o2) {
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 5c20b6530..4966e4918 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
@@ -54,7 +54,7 @@ import org.xml.sax.SAXException;
/**
* The working set manager stores help working sets. Working sets are persisted
* whenever one is added or removed.
- *
+ *
* @since 2.1
*/
public class WorkingSetManager implements IHelpWorkingSetManager {
@@ -63,11 +63,11 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
private static final String WORKING_SET_STATE_FILENAME = "workingsets.xml"; //$NON-NLS-1$
private static final String UNCATEGORIZED = "Uncategorized"; //$NON-NLS-1$
-
+
private SortedSet<WorkingSet> workingSets = new TreeSet<WorkingSet>(new WorkingSetComparator());
private AdaptableTocsArray root;
-
+
private Map allCriteriaValues;
private static final DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory
@@ -107,16 +107,16 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
AdaptableHelpResource[] elements) {
return new WorkingSet(name, elements);
}
-
+
public WorkingSet createWorkingSet(String name, AdaptableHelpResource[] elements, CriterionResource[] criteria) {
return new WorkingSet(name, elements, criteria);
}
-
-
+
+
/**
* Tests the receiver and the object for equality
- *
+ *
* @param object
* object to compare the receiver to
* @return true=the object equals the receiver, it has the same working
@@ -135,7 +135,7 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
/**
* Returns a working set by name
- *
+ *
*/
public WorkingSet getWorkingSet(String name) {
if (name == null || workingSets == null)
@@ -152,7 +152,7 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
/**
* Returns the hash code.
- *
+ *
* @return the hash code.
*/
public int hashCode() {
@@ -161,7 +161,7 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
/**
* Implements IWorkingSetManager.
- *
+ *
* @see org.eclipse.ui.IWorkingSetManager#getWorkingSets()
*/
public WorkingSet[] getWorkingSets() {
@@ -171,7 +171,7 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
/**
* Returns the file used as the persistence store
- *
+ *
* @return the file used as the persistence store
*/
private File getWorkingSetStateFile() {
@@ -234,7 +234,7 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
/**
* Recreates all working sets from the persistence store and adds them to
* the receiver.
- *
+ *
* @param parent
* the xml element containing serialized working sets
*/
@@ -254,7 +254,7 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
/**
* Recreates a working set from the persistence store.
- *
+ *
* @return the working set created from the memento or null if creation
* failed.
*/
@@ -300,9 +300,9 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
}
AdaptableHelpResource[] elements = new AdaptableHelpResource[helpResources.size()];
helpResources.toArray(elements);
-
+
//criteria
-
+
List<CriterionResource> criteriaResource = new ArrayList<CriterionResource>();
NodeList criteriaContents = workingSetNode.getElementsByTagName("criterion"); //$NON-NLS-1$
for (int i = 0; i < criteriaContents.getLength(); ++i) {
@@ -321,7 +321,7 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
CriterionResource criterionResource = new CriterionResource(criterionName, criterionValues);
criteriaResource.add(criterionResource);
}
- }
+ }
}
CriterionResource[] criteria = new CriterionResource[criteriaResource.size()];
@@ -375,7 +375,7 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
/**
* Saves all persistable working sets in the persistence store.
- *
+ *
* @param parent:
* the xml node to save to
*/
@@ -391,7 +391,7 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
/**
* Persists all working sets. Should only be called by the webapp working
* set dialog.
- *
+ *
* @param changedWorkingSet
* the working set that has changed
*/
@@ -455,7 +455,7 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
workingSets = new TreeSet<WorkingSet>(new WorkingSetComparator());
restoreState();
}
-
+
public boolean isCriteriaScopeEnabled(){
if(null == allCriteriaValues){
allCriteriaValues = HelpPlugin.getCriteriaManager().getAllCriteriaValues(Platform.getNL());
@@ -481,7 +481,7 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
}
Collections.sort(criterionIds);
}
- String[] ids = new String[criterionIds.size()];
+ String[] ids = new String[criterionIds.size()];
criterionIds.toArray(ids);
return ids;
}
@@ -499,11 +499,11 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
valueIds.add(UNCATEGORIZED);
}
}
- String[] valueIdsArray = new String[valueIds.size()];
+ String[] valueIdsArray = new String[valueIds.size()];
valueIds.toArray(valueIdsArray);
return valueIdsArray;
}
-
+
public String getCriterionDisplayName(String criterionId) {
return HelpPlugin.getCriteriaManager().getCriterionDisplayName(criterionId, Platform.getNL());
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/DynamicXHTMLProcessor.java b/org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/DynamicXHTMLProcessor.java
index 563102fc2..d2626fb4e 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/DynamicXHTMLProcessor.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/DynamicXHTMLProcessor.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/XHTMLCharsetHandler.java b/org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/XHTMLCharsetHandler.java
index da34388ef..68033b479 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/XHTMLCharsetHandler.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/XHTMLCharsetHandler.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -20,7 +20,7 @@ import org.w3c.dom.Element;
* Converts the charset in XHTML meta tag to UTF-8. This is the encoding
* output by the XMLProcessor, and we need the charset in the meta tags
* to match, otherwise browsers will be confused.
- * Also ensure that all <script> and <div> elements have a child,
+ * Also ensure that all <script> and <div> elements have a child,
*/
public class XHTMLCharsetHandler extends ProcessorHandler {
@@ -37,7 +37,7 @@ public class XHTMLCharsetHandler extends ProcessorHandler {
return HANDLED_CONTINUE;
}
}
- if (endTagRequired(element)) {
+ if (endTagRequired(element)) {
Element domElement = element.getElement();
if (domElement.getFirstChild() == null) {
Document document = domElement.getOwnerDocument();
@@ -49,7 +49,7 @@ public class XHTMLCharsetHandler extends ProcessorHandler {
}
/*
- * Returns true if this element requires the end tag to be separate from the
+ * Returns true if this element requires the end tag to be separate from the
* start tag to render correctly in browsers.
* i.e. generate <a></a> rather than <a/>
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/XHTMLContentDescriber.java b/org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/XHTMLContentDescriber.java
index 1b836fa33..b09d53b11 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/XHTMLContentDescriber.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/XHTMLContentDescriber.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/AbstractSearchProcessor.java b/org.eclipse.help.base/src/org/eclipse/help/search/AbstractSearchProcessor.java
index 5453db57a..8d1fccf3d 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/AbstractSearchProcessor.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/AbstractSearchProcessor.java
@@ -15,36 +15,36 @@ package org.eclipse.help.search;
* This class is responsible for handling any pre or post
* search processing events, including query manipulation
* and output to the search frame.
- *
+ *
* @since 3.6
*
*/
public abstract class AbstractSearchProcessor {
-
+
public AbstractSearchProcessor()
{
-
+
}
-
+
/**
* This method is called before the search is performed.
- *
+ *
* See {@link SearchProcessorInfo} for types of information that can be used by
* the search display.
- *
+ *
* @return <code>SearchProcessorInfo</code>, or <code>null</code> for no changes.
*/
public abstract SearchProcessorInfo preSearch(String query);
-
+
/**
* This method is called after the search is performed.
- *
+ *
* Results are stored as an array of ISearchResult containing
* all available data.
- *
- * This method can be used to return a modified result set. For example, one can change the
+ *
+ * This method can be used to return a modified result set. For example, one can change the
* result score of an item, add new results to the top of the list, or remove results.
- *
+ *
* @return <code>{@link ISearchResult}[]</code>, or <code>null</code> for no changes.
*/
public abstract ISearchResult[] postSearch(String query, ISearchResult[] results);
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 7ab3a7473..4320f54b0 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
@@ -72,10 +72,10 @@ import org.xml.sax.InputSource;
* <p>
* <pre>
* destination/nl/country/
- *
+ *
* or
- *
- * destination/nl/country/language/
+ *
+ * destination/nl/country/language/
* </pre>
* <p>
* The relative directory specified in the <code>index</code> element of the
@@ -84,7 +84,7 @@ import org.xml.sax.InputSource;
* <p>
* An instance of <code>HelpIndexBuilder</code> can be cached and used
* multiple times for different manifest and destination values.
- *
+ *
* @since 3.1
*/
@@ -100,7 +100,7 @@ public class HelpIndexBuilder {
private String indexPath;
private File destination;
-
+
private ArrayList<TocFile> tocFiles = new ArrayList<TocFile>();
private ArrayList<LocaleDir> localeDirs = new ArrayList<LocaleDir>();
@@ -109,7 +109,7 @@ public class HelpIndexBuilder {
.newInstance();
private DocumentBuilder parser;
-
+
private static Locale[] legalLocales = Locale.getAvailableLocales();
private static HashSet<String> legalLanguages = null;
private static HashSet<String> legalCountries = null;
@@ -134,7 +134,7 @@ public class HelpIndexBuilder {
this.locale = locale;
this.relativePath = relativePath;
}
-
+
public File findFile(String file) {
for (int i=0; i<dirs.size(); i++) {
File dir = dirs.get(i);
@@ -190,7 +190,7 @@ public class HelpIndexBuilder {
String href;
boolean primary;
String extraDir;
-
+
public TocFile(String href, boolean primary, String extraDir) {
this.href = href;
this.primary = primary;
@@ -209,7 +209,7 @@ public class HelpIndexBuilder {
* it is the absolute path of <code>plugin.xml</code> file. If the target
* is a fragment, it is the absolute path of <code>plugin.xml</code> of
* the fragment plug-in.
- *
+ *
* @return the file that contains TOC extensions
*/
public File getManifest() {
@@ -221,7 +221,7 @@ public class HelpIndexBuilder {
* the target is a plug-in, it is the absolute path of
* <code>plugin.xml</code> file. If the target is a fragment, it is the
* absolute path of <code>plugin.xml</code> of the fragment plug-in.
- *
+ *
* @param manifest
* the file that contains TOC extensions
*/
@@ -240,7 +240,7 @@ public class HelpIndexBuilder {
/**
* Returns the destination directory where index should be created.
- *
+ *
* @return the destination index directory
*/
public File getDestination() {
@@ -250,7 +250,7 @@ public class HelpIndexBuilder {
/**
* Sets the destination directory where index should be created.
* Locale-specific directories will be created starting from this directory.
- *
+ *
* @param destination
* the directory where index should be created
*/
@@ -264,7 +264,7 @@ public class HelpIndexBuilder {
* <code>index</code> element, all topics listed in all the TOCs in the
* plug-in will be indexed and stored in the path specified by the
* <code>index</code> element.
- *
+ *
* @param monitor
* the monitor to track index creation progress
* @throws CoreException
@@ -281,7 +281,7 @@ public class HelpIndexBuilder {
PluginIdentifier pid = getPluginID(manifest.getParentFile(), doc);
PluginIdentifier fid = null;
-
+
if (!manifest.getParentFile().equals(destination)) {
// target is a fragment, source is a plug-in
File fragmentFile = new File(destination, "fragment.xml"); //$NON-NLS-1$
@@ -290,7 +290,7 @@ public class HelpIndexBuilder {
fdoc = readXMLFile(fragmentFile);
fid = getPluginID(destination, fdoc);
fdoc=null;
- }
+ }
Element[] extensions = getTocExtensions(doc);
for (int i = 0; i < extensions.length; i++) {
@@ -300,9 +300,9 @@ public class HelpIndexBuilder {
throwCoreException(HelpBaseResources.HelpIndexBuilder_noDestinationPath, null);
}
doc = null; // discard the DOM
-
+
// compute the dir tree
- computeLocaleDirs(fid!=null);
+ computeLocaleDirs(fid!=null);
monitor.beginTask(HelpBaseResources.HelpIndexBuilder_buildingIndex, localeDirs.size());
MultiStatus multiStatus = null;
@@ -349,8 +349,8 @@ public class HelpIndexBuilder {
}
/*
- * Computes the all os/*, ws/*, nl/language/ and
- * nl/language/country/ locale dirs that contain files. We will
+ * Computes the all os/*, ws/*, nl/language/ and
+ * nl/language/country/ locale dirs that contain files. We will
* produce an index for each one.
*/
private void computeLocaleDirs(boolean fragment) {
@@ -363,7 +363,7 @@ public class HelpIndexBuilder {
computeSystem(ws, Platform.knownWSValues());
File os = new File(destination, "os"); //$NON-NLS-1$
computeSystem(os, Platform.knownOSValues());
-
+
File nl = new File(destination, "nl"); //$NON-NLS-1$
if (!nl.exists() || !nl.isDirectory())
return;
@@ -403,7 +403,7 @@ public class HelpIndexBuilder {
}
}
}
-
+
private void computeSystem(File systemRoot, String [] values) {
if (systemRoot.exists() && systemRoot.isDirectory()) {
// check
@@ -439,7 +439,7 @@ public class HelpIndexBuilder {
}
return false;
}
-
+
private boolean isValidLanguage(String language) {
if (legalLanguages==null) {
legalLanguages = new HashSet<String>();
@@ -450,7 +450,7 @@ public class HelpIndexBuilder {
}
return legalLanguages.contains(language);
}
-
+
private boolean isValidCountry(String country) {
if (legalCountries==null) {
legalCountries = new HashSet<String>();
@@ -461,7 +461,7 @@ public class HelpIndexBuilder {
}
return legalCountries.contains(country);
}
-
+
/*
* Build an index for the locale directory by collecting
* documents according to the tocs, then building the index.
@@ -472,7 +472,7 @@ public class HelpIndexBuilder {
throws CoreException {
// build an index for each locale directory
String message = NLS.bind(HelpBaseResources.HelpIndexBuilder_indexFor, localeDir.dirs.get(0).getName());
- monitor.beginTask(message, 5);
+ monitor.beginTask(message, 5);
File directory = localeDir.dirs.get(0);
File indexDirectory = new File(directory, indexPath);
prepareDirectory(indexDirectory);
@@ -493,7 +493,7 @@ public class HelpIndexBuilder {
monitor.done();
return status;
}
-
+
/*
* Using TOC files found either in the fragment or in the plug-in,
* collect hrefs for the topics.
@@ -512,7 +512,7 @@ public class HelpIndexBuilder {
}
return docs;
}
-
+
/*
* Try to find the actual file for the TOC href. Look in the
* locale dirs first (best match first). If not found,
@@ -566,7 +566,7 @@ public class HelpIndexBuilder {
}
}
}
-
+
/*
* Creates index for the locale dir by iterating over the doc hrefs
* and adding them into the index. Documents that cannot be found
@@ -576,7 +576,7 @@ public class HelpIndexBuilder {
private MultiStatus createIndex(String pluginId, boolean fragment, LocaleDir localeDir,
SearchIndex index, Collection<String> addedDocs, IProgressMonitor monitor)
throws CoreException {
- monitor.beginTask(HelpBaseResources.UpdatingIndex, addedDocs.size());
+ monitor.beginTask(HelpBaseResources.UpdatingIndex, addedDocs.size());
if (!index.beginAddBatch(true)) {
throwCoreException(HelpBaseResources.HelpIndexBuilder_error, null);
}
@@ -618,7 +618,7 @@ public class HelpIndexBuilder {
monitor.done();
return multiStatus;
}
-
+
private MultiStatus createMultiStatus() {
return new MultiStatus(
HelpBasePlugin.PLUGIN_ID,
@@ -644,7 +644,7 @@ public class HelpIndexBuilder {
/**
* If the path does not exist, create it. Otherwise, delete all the files in
* it.
- *
+ *
* @param indexDirectory
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/IHelpSearchIndex.java b/org.eclipse.help.base/src/org/eclipse/help/search/IHelpSearchIndex.java
index 03b73058a..5f36ffd1b 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/IHelpSearchIndex.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/IHelpSearchIndex.java
@@ -19,7 +19,7 @@ import org.eclipse.core.runtime.IStatus;
* Represents a Lucene index for one locale. The interface is used
* to allow participants to delegate indexing of documents outside
* of the TOC using the same algorithms as those in TOC.
- *
+ *
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
* @since 3.5
@@ -32,7 +32,7 @@ public interface IHelpSearchIndex {
* participants, or the default HTML search participant. Use this method when encountering
* documents outside of TOC that are nevertheless of the known format and help system knows how
* to handle.
- *
+ *
* @param pluginId
* the id of the contributing plug-in
* @param name
@@ -46,7 +46,7 @@ public interface IHelpSearchIndex {
* @return the status of the operation
*/
IStatus addSearchableDocument(String pluginId, String name, URL url, String id, ISearchDocument doc);
-
+
/**
* A search index is created for each locale.
* @return the locale associated with this index.
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/ISearchDocument.java b/org.eclipse.help.base/src/org/eclipse/help/search/ISearchDocument.java
index 30799a225..0e17fc64f 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/ISearchDocument.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/ISearchDocument.java
@@ -15,36 +15,36 @@ import java.io.Reader;
/**
* Represents a document in the search index. This interface is used by
- * clients which implement the search participant extension point. While the
+ * clients which implement the search participant extension point. While the
* help system uses the Lucene classes internally this interface does not
* import anything from Lucene and enables the API for adding search participants
* to remain binary compatible whatever changes are made in Lucene.
- *
+ *
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
* @since 3.5
*/
public interface ISearchDocument {
-
+
/**
* @param title the title which will be shown in the search results summary.
- * This function should be called exactly once per document
+ * This function should be called exactly once per document
*/
public void setTitle(String title);
-
+
/**
* @param summary the summary which will be used when displaying search results.
- * This function should be called exactly once per document
+ * This function should be called exactly once per document
*/
public void setSummary(String summary);
-
+
/**
- * @param contents the text which will be used when performing a search. The search index
+ * @param contents the text which will be used when performing a search. The search index
* will parse the contents and store the results in a database for rapid retrieval.
*/
public void addContents(String contents);
-
+
/**
* Alternate way of adding contents which is closer to the API for the
* deprecated extension point org.eclipse.help.base.luceneSearchParticipants.
@@ -57,9 +57,9 @@ public interface ISearchDocument {
/**
* Allows search participant to indicate that a document will be processed
- * at runtime and that parts of the contents may not be displayed to the
+ * at runtime and that parts of the contents may not be displayed to the
* user, causing a match in the search to be shown as a potential match.
- * By default documents are considered to be unfiltered so this function
+ * By default documents are considered to be unfiltered so this function
* need only be called to indicate that a document is filtered
*/
public void setHasFilters(boolean hasFilters);
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 2e6a1b840..d13d0294d 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -27,13 +27,13 @@ import org.eclipse.core.runtime.IProgressMonitor;
* <p>
* Search engine must be cancelable.
* <p>This interface is intended to be implemented by clients.
- *
+ *
* @since 3.1
*/
public interface ISearchEngine {
/**
- *
+ *
* @param query
* the search expression
* @param scope
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngine2.java b/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngine2.java
index 85a61f2bb..3e02fd8ca 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngine2.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngine2.java
@@ -3,7 +3,7 @@
* accompanying materials are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors: IBM Corporation - initial API and implementation
**************************************************************************************************/
package org.eclipse.help.search;
@@ -13,9 +13,9 @@ package org.eclipse.help.search;
* that return hits that cannot be opened into the web browser should implement this interface and
* also indicate that the search results should be opened by the engine using
* {@link ISearchEngineResult2#canOpen()}.
- *
+ *
* @since 3.2
- *
+ *
*/
public interface ISearchEngine2 extends ISearchEngine {
@@ -26,7 +26,7 @@ public interface ISearchEngine2 extends ISearchEngine {
* fully reference the results and are not transient. These identifiers can be later used to
* open the results by delegating the operation to the engine, or to bookmark the results for
* future opening.
- *
+ *
* @param id
* The engine-specific identifier provided by the search result
* @return <code>true</code> if the operation was successful, or <code>false</code> if the
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 58671070f..e647d36a0 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -20,13 +20,13 @@ import org.eclipse.help.IHelpResource;
* 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
*/
public interface ISearchEngineResult {
/**
* Returns the label of the search result to use in the UI.
- *
+ *
* @return the search result label
*/
String getLabel();
@@ -37,7 +37,7 @@ public interface ISearchEngineResult {
* document fragment in the vicinity of the searched expression, or a
* combination of several document fragments. Other search engines may
* return a couple of sentencies at the beninning of the document.
- *
+ *
* @return a short description, or <code>null</code> if not available.
*/
String getDescription();
@@ -47,14 +47,14 @@ public interface ISearchEngineResult {
* object to denote the origin of the hit in the search domain. The usage of
* <code>IHelpResource</code> allows search result UI to create a link to
* the category.
- *
+ *
* @return a hit category or <code>null</code> if not available.
*/
IHelpResource getCategory();
/**
* Returns the URL (as a string) associated with this help resource.
- *
+ *
* @return the URL (as a string) associated with the resource
* <p>
* Valid URL of a help resource is:
@@ -83,7 +83,7 @@ public interface ISearchEngineResult {
* Returns a float number in the range between 0 and 1 that can be used to
* sort the hits by relevance (1 being the perfect result). The number can
* be interpreted as the probability of a match in the given topic.
- *
+ *
* @return the score of this hit between 0.0 and 1.0
*/
float getScore();
@@ -101,7 +101,7 @@ public interface ISearchEngineResult {
* opened in the external window. Instead, it indicates that the link should
* be opened using the current user preferences, which may always force
* external window for URL rendering.
- *
+ *
* @return <code>true</code> if external window must be used,
* <code>false</code> if the link opening mode can be chosen by
* the help system.
@@ -111,7 +111,7 @@ public interface ISearchEngineResult {
/**
* Converts a relative href into absolute according to the search engine
* base URL.
- *
+ *
* @param href
* the relative href to convert into absolute
* @param frames
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngineResult2.java b/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngineResult2.java
index 717194db4..0dabbd02f 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngineResult2.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/ISearchEngineResult2.java
@@ -3,7 +3,7 @@
* accompanying materials are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors: IBM Corporation - initial API and implementation
**************************************************************************************************/
package org.eclipse.help.search;
@@ -13,7 +13,7 @@ import java.net.URL;
/**
* An extension of the search result interface that allows engines to define engine result icon for
* each search result.
- *
+ *
* @since 3.2
*/
@@ -25,7 +25,7 @@ public interface ISearchEngineResult2 extends ISearchEngineResult {
* can optionally use this method to pass information on documents that are accessible via
* hashtables using a unique identifier. This method is typically used when the search result
* can open by itself.
- *
+ *
* @see #canOpen()
* @see ISearchEngine2#open(String)
* @return unique identifier associated with this search result or <code>null</code> if not
@@ -36,7 +36,7 @@ public interface ISearchEngineResult2 extends ISearchEngineResult {
/**
* Returns an optional URL of the 16x16 icon to be used to render this search result. If not
* provided, the icon for the engine will be used.
- *
+ *
* @return the URL of the icon to be used to render this search result or <code>null</code> to
* use the engine icon.
*/
@@ -44,7 +44,7 @@ public interface ISearchEngineResult2 extends ISearchEngineResult {
/**
* Tests whether this result's open action should be delegated to search engine.
- *
+ *
* @return <code>true</code> for engines that must open their results using non-standards
* means, or <code>false</code> for opening the result by the help system using the
* provided href.
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 398425e93..98cc519ee 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -18,13 +18,13 @@ import org.eclipse.core.runtime.IStatus;
* <p>
* This interface is intended to be implemented by clients and passed to the
* search engine instance.
- *
+ *
* @since 3.1
*/
public interface ISearchEngineResultCollector {
/**
* Accepts a new search result object.
- *
+ *
* @param searchResult
* the new search result
*/
@@ -32,7 +32,7 @@ public interface ISearchEngineResultCollector {
/**
* Accepts an array of new search results.
- *
+ *
* @param searchResults
* an array of search result objects
*/
@@ -45,7 +45,7 @@ public interface ISearchEngineResultCollector {
* to handle by throwing a <code>CoreException</code>. Use this method to
* report errors that are expected to occur from time to time (e.g., server
* down, server timeout, incorrect URL etc.).
- *
+ *
* @param status
* the reported error status
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/ISearchResult.java b/org.eclipse.help.base/src/org/eclipse/help/search/ISearchResult.java
index 0caac1de2..a5c0bca23 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/ISearchResult.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/ISearchResult.java
@@ -18,76 +18,76 @@ import org.eclipse.help.IToc;
/**
* This class holds information for a single Search Result
* @since 3.6
- *
+ *
*/
public interface ISearchResult {
-
+
/**
* Get the href of this search result topic
- *
+ *
* @return the href of this search result topic
*/
public String getHref();
-
+
/**
* Get the description of this search result topic
- *
+ *
* @return the description of this search result topic
*/
public String getDescription();
-
+
/**
* Gets a summary of this search result
- *
+ *
* @return a summary of this search result
*/
public String getSummary();
-
+
/**
* Gets the label for this search result
- *
+ *
* @return the label for this search result
*/
public String getLabel();
/**
* Gets the ID
- *
+ *
* @return the ID
*/
public String getId();
-
+
/**
* Gets the participant ID
- *
+ *
* @return the participant ID
*/
public String getParticipantId();
-
+
/**
* Gets the Icon for this topic
- *
+ *
* @return the Icon for this topic
*/
public URL getIcon();
-
+
/**
* Gets the score float value associated with this search result
- *
+ *
* @return the score float value associated with this search result
*/
public float getScore();
/**
* Gets the IToc parent of this result
- *
+ *
* @return the IToc parent of this result
*/
public IToc getToc();
-
+
/**
* Returns whether the result a potential hit
- *
+ *
* @return <code>true</code> if the result a potential hit, <code>false</code> otherwise
*/
public boolean isPotentialHit();
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 655b4a3cb..be705670f 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -13,10 +13,10 @@ 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
*/
public interface ISearchScope {
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipant.java b/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipant.java
index 621fb9299..c44b911d8 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipant.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipant.java
@@ -47,7 +47,7 @@ import org.osgi.framework.Bundle;
* are also responsible for opening these documents when asked because the help system will not be
* able to open them in any meaningful way. </li>
* </ol>
- *
+ *
* @since 3.5
*/
public abstract class SearchParticipant {
@@ -59,7 +59,7 @@ public abstract class SearchParticipant {
/**
* Initializes the participant with the unique identifier from the registry. The method is
* called by the help system - subclasses are not supposed to call it.
- *
+ *
* @param id
* the unique identifier of this participant
*/
@@ -70,7 +70,7 @@ public abstract class SearchParticipant {
/**
* Returns the unique identifier of this participant.
- *
+ *
* @return the unique id
*/
public final String getId() {
@@ -79,7 +79,7 @@ public abstract class SearchParticipant {
/**
* Adds the document to the search index.
- *
+ *
* @param index
* the abstract representation of the help index that is currently running. Indexing
* known file types in participants that manage documents outside the TOC can be
@@ -103,10 +103,10 @@ public abstract class SearchParticipant {
/**
* Returns all the documents that this participant knows about. This method is only used for
* participants that handle documents outside of the help system's TOC.
- *
+ *
* @param locale
* the index locale
- *
+ *
* @return a set<String> of hrefs for documents managed by this participant.
*/
public Set<String> getAllDocuments(String locale) {
@@ -116,7 +116,7 @@ public abstract class SearchParticipant {
/**
* Returns a set of identifiers of plug-ins that contribute indexable documents. This method is
* only used for participants that handle documents outside of the help system's TOC.
- *
+ *
* @return a set<String> of contributing plug-in ids
*/
@@ -126,7 +126,7 @@ public abstract class SearchParticipant {
/**
* A utility method that resolves a file name that contains '$'-based substitution variables.
- *
+ *
* @param pluginId
* the identifier of the originating plug-in
* @param fileName
@@ -150,7 +150,7 @@ public abstract class SearchParticipant {
/**
* A utility method that adds a title to the document.
- *
+ *
* @param title
* the title string
* @param doc
@@ -168,10 +168,10 @@ public abstract class SearchParticipant {
* the search results. The default implementation returns <code>false</code> indicating that
* the help system should open the document. In most cases this is wrong for most of XML files
* that are in some interesting way.
- *
+ *
* @param id
* a participant-specific identifier that completely represents a search result
- *
+ *
* @return <code>true</code> if the file has been opened correctly or <code>false</code> to
* allow the help system to try to open the document.
*/
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 fbf44353c..94747f3e3 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -36,7 +36,7 @@ import org.xml.sax.helpers.DefaultHandler;
/**
* An abstract search participants for adding XML documents to the search index. Subclass it
* and implement or override protected methods to handle parsing of the document.
- *
+ *
* @since 3.5
*/
public abstract class SearchParticipantXML extends SearchParticipant {
@@ -52,14 +52,14 @@ public abstract class SearchParticipantXML extends SearchParticipant {
/**
* Returns the locale of the index.
- *
+ *
* @return the locale string
*/
String getLocale();
/**
* Sets the title of the parsed document for indexing.
- *
+ *
* @param title
* the document title
*/
@@ -68,7 +68,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
/**
* Sets the optional summary of the parsed document that can be later rendered for the
* search hits.
- *
+ *
* @param summary
* the short document summary
*/
@@ -76,7 +76,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
/**
* Adds the text to the content buffer for indexing.
- *
+ *
* @param text
* the text to add to the document content buffer
*/
@@ -165,7 +165,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
/*
* (non-Javadoc)
- *
+ *
* @see org.xml.sax.helpers.DefaultHandler#startDocument()
*/
public void startDocument() throws SAXException {
@@ -174,7 +174,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
/*
* (non-Javadoc)
- *
+ *
* @see org.xml.sax.helpers.DefaultHandler#endDocument()
*/
public void endDocument() throws SAXException {
@@ -183,7 +183,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
/*
* (non-Javadoc)
- *
+ *
* @see org.xml.sax.helpers.DefaultHandler#processingInstruction(java.lang.String,
* java.lang.String)
*/
@@ -193,7 +193,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
/*
* (non-Javadoc)
- *
+ *
* @see org.xml.sax.helpers.DefaultHandler#characters(char[], int, int)
*/
public void characters(char[] characters, int start, int length) throws SAXException {
@@ -203,15 +203,15 @@ public abstract class SearchParticipantXML extends SearchParticipant {
for (int i = 0; i < length; i++) {
buff.append(characters[start + i]);
}
- String text = buff.toString();
+ String text = buff.toString();
if (text.trim().length() > 0)
handleText(text, data);
}
-
+
/*
* Note: throws clause does not declare IOException due to a bug in
* sun jdk: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6327149
- *
+ *
* @see org.xml.sax.helpers.DefaultHandler#resolveEntity(java.lang.String, java.lang.String)
*/
public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
@@ -221,7 +221,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
/**
* Called when the element has been started.
- *
+ *
* @param name
* the element name
* @param attributes
@@ -233,7 +233,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
/**
* Called when the element has been ended.
- *
+ *
* @param name
* the name of the XML element
* @param data
@@ -243,7 +243,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
/**
* Called when the XML document has been started.
- *
+ *
* @param data
* data the parser content data to update
*/
@@ -252,7 +252,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
/**
* Called when the XML document has been ended.
- *
+ *
* @param data
* data the parser content data to update
*/
@@ -261,7 +261,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
/**
* Called when a processing instruction has been encountered.
- *
+ *
* @param type
* the instruction data
* @param data
@@ -273,7 +273,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
/**
* Called when element body text has been encountered. Use 'getElementStackPath()' to determine
* the element in question.
- *
+ *
* @param text
* the body text
* @param data
@@ -281,7 +281,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
*/
protected abstract void handleText(String text, IParsedXMLContent data);
-
+
public IStatus addDocument(IHelpSearchIndex index, String pluginId,
String name, URL url, String id, ISearchDocument doc) {
InputStream stream = null;
@@ -325,7 +325,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
/**
* Returns the name of the element that is currently at the top of the element stack.
- *
+ *
* @return the name of the element that is currently at the top of the element stack
*/
@@ -335,7 +335,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
/**
* Returns the full path of the current element in the stack separated by the '/' character.
- *
+ *
* @return the path to the current element in the stack.
*/
protected String getElementStackPath() {
@@ -347,7 +347,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
}
return buf.toString();
}
-
+
/**
* <p>
* Pre-processes the given document input stream for the given document name and locale.
@@ -359,7 +359,7 @@ public abstract class SearchParticipantXML extends SearchParticipant {
* For performance, implementations that handle documents that do not support dynamic
* content should subclass and return the original stream.
* </p>
- *
+ *
* @param in the input stream for the document content
* @param name the name of the document as it appears in the index
* @param locale the locale code, e.g. "en_US"
diff --git a/org.eclipse.help.base/src/org/eclipse/help/search/SearchProcessorInfo.java b/org.eclipse.help.base/src/org/eclipse/help/search/SearchProcessorInfo.java
index d0543b187..6b85d1bca 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/search/SearchProcessorInfo.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/search/SearchProcessorInfo.java
@@ -13,7 +13,7 @@ package org.eclipse.help.search;
/**
* This class is a storage container for search processing
- *
+ *
* @since 3.6
*
*/
@@ -21,20 +21,20 @@ public class SearchProcessorInfo {
private String alternateTerms[] = null;
private String query = null;
-
+
/**
- * After {@link AbstractSearchProcessor#preSearch(String)} is called,
+ * After {@link AbstractSearchProcessor#preSearch(String)} is called,
* this method can be used to change the search query used.
- *
+ *
* @return new search query String, or <code>null</code> for no change.
*/
public String getQuery() {
return query;
}
-
+
/**
* Sets the query to search with.
- *
+ *
* @see #getQuery()
* @param query
*/
@@ -42,11 +42,11 @@ public class SearchProcessorInfo {
this.query = query;
}
- /**
- * After {@link AbstractSearchProcessor#preSearch(String)} is called,
+ /**
+ * After {@link AbstractSearchProcessor#preSearch(String)} is called,
* this method can be used to return an array of alternative search terms
* a user may wish to consider.
- *
+ *
* @return String[] of alternate terms, or <code>null</code> for no alternate terms.
* An empty array has the same effect as returning <code>null</code>.
*/
@@ -56,12 +56,12 @@ public class SearchProcessorInfo {
/**
* Sets the alternate terms to be considered.
- *
+ *
* @see #getAlternateTerms()
* @param alternateTerms
*/
public void setAlternateTerms(String[] alternateTerms) {
this.alternateTerms = alternateTerms;
}
-
+
}
diff --git a/org.eclipse.help.base/src/org/eclipse/help/server/HelpServer.java b/org.eclipse.help.base/src/org/eclipse/help/server/HelpServer.java
index 1a2c98673..db6eb7cf8 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/server/HelpServer.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/server/HelpServer.java
@@ -16,16 +16,16 @@ import org.eclipse.core.runtime.CoreException;
* @since 3.4
* Abstract class representing a web server which can be used to host the Eclipse help
* system using the extension point org.eclipse.help.base.server. Classes extending this
- * abstract class must be capable of launching a Web Server and
+ * abstract class must be capable of launching a Web Server and
*/
public abstract class HelpServer {
-
+
/**
- * Start a server application to host the Eclipse help system. The server is
+ * Start a server application to host the Eclipse help system. The server is
* responsible for initializing the servlets, jsp files and other resources
* for the help system as defined by the extension points <code>org.eclipse.equinox.http.registry.resources</code>
- * and <code>org.eclipse.equinox.http.registry.servlets</code> for the httpcontextId
+ * and <code>org.eclipse.equinox.http.registry.servlets</code> for the httpcontextId
* <code>org.eclipse.help.webapp.help</code>
* @param webappName The name of this web application
* @throws Exception
@@ -48,7 +48,7 @@ public abstract class HelpServer {
/**
* Returns the host name or ip the app server runs on.
- *
+ *
* @return String representation of host name of IP, null if server not
* started yet
*/
diff --git a/org.eclipse.help.base/src/org/eclipse/help/standalone/Help.java b/org.eclipse.help.base/src/org/eclipse/help/standalone/Help.java
index d6a722039..e23515026 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/standalone/Help.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/standalone/Help.java
@@ -20,7 +20,7 @@ import org.eclipse.help.internal.standalone.*;
* its help system implementation, and controling it. This class can be
* instantiated and used in a Java program, or can be launched from command line
* to execute single help action.
- *
+ *
* Usage as a Java component:
* <ul>
* <li>create an instantance of this class and then hold onto this instance for
@@ -35,7 +35,7 @@ public class Help {
/**
* Constructs help system
- *
+ *
* @param options
* array of String options and their values
* <p>
@@ -64,7 +64,7 @@ public class Help {
}
/**
* This contstructs the stand alone help.
- *
+ *
* @param pluginsDir
* directory containing Eclipse plugins
* @deprecated use Help#Help(String[])
@@ -103,7 +103,7 @@ public class Help {
/**
* Displays specified help resource.
- *
+ *
* @param href
* the href of the table of contents
*/
@@ -113,7 +113,7 @@ public class Help {
/**
* Displays context sensitive help.
- *
+ *
* @param contextId
* context id
* @param x
@@ -127,7 +127,7 @@ public class Help {
/**
* Displays context sensitive help in infopop.
- *
+ *
* @param contextId
* context id
* @param x
@@ -142,7 +142,7 @@ public class Help {
/**
* Controls standalone help system from command line.
- *
+ *
* @param args
* array of String containing options Options are:
* <code>-command start | shutdown | (displayHelp [href]) [-eclipsehome eclipseInstallPath] [-host helpServerHost] [-port helpServerPort] [-dir rtl] [platform options] [-vmargs JavaVMarguments]</code>
diff --git a/org.eclipse.help.base/src/org/eclipse/help/standalone/Infocenter.java b/org.eclipse.help.base/src/org/eclipse/help/standalone/Infocenter.java
index 5875b46c1..cc025f201 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/standalone/Infocenter.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/standalone/Infocenter.java
@@ -16,7 +16,7 @@ import org.eclipse.help.internal.standalone.*;
* This is a standalone infocenter. It takes care of launching the Eclipse with
* its help system implementation. This class can be instantiated and used in a
* Java program, or can be launched from command line.
- *
+ *
* Usage as a Java component:
* <ul>
* <li>create an instantance of this class</li>
@@ -28,7 +28,7 @@ public class Infocenter {
private StandaloneInfocenter infocenter;
/**
* Constructs Infocenter
- *
+ *
* @param options
* array of String options and their values
* <p>
@@ -72,7 +72,7 @@ public class Infocenter {
}
/**
* Controls start up and shut down of infocenter from command line.
- *
+ *
* @param args
* array of String containing options Options are:
* <code>-command start | shutdown [-eclipsehome eclipseInstallPath] [-host helpServerHost] [-port helpServerPort] [-dir rtl] [-noexec] [platform options] [-vmargs JavaVMarguments]</code>
diff --git a/org.eclipse.help.base/src_ant/org/eclipse/help/internal/base/ant/BuildHelpIndex.java b/org.eclipse.help.base/src_ant/org/eclipse/help/internal/base/ant/BuildHelpIndex.java
index 8ac9cacdc..89df38020 100644
--- a/org.eclipse.help.base/src_ant/org/eclipse/help/internal/base/ant/BuildHelpIndex.java
+++ b/org.eclipse.help.base/src_ant/org/eclipse/help/internal/base/ant/BuildHelpIndex.java
@@ -26,7 +26,7 @@ import org.eclipse.help.search.HelpIndexBuilder;
/**
* A custom Ant task to pre-build search help index for a plug-in from within an
* Ant script.
- *
+ *
* @since 3.1
*/
@@ -45,7 +45,7 @@ public class BuildHelpIndex extends Task {
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.tools.ant.Task#execute()
*/
public void execute() throws BuildException {
@@ -61,7 +61,7 @@ public class BuildHelpIndex extends Task {
IProgressMonitor monitor = (IProgressMonitor) getProject()
.getReferences().get(AntCorePlugin.ECLIPSE_PROGRESS_MONITOR);
if (monitor == null)
- monitor = new NullProgressMonitor();
+ monitor = new NullProgressMonitor();
try {
builder.execute(monitor);
} catch (CoreException e) {
@@ -102,7 +102,7 @@ public class BuildHelpIndex extends Task {
* that contains <code>org.eclipse.help.toc</code> extensions. If help
* docs that need to be indexed are in the fragment, manifest must point at
* the referenced fragment plug-in.
- *
+ *
* @param manifest
* the plug-in manifest file
*/
@@ -117,7 +117,7 @@ public class BuildHelpIndex extends Task {
* index directory name to the destination. For example, for index directory
* name defined as 'index', and for ja_Jp locale, the index data will be
* created in 'destination/nl/ja/Jp/index'.
- *
+ *
* @param destination
* the base directory of the search index destination (typically
* plug-in or fragment root directory)
diff --git a/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/HTMLParser.java b/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/HTMLParser.java
index e04105c82..16a51c681 100644
--- a/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/HTMLParser.java
+++ b/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/HTMLParser.java
@@ -83,7 +83,7 @@ InterruptedException {
}
return summary.toString().trim();
}
-
+
public Reader getReader() throws IOException {
return new CharArrayReader(writer.toCharArray());
}
@@ -142,9 +142,9 @@ InterruptedException {
metaTags.setProperty(currentMetaTag, currentMetaContent);
if (currentMetaTag.equalsIgnoreCase("keywords") || //$NON-NLS-1$
currentMetaTag.equalsIgnoreCase("description")) { //$NON-NLS-1$
- writer.write(' ');
+ writer.write(' ');
writer.write(currentMetaContent);
- writer.write(' ');
+ writer.write(' ');
}
currentMetaTag = null;
currentMetaContent = null;
@@ -573,7 +573,7 @@ null)
throw generateParseException();
}
- static private final class LookaheadSuccess extends java.lang.Error {
+ static private final class LookaheadSuccess extends java.lang.Error {
private static final long serialVersionUID = 1L;
}
final private LookaheadSuccess jj_ls = new LookaheadSuccess();
diff --git a/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/HTMLParserTokenManager.java b/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/HTMLParserTokenManager.java
index 34af937f3..ceb0818e7 100644
--- a/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/HTMLParserTokenManager.java
+++ b/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/HTMLParserTokenManager.java
@@ -116,7 +116,7 @@ private final int jjMoveStringLiteralDfa1_0(long active0)
private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(0, old0);
+ return jjStartNfa_0(0, old0);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(1, active0);
@@ -136,7 +136,7 @@ private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(1, old0);
+ return jjStartNfa_0(1, old0);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(2, active0);
@@ -158,7 +158,7 @@ private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(2, old0);
+ return jjStartNfa_0(2, old0);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(3, active0);
@@ -176,7 +176,7 @@ private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(3, old0);
+ return jjStartNfa_0(3, old0);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(4, active0);
@@ -194,7 +194,7 @@ private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(4, old0);
+ return jjStartNfa_0(4, old0);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(5, active0);
@@ -1033,7 +1033,7 @@ private final int jjMoveStringLiteralDfa1_6(long active0)
private final int jjMoveStringLiteralDfa2_6(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
- return jjStartNfa_6(0, old0);
+ return jjStartNfa_6(0, old0);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_6(1, active0);
@@ -1458,8 +1458,8 @@ private final int jjMoveNfa_2(int startState, int curPos)
}
}
static final int[] jjnextStates = {
- 26, 27, 30, 18, 20, 22, 5, 8, 0, 4, 6, 0, 4, 6, 5, 0,
- 4, 6, 3, 4,
+ 26, 27, 30, 18, 20, 22, 5, 8, 0, 4, 6, 0, 4, 6, 5, 0,
+ 4, 6, 3, 4,
};
private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
{
@@ -1467,7 +1467,7 @@ private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, lo
{
case 0:
return ((jjbitVec2[i2] & l2) != 0L);
- default :
+ default :
if ((jjbitVec0[i1] & l1) != 0L)
return true;
return false;
@@ -1488,14 +1488,14 @@ public static final String[] lexStateNames = {
"WithinComment2", //$NON-NLS-1$
};
public static final int[] jjnewLexState = {
- -1, 1, 2, 2, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 3, 0, 2, 4, 5, -1, -1, 2,
- -1, 2, -1, 0, -1, 0,
+ -1, 1, 2, 2, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 3, 0, 2, 4, 5, -1, -1, 2,
+ -1, 2, -1, 0, -1, 0,
};
static final long[] jjtoToken = {
- 0x7fbff47fL,
+ 0x7fbff47fL,
};
static final long[] jjtoSkip = {
- 0x400000L,
+ 0x400000L,
};
protected SimpleCharStream input_stream;
private final int[] jjrounds = new int[34];
@@ -1557,20 +1557,20 @@ int jjround;
int jjmatchedPos;
int jjmatchedKind;
-public Token getNextToken()
+public Token getNextToken()
{
Token matchedToken;
int curPos = 0;
EOFLoop :
for (;;)
- {
- try
- {
+ {
+ try
+ {
curChar = input_stream.BeginToken();
- }
+ }
catch(java.io.IOException e)
- {
+ {
jjmatchedKind = 0;
matchedToken = jjFillToken();
return matchedToken;
diff --git a/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/ParseException.java b/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/ParseException.java
index 513d68b3f..42ca4ee06 100644
--- a/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/ParseException.java
+++ b/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/ParseException.java
@@ -123,7 +123,7 @@ public class ParseException extends Exception {
break;
}
retval += add_escapes(tok.image);
- tok = tok.next;
+ tok = tok.next;
}
retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; //$NON-NLS-1$ //$NON-NLS-2$
retval += "." + eol; //$NON-NLS-1$
@@ -140,7 +140,7 @@ public class ParseException extends Exception {
* The end of line string for this machine.
*/
protected String eol = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-
+
/**
* Used to convert raw characters to their escaped version
* when these raw version cannot be used as part of an ASCII
diff --git a/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/SimpleCharStream.java b/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/SimpleCharStream.java
index bdbb382c8..c0941d06e 100644
--- a/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/SimpleCharStream.java
+++ b/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/SimpleCharStream.java
@@ -199,7 +199,7 @@ public class SimpleCharStream
}
/**
- * @deprecated
+ * @deprecated
* @see #getEndColumn
*/
@@ -208,7 +208,7 @@ public class SimpleCharStream
}
/**
- * @deprecated
+ * @deprecated
* @see #getEndLine
*/
@@ -416,7 +416,7 @@ public class SimpleCharStream
bufcolumn[j] = newCol + columnDiff;
columnDiff = nextColDiff;
i++;
- }
+ }
if (i < len)
{
diff --git a/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/TokenMgrError.java b/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/TokenMgrError.java
index 2932a14f6..7f66878f0 100644
--- a/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/TokenMgrError.java
+++ b/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/TokenMgrError.java
@@ -3,7 +3,7 @@ package org.apache.lucene.demo.html;
public class TokenMgrError extends Error
{
-
+
private static final long serialVersionUID = 1L;
/*
@@ -88,7 +88,7 @@ public class TokenMgrError extends Error
/**
* Returns a detailed message for the Error when it is thrown by the
* token manager to indicate a lexical error.
- * Parameters :
+ * Parameters :
* EOFSeen : indicates if EOF caused the lexicl error
* curLexState : lexical state in which this error occured
* errorLine : line number when the error occured
@@ -108,7 +108,7 @@ public class TokenMgrError extends Error
/**
* You can also modify the body of this method to customize your error messages.
* For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
- * of end-users concern, so you can return something like :
+ * of end-users concern, so you can return something like :
*
* "Internal Error : Please file a bug report .... "
*

Back to the top