Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2017-01-04 18:15:03 +0000
committerAndrey Loskutov2017-01-04 18:24:07 +0000
commit8abfce119e3408a32d261fcce5da53387320e5c4 (patch)
tree5614a24a8b868c21f5d693910da26fdfe8426225 /org.eclipse.help.ui
parent680afa3b0b468c98737bb31e79cd9d2349cf508f (diff)
downloadeclipse.platform.ua-8abfce119e3408a32d261fcce5da53387320e5c4.tar.gz
eclipse.platform.ua-8abfce119e3408a32d261fcce5da53387320e5c4.tar.xz
eclipse.platform.ua-8abfce119e3408a32d261fcce5da53387320e5c4.zip
forever Applied Cleanup-> Remove trailing spaces on all help projects. Only those four projects had whitespace issues: org.eclipse.help.ui, org.eclipse.ui.intro.quicklinks, org.eclipse.ui.intro.universal, org.eclipse.ui.intro. Same four projects haven't automatic save actions enabled, therefore I've updated the settings too. Change-Id: If7f896ab4ceb6587af6f211057729f443fd016cb Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'org.eclipse.help.ui')
-rw-r--r--org.eclipse.help.ui/.settings/org.eclipse.jdt.ui.prefs6
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/IEngineDescriptor.java20
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/ISearchScopeFactory.java6
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/ISearchScopePage.java6
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/RootScopePage.java24
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/browser/LaunchURL.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/CloseHelpTrayHandler.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java16
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DefaultHelpUI.java24
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DynamicHelpAction.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ExecuteCommandAction.java8
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpActivitySupport.java14
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIEvaluationContext.java4
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIPlugin.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIResources.java64
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HyperlinkHandler.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HyperlinkLabel.java4
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHelpUIConstants.java14
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHyperlinkListener.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.java22
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/SearchAction.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ShowCapabilitiesPreferenceAction.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ShowInTocAction.java6
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java18
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserAdapter.java10
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserFactory.java4
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/IBrowserCloseListener.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/dynamic/FilterResolverExtension.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/OpenBundleResourceHandler.java10
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/ShowIndexHandler.java14
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java52
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpPreferencePage.java52
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/IC.java32
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICButtons.java72
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICDialog.java58
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICPreferences.java62
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICTable.java72
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/TabFolderLayout.java16
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaContentProvider.java30
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaLabelProvider.java4
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpWorkingSetElementLabelProvider.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpWorkingSetTreeContentProvider.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterPage.java20
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterSearchScopeFactory.java4
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java36
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalSearchScopeFactory.java4
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/WebSearchPage.java4
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/WebSearchScopeFactory.java6
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/AbstractOverlayIcon.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/ErrorUtil.java6
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/EscapeUtils.java12
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/FontUtils.java8
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/OverlayIcon.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/AllTopicsPart.java14
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BookmarkHeaderPart.java12
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BookmarksPart.java10
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java36
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/Chevron.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ComboPart.java12
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.java42
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpProviderInput.java6
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpSorter.java6
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/DynamicHelpPart.java38
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptor.java8
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptorManager.java22
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeDescriptor.java14
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeWizardPage.java8
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/FederatedSearchSorter.java4
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpTray.java50
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpView.java22
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpviewProtocol.java4
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HistoryEntry.java4
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HistoryScopeSet.java12
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HyperlinkTreePart.java16
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IHelpPart.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IHelpPartPage.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexPart.java18
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexTypeinPart.java6
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/LocalScopeDialog.java8
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/MissingContentPart.java32
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/NewEngineWizard.java2
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RelatedTopicsPart.java16
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RenameDialog.java32
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java102
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPartHistory.java8
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceDialog.java20
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceManager.java16
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSelectPart.java30
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSet.java24
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetDialog.java86
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetManager.java8
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeState.java12
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java24
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchResultsPart.java22
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SeeAlsoPart.java20
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SorterByScore.java2
96 files changed, 853 insertions, 853 deletions
diff --git a/org.eclipse.help.ui/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.help.ui/.settings/org.eclipse.jdt.ui.prefs
index 0fb87bc39..eb4d0b3d9 100644
--- a/org.eclipse.help.ui/.settings/org.eclipse.jdt.ui.prefs
+++ b/org.eclipse.help.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -28,7 +28,7 @@ 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=false
+sp_cleanup.on_save_use_additional_actions=true
sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
@@ -37,12 +37,12 @@ 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=false
+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=true
sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_imports=true
sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/IEngineDescriptor.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/IEngineDescriptor.java
index 86ecf00f8..d17d32b9f 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/IEngineDescriptor.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/IEngineDescriptor.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,17 +20,17 @@ import java.util.Dictionary;
* description changed.
* <p>
* This interface is not intended to be extended or implemented by clients.
- *
+ *
* @since 3.1
* @noimplement This interface is not intended to be implemented by clients.
* @noextend This interface is not intended to be extended by clients.
- *
+ *
*/
public interface IEngineDescriptor {
/**
* Returns the unique identifier of this engine instance.
- *
+ *
* @return the unique engine identifier
*/
String getId();
@@ -38,14 +38,14 @@ public interface IEngineDescriptor {
/**
* Returns the unique identifier of the engine type of which this is an
* instance.
- *
+ *
* @return the engine type identifier
*/
String getEngineTypeId();
/**
* Returns the label of this engine for rendering in the UI.
- *
+ *
* @return the engine label
*/
String getLabel();
@@ -53,7 +53,7 @@ public interface IEngineDescriptor {
/**
* Changes the label of this engine. This method does nothing for engine
* descriptors that are not user-defined.
- *
+ *
* @param label
* the new engine label
*/
@@ -69,7 +69,7 @@ public interface IEngineDescriptor {
/**
* Changes the description of this engine. This method does nothing for
* engine descriptors that are not user-defined.
- *
+ *
* @param desc
* the new engine description
*/
@@ -78,7 +78,7 @@ public interface IEngineDescriptor {
/**
* Returns the parameters used to configure this engine according to the
* valid parameters for the associated engine type.
- *
+ *
* @return the parameter dictionary
*/
Dictionary<String, Object> getParameters();
@@ -87,7 +87,7 @@ public interface IEngineDescriptor {
* Tests whether this engine is provided as an extension point contribution
* or is created by the user in the scope settings dialog. Only user-defined
* engine instances can have their label and/or description changed.
- *
+ *
* @return <code>true</code> if the engine is user defined, or
* <code>false</code> otherwise.
*/
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/ISearchScopeFactory.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/ISearchScopeFactory.java
index 23ed7f773..3a1fd4c29 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/ISearchScopeFactory.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/ISearchScopeFactory.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
*******************************************************************************/
@@ -22,7 +22,7 @@ import org.eclipse.jface.preference.IPreferenceStore;
* engines. Search engine and scope factory are defined together in the same
* extension point, hence the actual implementation of ISearchScope is up to the
* contributor.
- *
+ *
* @since 3.1
*/
public interface ISearchScopeFactory {
@@ -35,7 +35,7 @@ public interface ISearchScopeFactory {
* In cases where conflicting values can be found in the preference store
* and parameters, preference store should win i.e. parameters should be
* treated as default values only.
- *
+ *
* @param store
* the preference store that holds the scope data
* @param engineId
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/ISearchScopePage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/ISearchScopePage.java
index b357e4b68..a8e965d05 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/ISearchScopePage.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/ISearchScopePage.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,13 +15,13 @@ import org.eclipse.jface.preference.IPreferencePage;
/**
* Preference pages that are used for editing help search scope settings should
* implement this interface.
- *
+ *
* @since 3.1
*/
public interface ISearchScopePage extends IPreferencePage {
/**
* Initializes the search scope page.
- *
+ *
* @param ed
* the descriptor of the engine associated with this page
* @param scopeSetName
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/RootScopePage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/RootScopePage.java
index a057b8e75..f5ce05196 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/RootScopePage.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/RootScopePage.java
@@ -4,10 +4,10 @@
* 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
- * Alex Blewitt - Bug 474070
+ * Alex Blewitt - Bug 474070
*******************************************************************************/
package org.eclipse.help.ui;
@@ -37,7 +37,7 @@ import org.eclipse.ui.PlatformUI;
* engine name, image and description, as well as the master switch that turns
* the engine on or off. When the engine master switch is set to false, all the
* children in the client composite will be disabled.
- *
+ *
* @since 3.1
*/
public abstract class RootScopePage extends PreferencePage implements
@@ -74,7 +74,7 @@ public abstract class RootScopePage extends PreferencePage implements
* Creates the initial contents of the page and allocates the area for the
* clients. Classes that extend this class should implement
* <code>createScopeContents(Composite)</code> instead.
- *
+ *
* @param parent
* the page parent
* @return the page client control
@@ -89,7 +89,7 @@ public abstract class RootScopePage extends PreferencePage implements
GridData gd;
//if (ed.isUserDefined())
layout.numColumns = 2;
- contentContainer.setLayout(layout);
+ contentContainer.setLayout(layout);
if (isInPreferenceDialog()) {
masterButton = new Button(contentContainer, SWT.CHECK);
masterButton.setText(Messages.RootScopePage_masterButton);
@@ -153,7 +153,7 @@ public abstract class RootScopePage extends PreferencePage implements
* Called when the value of the master switch has changed. The default
* implementation disables the scope contents control when the master switch
* is off. Subclass can override this behaviour.
- *
+ *
* @param value
* <code>true</code> if the master switch is on,
* <code>false</code> otherwise.
@@ -185,7 +185,7 @@ public abstract class RootScopePage extends PreferencePage implements
/**
* Returns the scope set name passed to the page during initialization.
- *
+ *
* @return the name of the current scope set
*/
@@ -195,7 +195,7 @@ public abstract class RootScopePage extends PreferencePage implements
/**
* Returns the descriptor of the engine associated with this page.
- *
+ *
* @return the engine descriptor
*/
@@ -206,7 +206,7 @@ public abstract class RootScopePage extends PreferencePage implements
/**
* Tests whether the search engine has been selected to participate in the
* search.
- *
+ *
* @return <code>true</code> if the search engine is enabled, </code>false</code>
* otherwise.
*/
@@ -221,7 +221,7 @@ public abstract class RootScopePage extends PreferencePage implements
/**
* Stores the value of the master switch in the preference store. Subclasses
* may override but must call 'super'.
- *
+ *
* @return <code>true</code> if the wizard can be closed,
* <code>false</code> otherwise.
*/
@@ -270,7 +270,7 @@ public abstract class RootScopePage extends PreferencePage implements
/**
* Initializes default values of the store to be used when the user presses
* 'Defaults' button. Subclasses may override but must call 'super'.
- *
+ *
* @param store
* the preference store
*/
@@ -293,7 +293,7 @@ public abstract class RootScopePage extends PreferencePage implements
* need for themselves only. Clients that implement this method should
* return the required number of columns so that the root page widgets can
* be adjusted if more columns are needed than initially set.
- *
+ *
* @param parent
* the page parent
* @return number of columns required by the client content
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/browser/LaunchURL.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/browser/LaunchURL.java
index 1824266bd..9f92faa30 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/browser/LaunchURL.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/browser/LaunchURL.java
@@ -81,7 +81,7 @@ public class LaunchURL implements IWorkbenchWindowActionDelegate,
} catch (Exception e) {
HelpUIPlugin.logError("Exception occurred when opening URL: " + url //$NON-NLS-1$
+ ".", e); //$NON-NLS-1$
- ErrorUtil.displayErrorDialog(Messages.LaunchURL_exception);
+ ErrorUtil.displayErrorDialog(Messages.LaunchURL_exception);
}
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/CloseHelpTrayHandler.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/CloseHelpTrayHandler.java
index 9b6621bc7..71fd47748 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/CloseHelpTrayHandler.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/CloseHelpTrayHandler.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.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java
index 4cbfde99b..a38bdaa97 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.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
*******************************************************************************/
@@ -86,7 +86,7 @@ public class ContextHelpDialog {
/**
* Constructor:
- *
+ *
* @param context
* an array of String or an array of IContext
* @param x
@@ -167,7 +167,7 @@ public class ContextHelpDialog {
// Correct x and y of the shell if it not contained within the screen
int width = shell.getBounds().width;
int height = shell.getBounds().height;
-
+
Rectangle screen = display.getClientArea();
// check lower boundaries
x = x >= screen.x ? x : screen.x;
@@ -212,7 +212,7 @@ public class ContextHelpDialog {
}
return contents;
}
-
+
private Control createInfoArea(Composite parent) {
// Create the text field.
String styledText = null;
@@ -222,7 +222,7 @@ public class ContextHelpDialog {
if (styledText == null && context.getText() != null) {
styledText = context.getText();
styledText= styledText.replaceAll("<b>","<@#\\$b>"); //$NON-NLS-1$ //$NON-NLS-2$
- styledText= styledText.replaceAll("</b>", "</@#\\$b>"); //$NON-NLS-1$ //$NON-NLS-2$
+ styledText= styledText.replaceAll("</b>", "</@#\\$b>"); //$NON-NLS-1$ //$NON-NLS-2$
}
if (styledText == null) { // no description found in context objects.
styledText = Messages.ContextHelpPart_noDescription;
@@ -256,7 +256,7 @@ public class ContextHelpDialog {
/**
* Measures the longest label of related links
- *
+ *
* @param text
* @return
*/
@@ -343,7 +343,7 @@ public class ContextHelpDialog {
// create link to the dynamic help
createDynamicHelpLink(composite);
}
-
+
return composite;
}
@@ -388,7 +388,7 @@ public class ContextHelpDialog {
&& !Constants.OS_WIN32.equalsIgnoreCase(Platform
.getOS()));
}
-
+
private void openDynamicHelp() {
BusyIndicator.showWhile(shell.getDisplay(), () -> {
close();
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DefaultHelpUI.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DefaultHelpUI.java
index d1355cc74..67a8abd07 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DefaultHelpUI.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DefaultHelpUI.java
@@ -4,9 +4,9 @@
* 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
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
* Sebastian Davids <sdavids@gmx.de> - bug 93374
**************************************************************************************************/
package org.eclipse.help.ui.internal;
@@ -228,14 +228,14 @@ public class DefaultHelpUI extends AbstractHelpUI {
}
}
}
-
+
public static void showIndex() {
HelpView helpView = getHelpView();
if (helpView != null) {
helpView.showIndex();
}
}
-
+
private static HelpView getHelpView() {
HelpView view = null;
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
@@ -251,7 +251,7 @@ public class DefaultHelpUI extends AbstractHelpUI {
}
} catch (PartInitException e) {
}
- }
+ }
}
return view;
}
@@ -285,7 +285,7 @@ public class DefaultHelpUI extends AbstractHelpUI {
/**
* Displays context-sensitive help for specified context
- *
+ *
* @param context
* the context to display
* @param x
@@ -341,7 +341,7 @@ public class DefaultHelpUI extends AbstractHelpUI {
if (isSingleChoiceWithoutDescription) {
view.showHelp(topics[0].getHref());
} else {
- view.displayContext(context, activePart, c);
+ view.displayContext(context, activePart, c);
}
}
}
@@ -373,7 +373,7 @@ public class DefaultHelpUI extends AbstractHelpUI {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.help.AbstractHelpUI#resolve(java.lang.String, boolean)
*/
private static Shell getActiveShell() {
@@ -415,7 +415,7 @@ public class DefaultHelpUI extends AbstractHelpUI {
private void displayContextAsHelpTray(Shell activeShell, IContext context) {
Control controlInFocus = activeShell.getDisplay().getFocusControl();
TrayDialog dialog = (TrayDialog)activeShell.getData();
-
+
DialogTray tray = dialog.getTray();
if (tray == null) {
tray = new HelpTray();
@@ -488,7 +488,7 @@ public class DefaultHelpUI extends AbstractHelpUI {
}
return false;
}
-
+
public static boolean showInWorkbenchBrowser(String url, boolean onlyInternal) {
IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
if (!onlyInternal || support.isInternalWebBrowserAvailable()) {
@@ -512,7 +512,7 @@ public class DefaultHelpUI extends AbstractHelpUI {
/*
* Used to indicate to the HelpView that we are about to pass in a context
*/
-
+
public static boolean isOpeningHelpView() {
return openingHelpView;
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DynamicHelpAction.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DynamicHelpAction.java
index 0f6e22d60..16dcad9af 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DynamicHelpAction.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/DynamicHelpAction.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.ui/src/org/eclipse/help/ui/internal/ExecuteCommandAction.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ExecuteCommandAction.java
index b5b76aff3..8a03d1462 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ExecuteCommandAction.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ExecuteCommandAction.java
@@ -28,7 +28,7 @@ import org.eclipse.ui.handlers.IHandlerService;
* service. This class is intended to be called by the
* <code>executeCommand</code> function in <code>livehelp.js</code> (defined
* in <code>org.eclipse.help</code> plugin).
- *
+ *
* @since 3.2
*/
public class ExecuteCommandAction implements ILiveHelpAction {
@@ -51,7 +51,7 @@ public class ExecuteCommandAction implements ILiveHelpAction {
// No command to execute!
return;
}
-
+
// workaround problem described in https://bugs.eclipse.org/bugs/show_bug.cgi?id=133694
// by making sure we can get the workbench before running the command. In standalone
// help mode the attempt to get the workbench will fail and we will show an error dialog.
@@ -74,7 +74,7 @@ public class ExecuteCommandAction implements ILiveHelpAction {
});
}
-
+
/**
* This was introduced to work around the behavior described in
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=130206
@@ -125,7 +125,7 @@ public class ExecuteCommandAction implements ILiveHelpAction {
}
private IHandlerService getHandlerService() {
- IWorkbench wb = PlatformUI.getWorkbench();
+ IWorkbench wb = PlatformUI.getWorkbench();
if (wb != null) {
Object serviceObject = wb.getAdapter(IHandlerService.class);
if (serviceObject != null) {
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpActivitySupport.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpActivitySupport.java
index b93bc637e..aefe7d6b7 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpActivitySupport.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpActivitySupport.java
@@ -43,16 +43,16 @@ public class HelpActivitySupport implements IHelpActivitySupport {
private boolean userCanToggleFiltering;
private boolean filteringEnabled;
private ActivityDescriptor activityDescriptor;
-
+
class ActivityDescriptor {
private IConfigurationElement config;
private String documentMessage;
private boolean needsLiveHelp;
-
+
public ActivityDescriptor() {
load();
}
-
+
private void load() {
IConfigurationElement [] elements = Platform.getExtensionRegistry().getConfigurationElementsFor("org.eclipse.help.base.activitySupport");//$NON-NLS-1$
if (elements.length==1 && elements[0].getName().equals("support")) //$NON-NLS-1$
@@ -60,7 +60,7 @@ public class HelpActivitySupport implements IHelpActivitySupport {
else if (elements.length>0) {
IProduct product = Platform.getProduct();
if (product==null) return;
- String productId = product.getId();
+ String productId = product.getId();
for (int i=0; i<elements.length; i++) {
IConfigurationElement element = elements[i];
if (element.getAttribute("productId").equals(productId)) { //$NON-NLS-1$
@@ -113,13 +113,13 @@ public class HelpActivitySupport implements IHelpActivitySupport {
return "javascript:liveAction(\""+pluginId+"\", \""+className+"\",\""+evalue+"\")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
}
-
+
public HelpActivitySupport(IWorkbench workbench) {
activitySupport = workbench.getActivitySupport();
activityDescriptor = new ActivityDescriptor();
- String showDisabledActivities =
+ String showDisabledActivities =
Platform.getPreferencesService().getString(HelpBasePlugin.PLUGIN_ID, PREF_KEY_SHOW_DISABLED_ACTIVITIES, "", null); //$NON-NLS-1$
userCanToggleFiltering = SHOW_DISABLED_ACTIVITIES_OFF
.equalsIgnoreCase(showDisabledActivities)
@@ -185,7 +185,7 @@ public class HelpActivitySupport implements 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
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIEvaluationContext.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIEvaluationContext.java
index 5f67a79d6..1efa79aeb 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIEvaluationContext.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIEvaluationContext.java
@@ -23,9 +23,9 @@ public final class HelpUIEvaluationContext {
private static final String VARIABLE_PLATFORM = "platform"; //$NON-NLS-1$
private static final String VARIABLE_WORKBENCH = "workbench"; //$NON-NLS-1$
-
+
private static EvaluationContext context;
-
+
/*
* Returns the evaluation context to use in help documents.
*/
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIPlugin.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIPlugin.java
index 7379ce59a..10d2aaff1 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIPlugin.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIPlugin.java
@@ -60,7 +60,7 @@ public class HelpUIPlugin extends AbstractUIPlugin {
/**
* Provides access to singleton
- *
+ *
* @return HelpUIPlugin
*/
public static HelpUIPlugin getDefault() {
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIResources.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIResources.java
index 851ea0fa4..3bba3716a 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIResources.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HelpUIResources.java
@@ -26,18 +26,18 @@ import org.osgi.framework.Bundle;
* class needs to properly use the desired locale.
*/
public class HelpUIResources {
-
+
private static final String LEAF = "_leaf"; //$NON-NLS-1$
private static final String CLOSED = "_closed"; //$NON-NLS-1$
private static final String OPEN = "_open"; //$NON-NLS-1$
- private static final String EXT_PT = "org.eclipse.help.toc"; //$NON-NLS-1$
+ private static final String EXT_PT = "org.eclipse.help.toc"; //$NON-NLS-1$
private static final String TOC_ICON_ELEMENT = "tocIcon"; //$NON-NLS-1$
private static final String TOC_ICON_ID = "id"; //$NON-NLS-1$
private static final String OPEN_ICON_PATH = "openIcon"; //$NON-NLS-1$
private static final String CLOSED_ICON_PATH = "closedIcon"; //$NON-NLS-1$
private static final String LEAF_ICON_PATH= "leafIcon"; //$NON-NLS-1$
private static boolean iconsInitialized = false;
-
+
/**
* WorkbenchResources constructor comment.
*/
@@ -51,7 +51,7 @@ public class HelpUIResources {
IPath path = new Path("$nl$/icons/").append(name); //$NON-NLS-1$
return FileLocator.find(HelpUIPlugin.getDefault().getBundle(), path, null);
}
-
+
/**
* Returns an image descriptor from a property file
* @param name simple image file name
@@ -68,29 +68,29 @@ public class HelpUIResources {
}
return desc;
}
-
+
public static ImageDescriptor getImageDescriptor(String bundleId, String name) {
- ImageRegistry registry = HelpUIPlugin.getDefault().getImageRegistry();
+ ImageRegistry registry = HelpUIPlugin.getDefault().getImageRegistry();
ImageDescriptor desc = registry.getDescriptor(name);
if (desc==null) {
Bundle bundle = Platform.getBundle(bundleId);
if (bundle==null) return null;
- URL url = FileLocator.find(bundle, new Path(name), null);
+ URL url = FileLocator.find(bundle, new Path(name), null);
desc = ImageDescriptor.createFromURL(url);
registry.put(name, desc);
}
return desc;
}
-
+
public static ImageDescriptor getIconImageDescriptor(String bundleId, String path, String key) {
- ImageRegistry registry = HelpUIPlugin.getDefault().getImageRegistry();
- ImageDescriptor desc = registry.getDescriptor(key);
+ ImageRegistry registry = HelpUIPlugin.getDefault().getImageRegistry();
+ ImageDescriptor desc = registry.getDescriptor(key);
if (desc==null) {
Bundle bundle = Platform.getBundle(bundleId);
if (bundle == null) return null;
- URL url = FileLocator.find(bundle, new Path(path), null);
+ URL url = FileLocator.find(bundle, new Path(path), null);
desc = ImageDescriptor.createFromURL(url);
- registry.put(key, desc);
+ registry.put(key, desc);
}
return desc;
}
@@ -105,7 +105,7 @@ public class HelpUIResources {
ImageRegistry registry = HelpUIPlugin.getDefault().getImageRegistry();
return registry.get(key);
}
-
+
/**
* Get the image for an icon based upon the id
* @param iconId The id of the icon, may be null, if so a null image is returned
@@ -120,7 +120,7 @@ public class HelpUIResources {
initializeTocIcons();
String suffix;
if (isOpen) {
- suffix = OPEN;
+ suffix = OPEN;
} else if (isLeaf) {
suffix = LEAF;
} else {
@@ -132,13 +132,13 @@ public class HelpUIResources {
}
return lookupImage(iconId + OPEN);
}
-
+
private static Image lookupImage(String name) {
ImageRegistry registry = HelpUIPlugin.getDefault().getImageRegistry();
return registry.get(name);
}
-
- private static void initializeTocIcons(){
+
+ private static void initializeTocIcons(){
if (iconsInitialized) {
return;
}
@@ -147,29 +147,29 @@ public class HelpUIResources {
IExtension[] extensionsFound = Platform.getExtensionRegistry().getExtensionPoint(EXT_PT).getExtensions();
for(int i=0; i < extensionsFound.length; i++){
-
- IConfigurationElement[] configElements = extensionsFound[i].getConfigurationElements();
+
+ IConfigurationElement[] configElements = extensionsFound[i].getConfigurationElements();
for(int j=0; j < configElements.length; j++){
- if (configElements[j].getName().equals(TOC_ICON_ELEMENT)){
+ if (configElements[j].getName().equals(TOC_ICON_ELEMENT)){
IConfigurationElement iconElem = configElements[j];
String attrs[] = iconElem.getAttributeNames();
String contributorID = iconElem.getContributor().getName();
-
- for (int k=0; k < attrs.length; k++){
- if(attrs[k].equals(OPEN_ICON_PATH))
- HelpUIResources.getIconImageDescriptor(contributorID, iconElem.getAttribute(OPEN_ICON_PATH), iconElem.getAttribute(TOC_ICON_ID) + OPEN);
+
+ for (int k=0; k < attrs.length; k++){
+ if(attrs[k].equals(OPEN_ICON_PATH))
+ HelpUIResources.getIconImageDescriptor(contributorID, iconElem.getAttribute(OPEN_ICON_PATH), iconElem.getAttribute(TOC_ICON_ID) + OPEN);
if(attrs[k].equals(CLOSED_ICON_PATH))
- HelpUIResources.getIconImageDescriptor(contributorID, iconElem.getAttribute(CLOSED_ICON_PATH), iconElem.getAttribute(TOC_ICON_ID) + CLOSED);
+ HelpUIResources.getIconImageDescriptor(contributorID, iconElem.getAttribute(CLOSED_ICON_PATH), iconElem.getAttribute(TOC_ICON_ID) + CLOSED);
if(attrs[k].equals(LEAF_ICON_PATH))
- HelpUIResources.getIconImageDescriptor(contributorID, iconElem.getAttribute(LEAF_ICON_PATH), iconElem.getAttribute(TOC_ICON_ID) + LEAF);
+ HelpUIResources.getIconImageDescriptor(contributorID, iconElem.getAttribute(LEAF_ICON_PATH), iconElem.getAttribute(TOC_ICON_ID) + LEAF);
}
-
+
}
-
- }
+
+ }
}
}
-
+
/**
* Returns an image from a property file
* @param name simple image file name
@@ -183,9 +183,9 @@ public class HelpUIResources {
getImageDescriptor(name);
return registry.get(name);
}
-
+
public static Image getImage(URL url) {
- ImageRegistry registry = HelpUIPlugin.getDefault().getImageRegistry();
+ ImageRegistry registry = HelpUIPlugin.getDefault().getImageRegistry();
String name = url.toString();
ImageDescriptor desc = registry.getDescriptor(name);
if (desc==null) {
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HyperlinkHandler.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HyperlinkHandler.java
index fdac10127..f23f2328d 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HyperlinkHandler.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HyperlinkHandler.java
@@ -293,7 +293,7 @@ public class HyperlinkHandler
/**
* Sent when an event that the receiver has registered for occurs.
- *
+ *
* @param event
* the event which occurred
*/
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HyperlinkLabel.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HyperlinkLabel.java
index 40ba84027..69048f60f 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HyperlinkLabel.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/HyperlinkLabel.java
@@ -41,7 +41,7 @@ import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.TypedListener;
/**
- *
+ *
* A canvas holding a hyperlink label. Need this to deal with focus selection.
*/
public class HyperlinkLabel extends Canvas {
@@ -50,7 +50,7 @@ public class HyperlinkLabel extends Canvas {
/**
* Constructor for Hyperlink.
- *
+ *
* @param parent
* @param style
*/
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHelpUIConstants.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHelpUIConstants.java
index dbeae8518..774f69e5f 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHelpUIConstants.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHelpUIConstants.java
@@ -23,10 +23,10 @@ public interface IHelpUIConstants {
+ "prefPageHelpContent"; //$NON-NLS-1$
public static final String PREF_PAGE_CUSTOM_BROWSER_PATH = HELP_UI_PLUGIN_ID
+ "prefPageCustomBrowserPath"; //$NON-NLS-1$
-
+
public static final String IMAGE_FILE_F1TOPIC = "obj16/topic_small.gif"; //$NON-NLS-1$
public static final String IMAGE_COMMAND_F1TOPIC = "obj16/command_small.gif"; //$NON-NLS-1$
-
+
// Help view images
public static final String IMAGE_CONTAINER = "obj16/container_obj.gif"; //$NON-NLS-1$
public static final String IMAGE_TOC_CLOSED= "obj16/toc_closed.gif"; //$NON-NLS-1$
@@ -36,7 +36,7 @@ public interface IHelpUIConstants {
public static final String IMAGE_HELP_SEARCH = "etool16/helpsearch_co.gif"; //$NON-NLS-1$
public static final String IMAGE_HELP_PRINT = "etool16/print_topic.gif"; //$NON-NLS-1$
public static final String IMAGE_RELATED_TOPICS = "etool16/reltopics_co.gif"; //$NON-NLS-1$
- public static final String IMAGE_ALL_TOPICS = "etool16/alltopics_co.gif"; //$NON-NLS-1$
+ public static final String IMAGE_ALL_TOPICS = "etool16/alltopics_co.gif"; //$NON-NLS-1$
public static final String IMAGE_INDEX = "etool16/index_co.gif"; //$NON-NLS-1$
public static final String IMAGE_HELP = "etool16/help.gif"; //$NON-NLS-1$
public static final String IMAGE_DHELP = "view16/help_view.gif"; //$NON-NLS-1$
@@ -51,7 +51,7 @@ public interface IHelpUIConstants {
public static final String IMAGE_D_REDUCE = "dlcl16/reduce_font.gif"; //$NON-NLS-1$
public static final String IMAGE_COLLAPSE_ALL = "elcl16/collapseall.gif"; //$NON-NLS-1$
public static final String IMAGE_SYNC_TOC = "elcl16/synch_toc_nav.gif"; //$NON-NLS-1$
- public static final String IMAGE_SHOW_ALL = "elcl16/show_all.gif"; //$NON-NLS-1$
+ public static final String IMAGE_SHOW_ALL = "elcl16/show_all.gif"; //$NON-NLS-1$
public static final String IMAGE_DOC_OVR = "ovr16/doc_co.gif"; //$NON-NLS-1$
public static final String IMAGE_SCOPE_SET = "obj16/scopeset_obj.gif"; //$NON-NLS-1$
public static final String IMAGE_SEARCH_WIZ = "wizban/newsearch_wiz.gif"; //$NON-NLS-1$
@@ -60,7 +60,7 @@ public interface IHelpUIConstants {
public static final String HV_FSEARCH = "fsearch"; //$NON-NLS-1$
public static final String HV_SEARCH_RESULT = "search-result"; //$NON-NLS-1$
public static final String HV_FSEARCH_RESULT = "fsearch-result"; //$NON-NLS-1$
-
+
public static final String HV_TOPIC_TREE = "topic-tree"; //$NON-NLS-1$
public static final String HV_BOOKMARKS_TREE = "bookmarks-tree"; //$NON-NLS-1$
public static final String HV_BOOKMARKS_HEADER = "bookmarks-header"; //$NON-NLS-1$
@@ -74,7 +74,7 @@ public interface IHelpUIConstants {
public static final String HV_RELATED_TOPICS = "related-topics"; //$NON-NLS-1$
public static final String HV_CONTEXT_HELP_PAGE = "context-help-page"; //$NON-NLS-1$
public static final String HV_MISSING_CONTENT = "missing-content"; //$NON-NLS-1$
-
+
public static final String HV_INDEX = "index"; //$NON-NLS-1$
public static final String HV_INDEX_TYPEIN = "index-typein"; //$NON-NLS-1$
public static final String HV_INDEX_PAGE = "index-page"; //$NON-NLS-1$
@@ -83,7 +83,7 @@ public interface IHelpUIConstants {
static final String ENGINE_EXP_ID = "org.eclipse.help.ui.searchEngine"; //$NON-NLS-1$
static final String TAG_ENGINE = "engine"; //$NON-NLS-1$
static final String ATT_ID = "id"; //$NON-NLS-1$
-
+
static final String ATT_LABEL ="label"; //$NON-NLS-1$
static final String ATT_ICON = "icon";//$NON-NLS-1$
static final String ATT_CLASS = "class";//$NON-NLS-1$
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHyperlinkListener.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHyperlinkListener.java
index d7f0472fa..ec023a24c 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHyperlinkListener.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHyperlinkListener.java
@@ -13,7 +13,7 @@ package org.eclipse.help.ui.internal;
import org.eclipse.swt.widgets.*;
/**
- *
+ *
*/
public interface IHyperlinkListener {
/**
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.java
index 3895dee84..caa199229 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.java
@@ -124,11 +124,11 @@ public final class Messages extends NLS {
public static String BrowserPart_reduceTooltip;
public static String BrowserPart_highlightTooltip;
public static String BrowserPart_printTooltip;
- public static String BrowserPart_syncTocTooltip;
+ public static String BrowserPart_syncTocTooltip;
public static String HelpPreferencePage_wlabel;
public static String HelpPreferencePage_view;
public static String HelpPreferencePage_helpBrowser;
- public static String HelpPreferencePage_externalBrowser;
+ public static String HelpPreferencePage_externalBrowser;
public static String HelpPreferencePage_dlabel;
public static String HelpPreferencePage_tray;
public static String HelpPreferencePage_search;
@@ -150,7 +150,7 @@ public final class Messages extends NLS {
public static String AskShowAll_dialogTitle;
public static String AskShowAll_message;
public static String AskShowAll_toggleMessage;
-
+
public static String DefaultHelpUI_wtitle;
public static String DefaultHelpUI_noPerspMessage;
public static String ContextHelpDialog_showInDynamicHelp;
@@ -165,7 +165,7 @@ public final class Messages extends NLS {
public static String HelpPreferencePage_openInPlace;
public static String HelpPreferencePage_openInEditor;
public static String HelpPreferencePage_openInBrowser;
-
+
public static String ReusableHelpPart_internalBrowserTitle;
public static String ReusableHelpPart_internalWebBrowserError;
public static String ScopeSet_errorLoading;
@@ -174,13 +174,13 @@ public final class Messages extends NLS {
public static String ScopeSet_selectWorkingSet;
public static String IndexInstructions;
public static String IndexButton;
-
+
public static String NoWorkbenchForExecuteCommand_msg;
-
+
public static String SearchEmbeddedHelpOnly;
public static String SearchEmbeddedHelpFirst;
public static String SearchEmbeddedHelpLast;
-
+
// Remote Help Preferences
public static String AddICDialog_10;
@@ -197,7 +197,7 @@ public final class Messages extends NLS {
public static String AddICDialog_7;
public static String AddICDialog_8;
-
+
public static String AddICDialog_9;
public static String EditICDialog_10;
@@ -209,7 +209,7 @@ public final class Messages extends NLS {
public static String EditICDialog_13;
public static String EditICDialog_14;
-
+
public static String EditICDialog_15;
public static String EditICDialog_7;
@@ -255,7 +255,7 @@ public final class Messages extends NLS {
public static String ViewICPropsDialog_13;
public static String ViewICPropsDialog_14;
-
+
public static String ViewICPropsDialog_19;
public static String ViewICPropsDialog_20;
@@ -277,6 +277,6 @@ public final class Messages extends NLS {
public static String See;
public static String SeeAlso;
public static String SeeList;
-
+
public static String AlternateQueries;
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/SearchAction.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/SearchAction.java
index 1998ecdf1..cb829aa7c 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/SearchAction.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/SearchAction.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.ui/src/org/eclipse/help/ui/internal/ShowCapabilitiesPreferenceAction.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ShowCapabilitiesPreferenceAction.java
index cc35bbfd5..cd959ca5b 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ShowCapabilitiesPreferenceAction.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ShowCapabilitiesPreferenceAction.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.ui/src/org/eclipse/help/ui/internal/ShowInTocAction.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ShowInTocAction.java
index 2164875bd..060fad9aa 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ShowInTocAction.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ShowInTocAction.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.ui.internal.views.ReusableHelpPart;
public class ShowInTocAction implements ILiveHelpAction {
private String path;
-
+
@Override
public void setInitializationString(String data) {
path = data;
@@ -43,7 +43,7 @@ public class ShowInTocAction implements ILiveHelpAction {
});
}
}
-
+
private IHelpResource getHelpResource() {
StringTokenizer tok = new StringTokenizer(path, "_"); //$NON-NLS-1$
int index = Integer.parseInt(tok.nextToken());
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java
index e4300080c..32939cb78 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java
@@ -112,14 +112,14 @@ public class EmbeddedBrowser {
HelpApplication.stopHelp();
}
});
-
+
browser = new Browser(shell, SWT.NONE);
browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
initialize(browser);
-
+
createStatusBar(shell);
initializeStatusBar(browser);
-
+
// use saved location and size
x = Platform.getPreferencesService().getInt(HelpUIPlugin.PLUGIN_ID, BROWSER_X, 0, null);
y = Platform.getPreferencesService().getInt(HelpUIPlugin.PLUGIN_ID, BROWSER_Y, 0, null);
@@ -184,7 +184,7 @@ public class EmbeddedBrowser {
/**
* Constructor for derived help window It is either secondary browser or a
* help dialog
- *
+ *
* @param event
* @param parent
* Shell or null
@@ -237,7 +237,7 @@ public class EmbeddedBrowser {
}
}
});
-
+
}
private void initialize(Browser browser) {
browser.addOpenWindowListener(event -> {
@@ -298,7 +298,7 @@ public class EmbeddedBrowser {
}
});
}
-
+
private void initializeStatusBar(Browser browser) {
browser.addStatusTextListener(event -> {
event.text = event.text.replaceAll("&", "&&"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -326,7 +326,7 @@ public class EmbeddedBrowser {
}
});
}
-
+
private void createStatusBar(Composite parent) {
statusBar = new Composite(parent, SWT.NONE);
statusBar.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
@@ -357,7 +357,7 @@ public class EmbeddedBrowser {
data.heightHint = Math.max(statusBarText.computeSize(SWT.DEFAULT, SWT.DEFAULT).y, statusBarProgress.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
statusBarSeparator.setLayoutData(data);
}
-
+
public void displayUrl(String url) {
browser.setUrl(url);
shell.setMinimized(false);
@@ -433,7 +433,7 @@ public class EmbeddedBrowser {
}
/**
* Obtains URLs to product image
- *
+ *
* @return String[] with URLs as Strings or null
*/
private static String[] getProductImageURLs() {
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserAdapter.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserAdapter.java
index f8617b1cc..932166217 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserAdapter.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserAdapter.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,9 +25,9 @@ public class EmbeddedBrowserAdapter implements IBrowser, IBrowserCloseListener{
private UIThread2 secondThread;
private String browserType;
class UIThread2 extends Thread {
-
+
Display d;
-
+
boolean runEventLoop = true;
public UIThread2() {
@@ -103,7 +103,7 @@ public class EmbeddedBrowserAdapter implements IBrowser, IBrowserCloseListener{
}
/**
* Must be run on UI thread
- *
+ *
* @param url
*/
private void uiDisplayURL(final String url) {
@@ -131,7 +131,7 @@ public class EmbeddedBrowserAdapter implements IBrowser, IBrowserCloseListener{
}
}
/**
- *
+ *
*/
private EmbeddedBrowser getBrowser() {
if (browser == null || browser.isDisposed()) {
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserFactory.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserFactory.java
index 9bdd1f99e..6ab797109 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserFactory.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowserFactory.java
@@ -59,7 +59,7 @@ public class EmbeddedBrowserFactory implements IBrowserFactory {
/**
* Must run on UI thread
- *
+ *
* @return
*/
private boolean test() {
@@ -79,7 +79,7 @@ public class EmbeddedBrowserFactory implements IBrowserFactory {
// Browser not implemented
available = false;
} else {
- Status errorStatus = new Status(IStatus.WARNING, HelpUIPlugin.PLUGIN_ID, IStatus.OK,
+ Status errorStatus = new Status(IStatus.WARNING, HelpUIPlugin.PLUGIN_ID, IStatus.OK,
"An error occurred during creation of embedded help browser.", new Exception(se)); //$NON-NLS-1$
HelpPlugin.getDefault().getLog().log(errorStatus);
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/IBrowserCloseListener.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/IBrowserCloseListener.java
index 64eb9ee0d..869375857 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/IBrowserCloseListener.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/IBrowserCloseListener.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.ui/src/org/eclipse/help/ui/internal/dynamic/FilterResolverExtension.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/dynamic/FilterResolverExtension.java
index 755389281..59295699b 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/dynamic/FilterResolverExtension.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/dynamic/FilterResolverExtension.java
@@ -29,7 +29,7 @@ public class FilterResolverExtension implements Extension {
public boolean isHandled(String name) {
return (name.equals(NAME_ACTIVITY) || name.equals(NAME_CATEGORY));
}
-
+
@Override
public boolean isFiltered(String name, String value) {
if (name.equals(NAME_ACTIVITY)) {
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/OpenBundleResourceHandler.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/OpenBundleResourceHandler.java
index 847349c90..e037777bc 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/OpenBundleResourceHandler.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/OpenBundleResourceHandler.java
@@ -44,15 +44,15 @@ public class OpenBundleResourceHandler extends AbstractHandler {
if(pluginPath.startsWith("/")) //$NON-NLS-1$
pluginPath = pluginPath.substring(1);
url = new URL(Platform.getInstanceLocation().getURL().toString()+pluginId+"/"+pluginPath); //$NON-NLS-1$
- workspaceFile = new File(url.getFile());
+ workspaceFile = new File(url.getFile());
if(!workspaceFile.exists())
- {
+ {
url = BaseHelpSystem.resolve("/" + pluginId + '/' + pluginPath , true); //$NON-NLS-1$
if (url == null)
{
errorMessage="file not found:" + pluginId+"/"+pluginPath; //$NON-NLS-1$ //$NON-NLS-2$
throw new ExecutionException(errorMessage);
- }
+ }
}
}
catch (Exception ex) {
@@ -64,8 +64,8 @@ public class OpenBundleResourceHandler extends AbstractHandler {
try {
IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench()
.getBrowserSupport();
-
- IWebBrowser browser = browserSupport.createBrowser(browserId);
+
+ IWebBrowser browser = browserSupport.createBrowser(browserId);
browser.openURL(url);
} catch (PartInitException ex) {
throw new ExecutionException("error opening browser", ex); //$NON-NLS-1$
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/ShowIndexHandler.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/ShowIndexHandler.java
index 1c9ac4b1e..4dca72fe6 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/ShowIndexHandler.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/ShowIndexHandler.java
@@ -26,34 +26,34 @@ import org.eclipse.ui.PlatformUI;
*/
public class ShowIndexHandler extends AbstractHandler {
-
+
/*
* Currently returns true, could be controlled by a preference
* in the future
*/
private boolean isOpenInHelpView() {
- boolean searchFromBrowser =
+ boolean searchFromBrowser =
Platform.getPreferencesService().getBoolean(HelpBasePlugin.PLUGIN_ID,IHelpBaseConstants.P_KEY_SEARCH_FROM_BROWSER, false, null);
return !searchFromBrowser;
}
-
+
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
- if (isOpenInHelpView()) {
+ if (isOpenInHelpView()) {
openInHelpView();
} else {
openInBrowser();
}
return null;
}
-
+
private void openInBrowser() {
PlatformUI.getWorkbench().getHelpSystem();
BaseHelpSystem.getHelpDisplay().displayHelpResource("tab=index", false); //$NON-NLS-1$
}
-
+
private void openInHelpView() {
- DefaultHelpUI.showIndex();
+ DefaultHelpUI.showIndex();
}
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java
index 322cd7e39..002e04f7a 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.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
*******************************************************************************/
@@ -40,7 +40,7 @@ import org.eclipse.ui.PlatformUI;
*/
public class HelpContentPreferencePage extends PreferencePage implements
IWorkbenchPreferencePage {
-
+
private ICTable table;
private ICButtons buttons;
@@ -63,27 +63,27 @@ public class HelpContentPreferencePage extends PreferencePage implements
{
return table;
}
-
+
@Override
protected Control createContents(Composite parent) {
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
IHelpUIConstants.PREF_PAGE_HELP_CONTENT);
initializeDialogUnits(parent);
-
+
descLabel = new Label(parent, SWT.NONE);
descLabel.setText(Messages.HelpContentPage_title);
Dialog.applyDialogFont(descLabel);
-
+
createSearchLocalHelpOnly(parent);
createSearchLocalHelpFirst(parent);
createSearchLocalHelpLast(parent);
-
+
/* remoteICPage = new InfocenterDisplay(this);
remoteICPage.createContents(parent);
*/
initializeTableEnablement(parent,searchLocalHelpOnly.getSelection());
-
+
return parent;
}
@@ -93,8 +93,8 @@ public class HelpContentPreferencePage extends PreferencePage implements
List<IC> ics = ICPreferences.getDefaultICs();
table.setICs(ics);
-
- // Restore Defaults functionality here
+
+ // Restore Defaults functionality here
/* HelpContentBlock currentBlock=remoteICPage.getHelpContentBlock();
currentBlock.getRemoteICviewer().getRemoteICList().removeAllRemoteICs(currentBlock.getRemoteICList());
currentBlock.getRemoteICviewer().getRemoteICList().loadDefaultPreferences();
@@ -114,12 +114,12 @@ public class HelpContentPreferencePage extends PreferencePage implements
IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(HelpBasePlugin.PLUGIN_ID);
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.preference.PreferencePage#performOk()
*/
prefs.putBoolean(IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, !(searchLocalHelpOnly.getSelection()));
prefs.putBoolean(IHelpBaseConstants.P_KEY_REMOTE_HELP_PREFERRED, searchLocalHelpLast.getSelection());
-
+
List<IC> ics = table.getICs();
ICPreferences.setICs(ics);
@@ -140,45 +140,45 @@ public class HelpContentPreferencePage extends PreferencePage implements
boolean isRemoteOn = Platform.getPreferencesService().getBoolean
(HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, false, null);
-
+
searchLocalHelpOnly.setSelection(!isRemoteOn);
- Dialog.applyDialogFont(searchLocalHelpOnly);
+ Dialog.applyDialogFont(searchLocalHelpOnly);
}
-
+
private void createSearchLocalHelpFirst(Composite parent) {
searchLocalHelpFirst = new Button(parent, SWT.RADIO);
searchLocalHelpFirst.setText(Messages.SearchEmbeddedHelpFirst);
searchLocalHelpFirst.addListener(SWT.Selection, changeListener);
-
+
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);
-
+
searchLocalHelpFirst.setSelection(isRemoteOn && !isRemotePreferred);
Dialog.applyDialogFont(searchLocalHelpFirst);
}
-
+
private void createSearchLocalHelpLast(Composite parent) {
searchLocalHelpLast = new Button(parent, SWT.RADIO);
searchLocalHelpLast.setText(Messages.SearchEmbeddedHelpLast);
searchLocalHelpLast.addListener(SWT.Selection, changeListener);
-
+
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);
-
+
searchLocalHelpLast.setSelection(isRemoteOn && isRemotePreferred);
Dialog.applyDialogFont(searchLocalHelpLast);
}
-
+
/*
- * Initialize the table enablement with the current checkbox selection
+ * Initialize the table enablement with the current checkbox selection
*/
-
+
private void initializeTableEnablement(Composite parent, boolean isRemoteHelpDisabled)
- {
+ {
Composite top = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
@@ -191,7 +191,7 @@ public class HelpContentPreferencePage extends PreferencePage implements
table = new ICTable(top);
buttons = new ICButtons(top,this);
-
+
changeListener.handleEvent(null);
}
@@ -202,10 +202,10 @@ public class HelpContentPreferencePage extends PreferencePage implements
private Listener changeListener = event -> {
boolean isRemoteHelpEnabled = !(searchLocalHelpOnly.getSelection());
-
+
// Disable/Enable table
table.getTable().setEnabled(isRemoteHelpEnabled);
buttons.setEnabled(isRemoteHelpEnabled);
};
-
+
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpPreferencePage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpPreferencePage.java
index 4248efc9c..2df11b4bd 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpPreferencePage.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpPreferencePage.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
*******************************************************************************/
@@ -50,18 +50,18 @@ public class HelpPreferencePage extends PreferencePage implements
private static final String WBROWSER_PAGE_ID = "org.eclipse.ui.browser.preferencePage";//$NON-NLS-1$
private Combo useExternalCombo;
-
+
private Combo searchLocationCombo;
-
+
private Combo openModeCombo;
-
+
private Combo dialogHelpCombo;
-
+
private Combo windowHelpCombo;
/**
* Creates preference page controls on demand.
- *
+ *
* @param parent
* the parent for the preference page
*/
@@ -80,8 +80,8 @@ public class HelpPreferencePage extends PreferencePage implements
mainComposite.setLayout(layout);
Label description = new Label(mainComposite, SWT.NONE);
description.setText(Messages.select_browser);
-
- createOpenModesPrefs(mainComposite);
+
+ createOpenModesPrefs(mainComposite);
createDynamicHelpArea(mainComposite);
createSpacer(mainComposite);
Dialog.applyDialogFont(mainComposite);
@@ -96,7 +96,7 @@ public class HelpPreferencePage extends PreferencePage implements
createSearchLocation(group);
createHelpViewOpenPrefs(group);
createOpenContents(group);
- createLinkArea(group);
+ createLinkArea(group);
}
private void createDynamicHelpArea(Composite parent) {
@@ -104,7 +104,7 @@ public class HelpPreferencePage extends PreferencePage implements
GridLayout layout = new GridLayout(); group.setLayout(layout);
group.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
group.setText(Messages.HelpPreferencePage_contextHelpGroup);
-
+
createWindowContextPrefs(group);
createDialogContextPrefs(group);
}
@@ -126,7 +126,7 @@ public class HelpPreferencePage extends PreferencePage implements
if (BrowserManager.getInstance().isEmbeddedBrowserPresent()) {
Label isExternalLabel = new Label(mainComposite, SWT.NONE);
isExternalLabel.setText(Messages.HelpPreferencePage_openContents);
- isExternalLabel.setLayoutData(createLabelData());
+ isExternalLabel.setLayoutData(createLabelData());
useExternalCombo = new Combo(mainComposite, SWT.READ_ONLY);
useExternalCombo.add(Messages.HelpPreferencePage_helpBrowser);
useExternalCombo.add(Messages.HelpPreferencePage_externalBrowser);
@@ -165,7 +165,7 @@ public class HelpPreferencePage extends PreferencePage implements
String openMode = Platform.getPreferencesService().getString
(HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_HELP_VIEW_OPEN_MODE,
IHelpBaseConstants.P_IN_PLACE, null);
- openModeCombo.setText(openModeToString(openMode));
+ openModeCombo.setText(openModeToString(openMode));
}
}
@@ -186,7 +186,7 @@ public class HelpPreferencePage extends PreferencePage implements
Label whelpDescription = new Label(group, SWT.NONE);
whelpDescription.setText(Messages.HelpPreferencePage_wlabel);
whelpDescription.setLayoutData(createLabelData());
-
+
windowHelpCombo = new Combo(group, SWT.READ_ONLY);
windowHelpCombo.add(Messages.HelpPreferencePage_view);
windowHelpCombo.add(Messages.HelpPreferencePage_infopop);
@@ -195,13 +195,13 @@ public class HelpPreferencePage extends PreferencePage implements
(HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_WINDOW_INFOPOP, false, null);
windowHelpCombo.setText(winfopop ? Messages.HelpPreferencePage_infopop : Messages.HelpPreferencePage_view);
}
-
+
private GridData createLabelData () {
GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false);
data.verticalIndent = 5;
return data;
}
-
+
private IPreferenceNode getPreferenceNode(String pageId) {
Iterator<IPreferenceNode> iterator = PlatformUI.getWorkbench().getPreferenceManager()
.getElements(PreferenceManager.PRE_ORDER).iterator();
@@ -235,18 +235,18 @@ public class HelpPreferencePage extends PreferencePage implements
if (useExternalCombo != null) {
boolean useExternal = defaults.getBoolean(
IHelpBaseConstants.P_KEY_ALWAYS_EXTERNAL_BROWSER, false);
- useExternalCombo.setText(useExternal ? Messages.HelpPreferencePage_externalBrowser : Messages.HelpPreferencePage_helpBrowser);
- }
-
+ useExternalCombo.setText(useExternal ? Messages.HelpPreferencePage_externalBrowser : Messages.HelpPreferencePage_helpBrowser);
+ }
+
boolean searchFromBrowser = defaults.getBoolean(IHelpBaseConstants.P_KEY_SEARCH_FROM_BROWSER, false);
searchLocationCombo.setText(searchFromBrowser ? Messages.HelpPreferencePage_openInBrowser : Messages.HelpPreferencePage_view);
-
+
boolean winfopop = defaults.getBoolean(IHelpBaseConstants.P_KEY_WINDOW_INFOPOP, false);
windowHelpCombo.setText(winfopop ? Messages.HelpPreferencePage_infopop : Messages.HelpPreferencePage_view);
boolean dinfopop = defaults.getBoolean(IHelpBaseConstants.P_KEY_DIALOG_INFOPOP, false);
dialogHelpCombo.setText(dinfopop ? Messages.HelpPreferencePage_infopop : Messages.HelpPreferencePage_tray);
-
+
if (openModeCombo !=null) {
String openMode = defaults.get(
IHelpBaseConstants.P_KEY_HELP_VIEW_OPEN_MODE, IHelpBaseConstants.P_IN_PLACE);
@@ -263,15 +263,15 @@ public class HelpPreferencePage extends PreferencePage implements
public boolean performOk() {
IEclipsePreferences pref = InstanceScope.INSTANCE.getNode(HelpBasePlugin.PLUGIN_ID);
if (useExternalCombo != null) {
- boolean isExternalBrowser = useExternalCombo.getText().equals(Messages.HelpPreferencePage_externalBrowser);
+ boolean isExternalBrowser = useExternalCombo.getText().equals(Messages.HelpPreferencePage_externalBrowser);
pref.putBoolean(IHelpBaseConstants.P_KEY_ALWAYS_EXTERNAL_BROWSER,
isExternalBrowser);
BrowserManager.getInstance().setAlwaysUseExternal(
isExternalBrowser);
}
- pref.putBoolean(IHelpBaseConstants.P_KEY_SEARCH_FROM_BROWSER,
+ pref.putBoolean(IHelpBaseConstants.P_KEY_SEARCH_FROM_BROWSER,
searchLocationCombo.getText().equals(Messages.HelpPreferencePage_openInBrowser));
-
+
pref.putBoolean(IHelpBaseConstants.P_KEY_WINDOW_INFOPOP,
windowHelpCombo.getText().equals(Messages.HelpPreferencePage_infopop));
@@ -280,7 +280,7 @@ public class HelpPreferencePage extends PreferencePage implements
if (openModeCombo!=null) {
pref.put(IHelpBaseConstants.P_KEY_HELP_VIEW_OPEN_MODE, openModeFromString(openModeCombo.getText()));
}
-
+
try {
pref.flush();
} catch (BackingStoreException e) {
@@ -299,7 +299,7 @@ public class HelpPreferencePage extends PreferencePage implements
return Messages.HelpPreferencePage_openInPlace;
}
}
-
+
private String openModeFromString(String openMode) {
if (Messages.HelpPreferencePage_openInBrowser.equals(openMode)) {
return IHelpBaseConstants.P_IN_BROWSER;
@@ -312,7 +312,7 @@ public class HelpPreferencePage extends PreferencePage implements
/**
* Creates a horizontal spacer line that fills the width of its container.
- *
+ *
* @param parent
* the parent control
*/
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/IC.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/IC.java
index 80acb1fc2..ab3612e42 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/IC.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/IC.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,7 +18,7 @@ import java.net.UnknownHostException;
/**
* Information Center (IC) - stores URL info.
- *
+ *
* @author chaustin
*
*/
@@ -31,7 +31,7 @@ public class IC {
private String path;
private int port = -1;
-
+
public IC(String name,String href,boolean enabled) throws MalformedURLException
{
this.name = name;
@@ -43,10 +43,10 @@ public class IC {
{
if (href.startsWith(":")) //$NON-NLS-1$
href = "http"+href; //$NON-NLS-1$
-
+
setHref(new URL(href));
}
-
+
public void setHref(URL url)
{
this.protocol = url.getProtocol();
@@ -61,7 +61,7 @@ public class IC {
port = 443;
}
}
-
+
public String getHref()
{
String portString = ":"+port; //$NON-NLS-1$
@@ -69,17 +69,17 @@ public class IC {
portString = ""; //$NON-NLS-1$
else if (port==443 && protocol.equals("https")) //$NON-NLS-1$
portString = ""; //$NON-NLS-1$
-
+
return protocol+"://"+host+portString+path; //$NON-NLS-1$
}
-
-
+
+
public String getName()
{
return name;
}
-
-
+
+
public boolean isEnabled()
{
return enabled;
@@ -133,16 +133,16 @@ public class IC {
/**
* Tests to see if 2 ICs are equal. The state (enabled or disabled) is ignored
* during this operation.
- *
+ *
*/
@Override
public boolean equals(Object o)
{
if (!(o instanceof IC))
return false;
-
+
IC candidate = (IC)o;
-
+
if (getName().equals(candidate.getName())
&& getPath().equals(candidate.getPath())
&& getPort()==candidate.getPort()
@@ -151,7 +151,7 @@ public class IC {
try {
InetAddress host1 = InetAddress.getByName(getHost());
InetAddress host2 = InetAddress.getByName(candidate.getHost());
-
+
if (host1.getHostAddress().equals(host2.getHostAddress()))
return true;
} catch (UnknownHostException e) {
@@ -159,7 +159,7 @@ public class IC {
return true;
}
}
-
+
return false;
}
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICButtons.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICButtons.java
index 93389a1f3..23b8857f3 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICButtons.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICButtons.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,7 +31,7 @@ import org.eclipse.swt.widgets.Table;
public class ICButtons implements SelectionListener{
private HelpContentPreferencePage page;
-
+
private Button addIC;
private Button editIC;
private Button removeIC;
@@ -45,7 +45,7 @@ public class ICButtons implements SelectionListener{
public ICButtons(Composite parent,HelpContentPreferencePage page)
{
this.page = page;
-
+
Composite container = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.marginHeight = 0;
@@ -58,7 +58,7 @@ public class ICButtons implements SelectionListener{
editIC = createPushButton(container, Messages.HelpContentBlock_editICTitle);
removeIC = createPushButton(container, Messages.HelpContentBlock_removeICTitle);
testIC = createPushButton(container, Messages.HelpContentBlock_testConnectionTitle);
-
+
String enableTitle = Messages.HelpContentBlock_3.length() > Messages.HelpContentBlock_4.length() ?
Messages.HelpContentBlock_3 : Messages.HelpContentBlock_4;
enableIC = createPushButton(container, enableTitle);
@@ -66,17 +66,17 @@ public class ICButtons implements SelectionListener{
moveDown = createPushButton(container, Messages.HelpContentBlock_downTitle);
page.getTable().getTable().addSelectionListener(this);
-
-
+
+
updateButtonStates();
}
-
+
public void setEnabled(boolean enabled)
{
this.enabled = enabled;
updateButtonStates();
}
-
+
public Button createPushButton(Composite parent, String buttonText) {
Button button = new Button(parent, SWT.PUSH);
button.setFont(parent.getFont());
@@ -123,30 +123,30 @@ public class ICButtons implements SelectionListener{
updateButtonStates();
}
}
-
+
public void editIC()
{
IStructuredSelection selection = (IStructuredSelection)page.getTable().getSelection();
IC ic = (IC)selection.getFirstElement();
if (ic==null)
return;
-
+
ICDialog dialog = new ICDialog(page.getShell(),ic);
-
+
if (dialog.open() == Window.OK) {
page.getTable().editIC(dialog.getIC());
updateButtonStates();
}
}
-
+
public void removeIC()
{
IStructuredSelection selection = (IStructuredSelection)page.getTable().getSelection();
List<IC> ics = selection.toList();
String remove = ""; //$NON-NLS-1$
-
+
for (int i=0;i<ics.size();i++)
- {
+ {
remove+="\n"+ics.get(i); //$NON-NLS-1$
}
@@ -154,7 +154,7 @@ public class ICButtons implements SelectionListener{
MessageDialog.openQuestion(
page.getShell(),
NLS.bind(Messages.HelpContentBlock_rmvTitle ,""), //$NON-NLS-1$
- NLS.bind(Messages.HelpContentBlock_rmvLabel ,remove));
+ NLS.bind(Messages.HelpContentBlock_rmvLabel ,remove));
if (shouldRemove)
{
@@ -163,22 +163,22 @@ public class ICButtons implements SelectionListener{
updateButtonStates();
}
}
-
+
public void testIC()
- {
+ {
IStructuredSelection selection = (IStructuredSelection)page.getTable().getSelection();
IC ic = (IC)selection.getFirstElement();
if (ic==null)
return;
-
+
ICDialog dialog = new ICDialog(page.getShell(),ic,true);
-
+
if (dialog.open() == Window.OK) {
page.getTable().editIC(dialog.getIC());
updateButtonStates();
- }
-
-
+ }
+
+
/* boolean connected = TestConnectionUtility.testConnection(ic.getHost(),
ic.getPort()+"", ic.getPath(),ic.getProtocol());
TestICDialog dialog = new TestICDialog(page.getShell(),ic);
@@ -186,50 +186,50 @@ public class ICButtons implements SelectionListener{
dialog.open();
*/
}
-
+
public void enableIC()
{
int indexes[] = page.getTable().getTable().getSelectionIndices();
IStructuredSelection selection = (IStructuredSelection)page.getTable().getSelection();
List<IC> ics = selection.toList();
-
+
boolean enable = enableIC.getText().equals(Messages.HelpContentBlock_4);
-
+
for (int i=0;i<ics.size();i++)
{
ics.get(i).setEnabled(enable);
page.getTable().getTableViewer().replace(ics.get(i), indexes[i]);
}
page.getTable().refresh();
-
+
updateButtonStates();
}
-
+
public void move(int offset)
{
int index = page.getTable().getTable().getSelectionIndices()[0];
-
+
List<IC> ics = page.getTable().getICs();
IC x = ics.get(index);
IC y = ics.get(index + offset);
ics.set(index+offset,x);
ics.set(index,y);
-
+
page.getTable().getTableViewer().getContentProvider().inputChanged(
page.getTable().getTableViewer(), null, ics);
-
+
page.getTable().getTableViewer().replace(x,index+offset);
page.getTable().getTableViewer().replace(y,index);
page.getTable().refresh();
-
+
page.getTable().getTable().deselectAll();
page.getTable().getTable().select(index+offset);
updateButtonStates();
-
+
}
-
+
public void updateButtonStates()
{
if (!enabled)
@@ -243,9 +243,9 @@ public class ICButtons implements SelectionListener{
removeIC.setEnabled(false);
return;
}
-
+
addIC.setEnabled(true);
-
+
IC firstIC = (IC)(((IStructuredSelection)page.getTable().getSelection()).getFirstElement());
if (firstIC!=null)
{
@@ -260,7 +260,7 @@ public class ICButtons implements SelectionListener{
moveDown.setEnabled(index!=page.getTable().getICs().size()-1);
}
else
- {
+ {
editIC.setEnabled(false);
testIC.setEnabled(false);
moveUp.setEnabled(false);
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICDialog.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICDialog.java
index a873e6f1a..fe526d698 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICDialog.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICDialog.java
@@ -43,7 +43,7 @@ import org.eclipse.ui.PlatformUI;
public class ICDialog extends StatusDialog implements Listener, SelectionListener {
private IC ic = null;
-
+
private Text nameText;
private Text hrefText;
@@ -80,25 +80,25 @@ public class ICDialog extends StatusDialog implements Listener, SelectionListene
topGroup.setLayout(layout);
topGroup.setFont(top.getFont());
topGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
-
+
Label label = new Label(topGroup, SWT.NONE);
label.setText(Messages.AddICDialog_4);
-
+
nameText = new Text(topGroup, SWT.BORDER);
nameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
if (nameText.getOrientation() == SWT.RIGHT_TO_LEFT)
nameText.setOrientation(SWT.LEFT_TO_RIGHT);
nameText.addListener(SWT.Modify, this);
-
+
label = new Label(topGroup, SWT.NONE);
label.setText(Messages.InfoCenterPage_url);
-
+
hrefText = new Text(topGroup, SWT.BORDER);
hrefText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
if (hrefText.getOrientation() == SWT.RIGHT_TO_LEFT)
hrefText.setOrientation(SWT.LEFT_TO_RIGHT);
hrefText.addListener(SWT.Modify, this);
-
+
if (ic!=null)
{
@@ -108,9 +108,9 @@ public class ICDialog extends StatusDialog implements Listener, SelectionListene
}
else
this.getShell().setText(Messages.AddICDialog_2);
-
- Dialog.applyDialogFont(top);
+
+ Dialog.applyDialogFont(top);
return top;
}
@@ -119,22 +119,22 @@ public class ICDialog extends StatusDialog implements Listener, SelectionListene
protected void createButtonsForButtonBar(Composite parent) {
testButton = this.createButton(
- parent,
- IDialogConstants.CLIENT_ID,
- Messages.HelpContentBlock_testConnectionTitle,
+ parent,
+ IDialogConstants.CLIENT_ID,
+ Messages.HelpContentBlock_testConnectionTitle,
true);
testButton.addSelectionListener(this);
super.createButtonsForButtonBar(parent);
-
+
//Initialize validity
updateValidity();
-
+
if (testConnect)
testConnection();
}
-
-
+
+
@Override
public void initializeBounds() {
Point size = getInitialSize();
@@ -142,28 +142,28 @@ public class ICDialog extends StatusDialog implements Listener, SelectionListene
this.getShell().setBounds(location.x, location.y,
size.x + 180, size.y);
}
-
+
@Override
public void okPressed() {
try {
String href = formalizeHref(hrefText.getText());
-
+
ic = new IC(nameText.getText(),href,true);
} catch (MalformedURLException e) {} // This should never happen since we test in updateValidity
this.setReturnCode(OK);
this.close();
}
-
+
public String formalizeHref(String href)
{
if (href.endsWith("/index.jsp")) //$NON-NLS-1$
href = href.substring(0,href.lastIndexOf("/index.jsp")); //$NON-NLS-1$
else if (href.endsWith("/site/site.xml")) //$NON-NLS-1$
href = href.substring(0,href.lastIndexOf("/site/site.xml")); //$NON-NLS-1$
-
+
return href;
}
-
+
/*
* Checks for errors in the user input and shows/clears the error message
* as appropriate.
@@ -182,18 +182,18 @@ public class ICDialog extends StatusDialog implements Listener, SelectionListene
if (!href.matches(".*\\://.+/.+")) //$NON-NLS-1$
status = new Status(IStatus.ERROR,"org.eclipse.help.ui",Messages.InfoCenterPage_invalidURL); //$NON-NLS-1$
-
+
} catch (MalformedURLException e) {
status = new Status(IStatus.ERROR,"org.eclipse.help.ui",Messages.InfoCenterPage_invalidURL); //$NON-NLS-1$
}
}
-
+
// if (testButton!=null)
// testButton.setEnabled(status.isOK());
-
+
this.updateStatus(status);
}
-
+
private boolean areFieldsValid()
{
if (nameText!=null && nameText.getText().equals("")) //$NON-NLS-1$
@@ -206,14 +206,14 @@ public class ICDialog extends StatusDialog implements Listener, SelectionListene
if (!href.matches(".*\\://.+/.+")) //$NON-NLS-1$
return false;
-
+
} catch (MalformedURLException e) {
return false;
}
- }
+ }
return true;
}
-
+
private void testConnection()
{
IC testIC;
@@ -222,13 +222,13 @@ public class ICDialog extends StatusDialog implements Listener, SelectionListene
testIC = new IC(nameText.getText(),formalizeHref(hrefText.getText()),true);
boolean connected = TestConnectionUtility.testConnection(testIC.getHost(),
testIC.getPort()+"", testIC.getPath(),testIC.getProtocol()); //$NON-NLS-1$
-
+
if(connected)
status = new Status(IStatus.INFO,"org.eclipse.help.ui",Messages.TestConnectionDialog_12); //$NON-NLS-1$
else
status = new Status(IStatus.WARNING,"org.eclipse.help.ui",Messages.TestConnectionDialog_13); //$NON-NLS-1$
-
+
} catch (MalformedURLException e) {
status = new Status(IStatus.WARNING,"org.eclipse.help.ui",Messages.TestConnectionDialog_13); //$NON-NLS-1$
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICPreferences.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICPreferences.java
index cb427b97d..68878e6af 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICPreferences.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICPreferences.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,11 +27,11 @@ public class ICPreferences {
public final static String DELIMITER = ","; //$NON-NLS-1$
-
+
public static void setICs(List<IC> ics)
{
- String name = "", host = "", path = "", protocol="", port = "", enabled = ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
-
+ String name = "", host = "", path = "", protocol="", port = "", enabled = ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+
for (int i=0;i<ics.size();i++)
{
name += ics.get(i).getName() + DELIMITER;
@@ -41,7 +41,7 @@ public class ICPreferences {
path += ics.get(i).getPath() + DELIMITER;
enabled += ics.get(i).isEnabled() + DELIMITER;
}
-
+
// Remove trailing commas
if(ics.size()!=0)
{
@@ -52,7 +52,7 @@ public class ICPreferences {
path = path.substring(0,path.length()-1);
enabled = enabled.substring(0,enabled.length()-1);
}
-
+
set("org.eclipse.help.base",IHelpBaseConstants.P_KEY_REMOTE_HELP_NAME, name); //$NON-NLS-1$
set("org.eclipse.help.base",IHelpBaseConstants.P_KEY_REMOTE_HELP_HOST, host); //$NON-NLS-1$
set("org.eclipse.help.base",IHelpBaseConstants.P_KEY_REMOTE_HELP_PATH, path); //$NON-NLS-1$
@@ -62,7 +62,7 @@ public class ICPreferences {
HelpPlugin.getTocManager().clearCache();
}
-
+
public static List<IC> getICs()
{
return prefsToICs(
@@ -73,15 +73,15 @@ public class ICPreferences {
ICPreferences.get("org.eclipse.help.base",IHelpBaseConstants.P_KEY_REMOTE_HELP_PATH).split(DELIMITER), //$NON-NLS-1$
ICPreferences.get("org.eclipse.help.base",IHelpBaseConstants.P_KEY_REMOTE_HELP_ICEnabled).split(DELIMITER)); //$NON-NLS-1$
}
-
+
public static List<IC> prefsToICs(String names[],String protocols[],String hosts[],String ports[],String paths[],String states[])
{
List<IC> ics = new ArrayList<>();
-
+
for (int i=0;i<names.length;i++)
{
if (!names[i].equals("")) //$NON-NLS-1$
- {
+ {
try {
IC ic = new IC(
names[i],
@@ -99,11 +99,11 @@ public class ICPreferences {
}
return ics;
}
-
-
+
+
public static List<IC> getDefaultICs()
- {
+ {
return prefsToICs(
getDefault("org.eclipse.help.base",IHelpBaseConstants.P_KEY_REMOTE_HELP_NAME).split(DELIMITER), //$NON-NLS-1$
getDefault("org.eclipse.help.base",IHelpBaseConstants.P_KEY_REMOTE_HELP_PROTOCOL).split(DELIMITER), //$NON-NLS-1$
@@ -112,11 +112,11 @@ public class ICPreferences {
getDefault("org.eclipse.help.base",IHelpBaseConstants.P_KEY_REMOTE_HELP_PATH).split(DELIMITER), //$NON-NLS-1$
getDefault("org.eclipse.help.base",IHelpBaseConstants.P_KEY_REMOTE_HELP_ICEnabled).split(DELIMITER)); //$NON-NLS-1$
}
-
+
/**
* Returns a default preference for the given name
- *
+ *
* @param plugin - Name of the plugin containing this preference
* @param name - Name of the preference to retrieve
* @return value, or empty string if no preference found
@@ -125,22 +125,22 @@ public class ICPreferences {
{
return getDefaultNode(plugin).get(name, ""); //$NON-NLS-1$
}
-
+
public static void setRemoteHelp(boolean enabled)
{
set("org.eclipse.help.base",IHelpBaseConstants.P_KEY_REMOTE_HELP_ON,enabled+""); //$NON-NLS-1$ //$NON-NLS-2$
HelpPlugin.getTocManager().clearCache();
}
-
+
public static void setRemoteHelpPreferred(boolean remotePreferred)
{
set("org.eclipse.help.base",IHelpBaseConstants.P_KEY_REMOTE_HELP_PREFERRED,remotePreferred+""); //$NON-NLS-1$ //$NON-NLS-2$
HelpPlugin.getTocManager().clearCache();
}
-
+
/**
* Sets a preference
- *
+ *
* @param plugin - Name of the plugin containing this preference
* @param name - Name of the preference
* @param value - Value to set
@@ -148,11 +148,11 @@ public class ICPreferences {
public static void set(String plugin,String name,String value)
{
set(getNode(plugin),name,value);
- }
-
+ }
+
/**
* Set a preference in the given node.
- *
+ *
* @param node
* @param name
* @param value
@@ -163,11 +163,11 @@ public class ICPreferences {
try {
node.flush();
} catch (BackingStoreException e) {} //Nothing we can do, move on
- }
-
+ }
+
/**
* Returns the preference found for the given name
- *
+ *
* @param plugin - Name of the plugin containing this preference
* @param name - Name of the preference to retrieve
* @return value, or empty string if no preference found
@@ -176,10 +176,10 @@ public class ICPreferences {
{
return getNode(plugin).get(name, ""); //$NON-NLS-1$
}
-
+
/**
* Get the IEclipsePreferences node for the given plugin
- *
+ *
* @param plugin
* @return
*/
@@ -188,17 +188,17 @@ public class ICPreferences {
IEclipsePreferences p = InstanceScope.INSTANCE.getNode(plugin);
return p;
}
-
+
/**
* Get the default IEclipsePreferences node for the given plugin
- *
+ *
* @param plugin
* @return
*/
public static IEclipsePreferences getDefaultNode(String plugin)
- {
+ {
IEclipsePreferences p = DefaultScope.INSTANCE.getNode(plugin);
return p;
- }
+ }
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICTable.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICTable.java
index f43b43796..866c22c3f 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICTable.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ICTable.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
*******************************************************************************/
@@ -39,22 +39,22 @@ public class ICTable {
private Table table;
private TableViewer viewer;
- private final String NAME_COLUMN = Messages.RemoteICViewer_Name;
- private final String LOCATION_COLUMN = Messages.RemoteICViewer_URL;
+ private final String NAME_COLUMN = Messages.RemoteICViewer_Name;
+ private final String LOCATION_COLUMN = Messages.RemoteICViewer_URL;
private final String STATUS_COLUMN = Messages.RemoteICViewer_Enabled;
// Set column names
private String[] columnNames = new String[] {NAME_COLUMN,
LOCATION_COLUMN, STATUS_COLUMN};
-
-
+
+
public ICTable(Composite parent) {
// Create the table
table = createTable(parent);
// Create and setup the TableViewer
viewer = createTableViewer();
-
+
loadPreferences();
}
@@ -88,32 +88,32 @@ public class ICTable {
gridData.heightHint = table.getItemHeight();
gridData.horizontalSpan = 1;
table.setLayoutData(gridData);
-
-
+
+
ColumnLayoutData[] fTableColumnLayouts= {
new ColumnWeightData(85),
new ColumnWeightData(165),
new ColumnWeightData(60)
- };
-
+ };
+
TableColumn column;
-
+
tableLayout.addColumnData(fTableColumnLayouts[0]);
column = new TableColumn(table, SWT.NONE, 0);
column.setResizable(fTableColumnLayouts[0].resizable);
column.setText(NAME_COLUMN);
-
+
tableLayout.addColumnData(fTableColumnLayouts[1]);
column = new TableColumn(table, SWT.NONE, 1);
column.setResizable(fTableColumnLayouts[1].resizable);
- column.setText(LOCATION_COLUMN);
-
+ column.setText(LOCATION_COLUMN);
+
tableLayout.addColumnData(fTableColumnLayouts[2]);
column = new TableColumn(table, SWT.NONE, 2);
column.setResizable(fTableColumnLayouts[2].resizable);
- column.setText(STATUS_COLUMN);
-
+ column.setText(STATUS_COLUMN);
+
return table;
}
@@ -132,13 +132,13 @@ public class ICTable {
/**
* Proxy for the the RemoteICList which provides content
- * for the Table. This class implements IRemoteHelpListViewer interface an
+ * for the Table. This class implements IRemoteHelpListViewer interface an
* registers itself with RemoteICList
*/
class ICContentProvider implements IStructuredContentProvider
{
private List<IC> content = new ArrayList<>();
-
+
@Override
public void dispose() {
content = null;
@@ -154,9 +154,9 @@ public class ICTable {
public IC[] getElements(Object inputElement) {
return content.toArray(new IC[content.size()]);
}
-
+
}
-
+
public class ICLabelProvider extends LabelProvider implements ITableLabelProvider {
@Override
@@ -179,10 +179,10 @@ public class ICTable {
}
}
-
-
-
-
+
+
+
+
/**
* @param rics the ordered remote InfoCenters
*/
@@ -190,17 +190,17 @@ public class ICTable {
viewer.getContentProvider().inputChanged(viewer, null, ics);
refresh();
}
-
+
/**
- * Make sure the table viewer shows the latest copy of the ordered InfoCenters
+ * Make sure the table viewer shows the latest copy of the ordered InfoCenters
*/
public void refresh() {
viewer.refresh(getICs());
}
-
+
/**
* Return the column names in a collection
- *
+ *
* @return List containing column names
*/
public List<String> getColumnNames() {
@@ -213,7 +213,7 @@ public class ICTable {
public ISelection getSelection() {
return viewer.getSelection();
}
-
+
/**
* Return the RemoteICList
*/
@@ -231,11 +231,11 @@ public class ICTable {
List<IC> oldICs = getICs();
for (int o=0;o<oldICs.size();o++)
removeIC(oldICs.get(o));
-
+
for (int i=0;i<ics.size();i++)
addIC(ics.get(i));
}
-
+
public TableViewer getTableViewer()
{
return viewer;
@@ -250,7 +250,7 @@ public class ICTable {
public Table getTable() {
return table;
}
-
+
public void addIC(IC ic)
{
List<IC> content = getICs();
@@ -260,9 +260,9 @@ public class ICTable {
getTableViewer().add(ic);
refresh();
}
-
+
public void editIC(IC ic)
- {
+ {
List<IC> content = getICs();
content.set(getTable().getSelectionIndex(), ic);
getTableViewer().replace(ic,getTable().getSelectionIndex());
@@ -270,7 +270,7 @@ public class ICTable {
getTableViewer(), null, content);
refresh();
}
-
+
public void removeIC(IC ic)
{
List<IC> content = getICs();
@@ -279,7 +279,7 @@ public class ICTable {
getTableViewer().remove(ic);
refresh();
}
-
+
private void loadPreferences()
{
List<IC> ics = ICPreferences.getICs();
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/TabFolderLayout.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/TabFolderLayout.java
index 2be3ca33f..ec50107a5 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/TabFolderLayout.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/TabFolderLayout.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
*******************************************************************************/
@@ -24,7 +24,7 @@ public class TabFolderLayout extends Layout {
protected Point computeSize (Composite composite, int wHint, int hHint, boolean flushCache) {
if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT)
return new Point(wHint, hHint);
-
+
Control [] children = composite.getChildren ();
int count = children.length;
int maxWidth = 0, maxHeight = 0;
@@ -34,20 +34,20 @@ public class TabFolderLayout extends Layout {
maxWidth = Math.max (maxWidth, pt.x);
maxHeight = Math.max (maxHeight, pt.y);
}
-
+
if (wHint != SWT.DEFAULT)
maxWidth= wHint;
if (hHint != SWT.DEFAULT)
maxHeight= hHint;
-
- return new Point(maxWidth, maxHeight);
-
+
+ return new Point(maxWidth, maxHeight);
+
}
-
+
@Override
protected void layout (Composite composite, boolean flushCache) {
Rectangle rect= composite.getClientArea();
-
+
Control[] children = composite.getChildren();
for (int i = 0; i < children.length; i++) {
children[i].setBounds(rect);
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaContentProvider.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaContentProvider.java
index a51572ed0..d0d9c5672 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaContentProvider.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaContentProvider.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,7 +18,7 @@ import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
public class HelpCriteriaContentProvider implements ITreeContentProvider {
-
+
public static final String UNCATEGORIZED = "Uncategorized"; //$NON-NLS-1$
public static class CriterionName{
@@ -26,14 +26,14 @@ public class HelpCriteriaContentProvider implements ITreeContentProvider {
this.id = id;
this.parent = parent;
}
-
+
private String id;
private Object parent;
-
+
public String getId() {
return id;
}
-
+
public String getName() {
return HelpPlugin.getCriteriaManager().getCriterionDisplayName(id, Platform.getNL());
}
@@ -41,7 +41,7 @@ public class HelpCriteriaContentProvider implements ITreeContentProvider {
public Object getParent() {
return parent;
}
-
+
@Override
public boolean equals(Object arg0) {
if (arg0 instanceof CriterionName) {
@@ -50,26 +50,26 @@ public class HelpCriteriaContentProvider implements ITreeContentProvider {
}
return false;
}
-
+
@Override
public int hashCode() {
return id.hashCode();
}
}
-
+
public static class CriterionValue{
public CriterionValue(String id, Object parent) {
this.id = id;
this.parent = parent;
}
-
+
private String id;
private Object parent;
-
+
public String getId() {
return id;
}
-
+
public String getName() {
if (id.equals(UNCATEGORIZED)) {
return Messages.UncategorizedCriteria;
@@ -81,7 +81,7 @@ public class HelpCriteriaContentProvider implements ITreeContentProvider {
public Object getParent() {
return parent;
}
-
+
@Override
public boolean equals(Object arg0) {
if (arg0 instanceof CriterionValue) {
@@ -90,7 +90,7 @@ public class HelpCriteriaContentProvider implements ITreeContentProvider {
}
return false;
}
-
+
@Override
public int hashCode() {
return id.hashCode() + parent.hashCode();
@@ -118,7 +118,7 @@ public class HelpCriteriaContentProvider implements ITreeContentProvider {
return criterionNames;
} else if (parentElement instanceof CriterionName) {
CriterionName parentCriterion = (CriterionName) parentElement;
-
+
String[] values = BaseHelpSystem.getWorkingSetManager().getCriterionValueIds(parentCriterion.getId());
CriterionValue[] criterionValues = new CriterionValue[values.length];
for (int i = 0; i < values.length; i++) {
@@ -139,7 +139,7 @@ public class HelpCriteriaContentProvider implements ITreeContentProvider {
return ((CriterionName) element).getParent();
} else if (element instanceof CriterionValue) {
return ((CriterionValue) element).getParent();
- } else
+ } else
return null;
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaLabelProvider.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaLabelProvider.java
index 82c3e54c4..19e204cbc 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaLabelProvider.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaLabelProvider.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 HelpCriteriaLabelProvider extends LabelProvider {
} else if (element instanceof HelpCriteriaContentProvider.CriterionValue) {
CriterionValue criterionValue = (HelpCriteriaContentProvider.CriterionValue)element;
return criterionValue.getName();
- }
+ }
return null;
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpWorkingSetElementLabelProvider.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpWorkingSetElementLabelProvider.java
index 91a746e31..98f49a188 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpWorkingSetElementLabelProvider.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpWorkingSetElementLabelProvider.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.ui/src/org/eclipse/help/ui/internal/search/HelpWorkingSetTreeContentProvider.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpWorkingSetTreeContentProvider.java
index 4cc3f60a9..3ded9a445 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpWorkingSetTreeContentProvider.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpWorkingSetTreeContentProvider.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.ui/src/org/eclipse/help/ui/internal/search/InfoCenterPage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterPage.java
index 125d214d2..cef402645 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterPage.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterPage.java
@@ -59,7 +59,7 @@ public class InfoCenterPage extends RootScopePage {
//private boolean firstCheck;
private RemoteWorkingSet workingSet;
-
+
private boolean tocStale;
class RemoteWorkingSet extends WorkingSet {
@@ -121,14 +121,14 @@ public class InfoCenterPage extends RootScopePage {
initializeDialogUnits(parent);
Label label = new Label(parent, SWT.NULL);
- label.setText(Messages.InfoCenterPage_url);
+ label.setText(Messages.InfoCenterPage_url);
urlText = new Text(parent, SWT.BORDER);
urlText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
urlText.setEditable(getEngineDescriptor().isUserDefined());
searchAll = new Button(parent, SWT.RADIO);
- searchAll.setText(Messages.selectAll);
+ searchAll.setText(Messages.selectAll);
GridData gd = new GridData();
gd.horizontalSpan = 2;
searchAll.setLayoutData(gd);
@@ -142,7 +142,7 @@ public class InfoCenterPage extends RootScopePage {
});
searchSelected = new Button(parent, SWT.RADIO);
- searchSelected.setText(Messages.selectWorkingSet);
+ searchSelected.setText(Messages.selectWorkingSet);
gd = new GridData();
gd.horizontalSpan = 2;
searchSelected.setLayoutData(gd);
@@ -160,7 +160,7 @@ public class InfoCenterPage extends RootScopePage {
label = new Label(parent, SWT.WRAP);
label.setFont(font);
- label.setText(Messages.WorkingSetContent);
+ label.setText(Messages.WorkingSetContent);
gd = new GridData(GridData.GRAB_HORIZONTAL
| GridData.HORIZONTAL_ALIGN_FILL
| GridData.VERTICAL_ALIGN_CENTER);
@@ -201,7 +201,7 @@ public class InfoCenterPage extends RootScopePage {
() -> setSubtreeChecked(element, tree.getChecked(element), false));
}
});
-
+
applyDialogFont(parent);
// Set help for the page
@@ -240,7 +240,7 @@ public class InfoCenterPage extends RootScopePage {
}
}
}
-
+
private void resetRemoteTocs() {
remoteTocs = new AdaptableTocsArray(new IToc[0]);
}
@@ -338,7 +338,7 @@ public class InfoCenterPage extends RootScopePage {
}
});
}
-
+
private void updateTocs() {
//String url = urlText.getText();
//busyLoadTocs(url);
@@ -355,14 +355,14 @@ public class InfoCenterPage extends RootScopePage {
}
});
}
-
+
/*
private void busyLoadTocs(final String url) {
BusyIndicator.showWhile(urlText.getDisplay(), new Runnable() {
public void run() {
loadTocs(url);
}
- });
+ });
}
*/
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterSearchScopeFactory.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterSearchScopeFactory.java
index c0a515158..04317b090 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterSearchScopeFactory.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/InfoCenterSearchScopeFactory.java
@@ -27,7 +27,7 @@ public class InfoCenterSearchScopeFactory implements ISearchScopeFactory {
public static final String P_SEARCH_SELECTED = "searchSelected"; //$NON-NLS-1$
public static final String P_TOCS = "tocs"; //$NON-NLS-1$
public static final String TOC_SEPARATOR = ";"; //$NON-NLS-1$
-
+
@Override
public ISearchScope createSearchScope(IPreferenceStore store, String engineId,
Dictionary<String, Object> parameters) {
@@ -50,7 +50,7 @@ public class InfoCenterSearchScopeFactory implements ISearchScopeFactory {
}
return new InfoCenter.Scope(url, searchSelected, tocs);
}
-
+
private String getProperty(String key, IPreferenceStore store, String engineId,
Dictionary<String, Object> parameters) {
// try the store first
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java
index 0fd09e335..5505cea81 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java
@@ -54,7 +54,7 @@ public class LocalHelpPage extends RootScopePage {
private ITreeContentProvider contentTreeContentProvider;
private ILabelProvider contentTreeLabelProvider;
-
+
private CheckboxTreeViewer criteriaTree;
private ITreeContentProvider criteriaTreeContentProvider;
@@ -86,7 +86,7 @@ public class LocalHelpPage extends RootScopePage {
initializeDialogUnits(parent);
searchAll = new Button(parent, SWT.RADIO);
- searchAll.setText(Messages.selectAll);
+ searchAll.setText(Messages.selectAll);
GridData gd = new GridData();
gd.horizontalSpan = 2;
searchAll.setLayoutData(gd);
@@ -102,7 +102,7 @@ public class LocalHelpPage extends RootScopePage {
});
searchSelected = new Button(parent, SWT.RADIO);
- searchSelected.setText(Messages.selectWorkingSet);
+ searchSelected.setText(Messages.selectWorkingSet);
gd = new GridData();
gd.horizontalSpan = 2;
searchSelected.setLayoutData(gd);
@@ -125,7 +125,7 @@ public class LocalHelpPage extends RootScopePage {
Label contentLabel = new Label(parent, SWT.WRAP);
contentLabel.setFont(font);
- contentLabel.setText(Messages.WorkingSetContent);
+ contentLabel.setText(Messages.WorkingSetContent);
gd = new GridData(GridData.GRAB_HORIZONTAL
| GridData.HORIZONTAL_ALIGN_FILL
| GridData.VERTICAL_ALIGN_CENTER);
@@ -133,11 +133,11 @@ public class LocalHelpPage extends RootScopePage {
contentLabel.setLayoutData(gd);
createContentTree(parent, font);
-
+
if (HelpPlugin.getCriteriaManager().isCriteriaEnabled()) {
Label criteriaLabel = new Label(parent, SWT.WRAP);
criteriaLabel.setFont(font);
- criteriaLabel.setText(Messages.WorkingSetCriteria);
+ criteriaLabel.setText(Messages.WorkingSetCriteria);
gd = new GridData(GridData.GRAB_HORIZONTAL
| GridData.HORIZONTAL_ALIGN_FILL
| GridData.VERTICAL_ALIGN_CENTER);
@@ -145,7 +145,7 @@ public class LocalHelpPage extends RootScopePage {
criteriaLabel.setLayoutData(gd);
createCriteriaTree(parent, font);
}
-
+
initializeCheckedState();
applyDialogFont(parent);
@@ -201,7 +201,7 @@ public class LocalHelpPage extends RootScopePage {
}
return convertHeightInCharsToPixels(15);
}
-
+
protected void createCriteriaTree(Composite parent, Font font) {
GridData gd;
@@ -261,7 +261,7 @@ public class LocalHelpPage extends RootScopePage {
return contentProvider.hasChildren(element);
}
- void updateParentState(Object child, boolean baseChildState,
+ void updateParentState(Object child, boolean baseChildState,
CheckboxTreeViewer tree, ITreeContentProvider contentProvider) {
if (child == null)
return;
@@ -289,7 +289,7 @@ public class LocalHelpPage extends RootScopePage {
}
void setSubtreeChecked(Object parent, boolean state,
- boolean checkExpandedState,
+ boolean checkExpandedState,
CheckboxTreeViewer tree, ITreeContentProvider contentProvider) {
Object[] children = contentProvider.getChildren(parent);
@@ -306,7 +306,7 @@ public class LocalHelpPage extends RootScopePage {
}
@SuppressWarnings({ "unchecked", "rawtypes" })
- private void findCheckedElements(java.util.List checkedResources, Object parent,
+ private void findCheckedElements(java.util.List checkedResources, Object parent,
CheckboxTreeViewer tree, ITreeContentProvider contentProvider) {
Object[] children = contentProvider.getChildren(parent);
for (int i = 0; i < children.length; i++) {
@@ -316,8 +316,8 @@ public class LocalHelpPage extends RootScopePage {
checkedResources.add(children[i]);
}
}
-
- private CriterionResource[] findCheckedCriteria(Object parent,
+
+ private CriterionResource[] findCheckedCriteria(Object parent,
CheckboxTreeViewer tree, ITreeContentProvider contentProvider) {
Object[] children = contentProvider.getChildren(parent);
List<CriterionResource> resources = new ArrayList<>();
@@ -339,7 +339,7 @@ public class LocalHelpPage extends RootScopePage {
return resources.toArray(new CriterionResource[resources.size()]);
}
- void handleCheckStateChange(final CheckStateChangedEvent event,
+ void handleCheckStateChange(final CheckStateChangedEvent event,
final CheckboxTreeViewer tree, final ITreeContentProvider contentProvider) {
BusyIndicator.showWhile(getShell().getDisplay(), () -> {
Object element = event.getElement();
@@ -361,8 +361,8 @@ public class LocalHelpPage extends RootScopePage {
criteria = new CriterionResource[0];
} else {
criteria = findCheckedCriteria(
- criteriaTree.getInput(),
- criteriaTree,
+ criteriaTree.getInput(),
+ criteriaTree,
criteriaTreeContentProvider);
}
findCheckedElements(elements, contentTree.getInput(), contentTree, contentTreeContentProvider);
@@ -426,7 +426,7 @@ public class LocalHelpPage extends RootScopePage {
}
}
}
-
+
@Override
protected void performDefaults() {
searchAll.setSelection(true);
@@ -437,7 +437,7 @@ public class LocalHelpPage extends RootScopePage {
}
super.performDefaults();
}
-
+
@Override
protected Label createDescriptionLabel(Composite parent) {
if ( getContainer() == null ) {
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalSearchScopeFactory.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalSearchScopeFactory.java
index da7acdfb2..f15c8ee8b 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalSearchScopeFactory.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalSearchScopeFactory.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 @@ import org.eclipse.jface.preference.IPreferenceStore;
public class LocalSearchScopeFactory implements ISearchScopeFactory {
public final static String P_WORKING_SET = "workingSet"; //$NON-NLS-1$
public final static String P_CAPABILITY_FILTERING = "capabilityFiltering"; //$NON-NLS-1$
-
+
@Override
public ISearchScope createSearchScope(IPreferenceStore store, String engineId,
Dictionary<String, Object> parameters) {
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/WebSearchPage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/WebSearchPage.java
index 0cfda2656..5c0195f3d 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/WebSearchPage.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/WebSearchPage.java
@@ -38,7 +38,7 @@ public class WebSearchPage extends RootScopePage {
initializeDialogUnits(parent);
Label label = new Label(parent, SWT.NULL);
- label.setText(Messages.WebSearchPage_label);
+ label.setText(Messages.WebSearchPage_label);
GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
label.setLayoutData(gd);
urlText = new Text(parent, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL
@@ -51,7 +51,7 @@ public class WebSearchPage extends RootScopePage {
urlText.setEditable(getEngineDescriptor().isUserDefined());
new Label(parent, SWT.NULL);
label = new Label(parent, SWT.WRAP);
- label.setText(Messages.WebSearchPage_info);
+ label.setText(Messages.WebSearchPage_info);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint = 100;
label.setLayoutData(gd);
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/WebSearchScopeFactory.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/WebSearchScopeFactory.java
index b2929c82a..1cebaf1d1 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/WebSearchScopeFactory.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/WebSearchScopeFactory.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
*******************************************************************************/
@@ -22,14 +22,14 @@ import org.eclipse.jface.preference.IPreferenceStore;
*/
public class WebSearchScopeFactory implements ISearchScopeFactory {
public final static String P_URL = "url"; //$NON-NLS-1$
-
+
@Override
public ISearchScope createSearchScope(IPreferenceStore store, String engineId,
Dictionary<String, Object> parameters) {
String urlTemplate = getProperty(store, engineId, parameters);
return new WebSearch.Scope(urlTemplate);
}
-
+
private String getProperty(IPreferenceStore store, String engineId,
Dictionary<String, Object> parameters) {
// try the store first
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/AbstractOverlayIcon.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/AbstractOverlayIcon.java
index 3edae8bec..ccd525936 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/AbstractOverlayIcon.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/AbstractOverlayIcon.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.ui/src/org/eclipse/help/ui/internal/util/ErrorUtil.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/ErrorUtil.java
index e2a279c78..7b53d9a60 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/ErrorUtil.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/ErrorUtil.java
@@ -38,7 +38,7 @@ public class ErrorUtil implements IErrorUtil {
/**
* Immediately displays error dialog with a given string
- *
+ *
* @param msg
* error message to display and log.
*/
@@ -56,7 +56,7 @@ public class ErrorUtil implements IErrorUtil {
/**
* Immediately displays an Information dialog with a given string
- *
+ *
* @param msg
* error message to display.
*/
@@ -74,7 +74,7 @@ public class ErrorUtil implements IErrorUtil {
/**
* Immediately displays a Question dialog with a given string (question).
- *
+ *
* @return which button(Yes/No) was pressed by user
*/
public static boolean displayQuestionDialog(String msg) {
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/EscapeUtils.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/EscapeUtils.java
index 1114c6a16..66e18a753 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/EscapeUtils.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/EscapeUtils.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,7 +27,7 @@ public class EscapeUtils {
public static String escapeSpecialChars(String value) {
return escapeSpecialChars(value, false);
}
-
+
/**
* Replace every occurrence of &, <, >, ', " by an escape character
* but allow <b> and </b> through
@@ -38,11 +38,11 @@ public class EscapeUtils {
public static String escapeSpecialCharsLeavinggBold(String value) {
return escapeSpecialChars(value, true);
}
-
+
public static String escapeAmpersand(String value) {
return value.replaceAll("&", "&amp;"); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
/**
* Escape any ampersands used in a label
**/
@@ -52,7 +52,7 @@ public class EscapeUtils {
if (message.indexOf('&') < 0) {
return message;
}
-
+
int next = 0;
StringBuffer result = new StringBuffer();
int index = message.indexOf('&');
@@ -108,7 +108,7 @@ public class EscapeUtils {
buf.append("<br/>"); //$NON-NLS-1$
i+= 3;
continue;
- }
+ }
}
if (i + 2 < length) {
String tag = value.substring(i, i + 3);
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/FontUtils.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/FontUtils.java
index 644f6557c..5362bd42c 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/FontUtils.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/FontUtils.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,7 +16,7 @@ import org.eclipse.osgi.service.environment.Constants;
import org.eclipse.swt.widgets.Display;
public class FontUtils {
-
+
private static final int TRAY_FONT_HEIGHT_LIMIT = 17;
/*
@@ -31,7 +31,7 @@ public class FontUtils {
return true;
}
}
-
+
/*
* Get a sequence of JavaScript which will scale the embedded browser contents
* @param percent The percentage scaling relative to the default size
@@ -46,7 +46,7 @@ public class FontUtils {
}
return null; // No rescale in Mozilla browsers
}
-
+
/*
* Function to determine whether the browser in the help view supports a zoom command
*/
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/OverlayIcon.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/OverlayIcon.java
index 9ba4cc6f2..52b1202b2 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/OverlayIcon.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/OverlayIcon.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.ui/src/org/eclipse/help/ui/internal/views/AllTopicsPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/AllTopicsPart.java
index d0679e459..761e26617 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/AllTopicsPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/AllTopicsPart.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
*******************************************************************************/
@@ -98,15 +98,15 @@ public class AllTopicsPart extends HyperlinkTreePart {
boolean expandable = treeViewer.isExpandable(obj);
if (obj instanceof Toc){
Toc toc = (Toc) obj;
- Image icon = HelpUIResources.getImageFromId(toc.getIcon(), expanded, !expandable);
+ Image icon = HelpUIResources.getImageFromId(toc.getIcon(), expanded, !expandable);
if (icon != null) {
return icon;
- }
+ }
}
-
+
if (obj instanceof Topic) {
- Topic topic = (Topic) obj;
- Image icon = HelpUIResources.getImageFromId(topic.getIcon(), expanded, !expandable);
+ Topic topic = (Topic) obj;
+ Image icon = HelpUIResources.getImageFromId(topic.getIcon(), expanded, !expandable);
if (icon != null) {
return icon;
}
@@ -250,7 +250,7 @@ public class AllTopicsPart extends HyperlinkTreePart {
}
}
}
-
+
public void selectReveal(IHelpResource res) {
treeViewer.setSelection(new StructuredSelection(res), true);
treeViewer.expandToLevel(res, 1);
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BookmarkHeaderPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BookmarkHeaderPart.java
index 0ad25df0f..0402f3917 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BookmarkHeaderPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BookmarkHeaderPart.java
@@ -30,7 +30,7 @@ public class BookmarkHeaderPart extends AbstractFormPart implements IHelpPart {
private Composite container;
private String id;
- public BookmarkHeaderPart(Composite parent, FormToolkit toolkit) {
+ public BookmarkHeaderPart(Composite parent, FormToolkit toolkit) {
container = toolkit.createComposite(parent);
Composite inner = toolkit.createComposite(container);
GridLayout layout = new GridLayout();
@@ -40,7 +40,7 @@ public class BookmarkHeaderPart extends AbstractFormPart implements IHelpPart {
data.heightHint = 2;
inner.setLayoutData(data);
}
-
+
@Override
public void init(ReusableHelpPart parent, String id, IMemento memento) {
this.id = id;
@@ -82,17 +82,17 @@ public class BookmarkHeaderPart extends AbstractFormPart implements IHelpPart {
@Override
public void stop() {
-
+
}
@Override
public void toggleRoleFilter() {
-
+
}
@Override
public void refilter() {
-
+
}
-
+
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BookmarksPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BookmarksPart.java
index f465af0d6..b85bcb4e0 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BookmarksPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BookmarksPart.java
@@ -80,7 +80,7 @@ public class BookmarksPart extends HyperlinkTreePart implements Observer {
@Override
public String getText(Object obj) {
if (obj instanceof BookmarkManager)
- return Messages.BookmarksPart_savedTopics;
+ return Messages.BookmarksPart_savedTopics;
if (obj instanceof IHelpResource)
return ((IHelpResource) obj).getLabel();
return super.getText(obj);
@@ -131,10 +131,10 @@ public class BookmarksPart extends HyperlinkTreePart implements Observer {
}
}
};
- deleteAction.setText(Messages.BookmarksPart_delete);
+ deleteAction.setText(Messages.BookmarksPart_delete);
deleteAction.setEnabled(false);
}
-
+
@Override
protected void handleSelectionChanged(IStructuredSelection sel) {
Object obj = sel.getFirstElement();
@@ -165,7 +165,7 @@ public class BookmarksPart extends HyperlinkTreePart implements Observer {
() -> BaseHelpSystem.getBookmarkManager().removeAllBookmarks());
}
};
- action.setText(Messages.BookmarksPart_deleteAll);
+ action.setText(Messages.BookmarksPart_deleteAll);
manager.add(action);
value=true;
}
@@ -189,7 +189,7 @@ public class BookmarksPart extends HyperlinkTreePart implements Observer {
parent.showURL(res.getHref());
}
}
-
+
@Override
public void update(final Observable o, final Object arg) {
treeViewer.getControl().getDisplay().asyncExec(() -> asyncUpdate(o, arg));
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java
index f4a81fd5c..98d418299 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java
@@ -54,7 +54,7 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
private final static String HIGHLIGHT_ON = "highlight-on"; //$NON-NLS-1$
private final static String HELP_VIEW_SCALE = "help_view_scale"; //$NON-NLS-1$
private final static String EMPTY_PAGE = "<html><head></head><body></body></html>"; //$NON-NLS-1$
-
+
private ReusableHelpPart parent;
private Browser browser;
@@ -64,11 +64,11 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
private int lastProgress = -1;
private static final int SCALE_MAX = 250;
-
+
private static final int SCALE_MIN = 50;
-
+
private static final int SCALE_INCREMENT = 10;
-
+
private int fontScalePercentage = 100;
private String url;
@@ -76,15 +76,15 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
private Action showExternalAction;
private Action syncTocAction;
-
+
private Action highlightAction;
private Action bookmarkAction;
private Action printAction;
-
+
private Action magnifyAction;
-
+
private Action reduceAction;
private String statusURL;
@@ -242,12 +242,12 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
bookmarkAction.setToolTipText(Messages.BrowserPart_bookmarkTooltip);
bookmarkAction.setImageDescriptor(HelpUIResources
.getImageDescriptor(IHelpUIConstants.IMAGE_ADD_BOOKMARK));
-
+
highlightAction = new Action() {
@Override
public void run() {
- IScopeContext instanceScope = InstanceScope.INSTANCE;
+ IScopeContext instanceScope = InstanceScope.INSTANCE;
IEclipsePreferences prefs = instanceScope.getNode(HelpBasePlugin.PLUGIN_ID);
prefs.putBoolean(HIGHLIGHT_ON, highlightAction.isChecked());
if (browser.getUrl().indexOf("resultof")!=-1) browser.execute("setHighlight(" +highlightAction.isChecked()+");"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -257,7 +257,7 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
highlightAction.setToolTipText(Messages.BrowserPart_highlightTooltip);
highlightAction.setImageDescriptor(HelpUIResources
.getImageDescriptor(IHelpUIConstants.IMAGE_HIGHLIGHT));
-
+
printAction = new Action(ActionFactory.PRINT.getId()) {
@Override
@@ -268,7 +268,7 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
printAction.setImageDescriptor(HelpUIResources
.getImageDescriptor(IHelpUIConstants.IMAGE_HELP_PRINT));
printAction.setToolTipText(Messages.BrowserPart_printTooltip);
-
+
tbm.insertBefore("back", showExternalAction); //$NON-NLS-1$
tbm.insertBefore("back", syncTocAction); //$NON-NLS-1$
tbm.insertBefore("back", printAction); //$NON-NLS-1$
@@ -277,13 +277,13 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
tbm.insertBefore("back", new Separator()); //$NON-NLS-1$
enableButtons();
}
-
+
private void contributeToMenu(IMenuManager menuManager) {
if (FontUtils.canRescaleHelpView()) {
fontScalePercentage = Platform.getPreferencesService().getInt(HelpBasePlugin.PLUGIN_ID,
HELP_VIEW_SCALE, 100, null);
if (menuManager != null) {
- addMenuActions(menuManager);
+ addMenuActions(menuManager);
}
}
}
@@ -360,7 +360,7 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
browser.setUrl(url);
}
}
-
+
public void clearBrowser() {
if (browser != null) {
browser.setText(EMPTY_PAGE);
@@ -456,17 +456,17 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
return printAction;
return null;
}
-
+
private void enableButtons() {
if (magnifyAction != null) {
magnifyAction.setEnabled(fontScalePercentage < SCALE_MAX);
- reduceAction.setEnabled(fontScalePercentage > SCALE_MIN);
+ reduceAction.setEnabled(fontScalePercentage > SCALE_MIN);
}
}
private void doMagnify(int percent) {
fontScalePercentage += percent;
- IScopeContext instanceScope = InstanceScope.INSTANCE;
+ IScopeContext instanceScope = InstanceScope.INSTANCE;
IEclipsePreferences prefs = instanceScope.getNode(HelpBasePlugin.PLUGIN_ID);
prefs.putInt(HELP_VIEW_SCALE, fontScalePercentage);
try {
@@ -477,7 +477,7 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
}
public void rescale() {
- browser.execute(FontUtils.getRescaleScript(fontScalePercentage));
+ browser.execute(FontUtils.getRescaleScript(fontScalePercentage));
enableButtons();
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/Chevron.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/Chevron.java
index d99f9450e..a382abfbe 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/Chevron.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/Chevron.java
@@ -24,7 +24,7 @@ public final class Chevron extends ToggleHyperlink {
/**
* Creates a control in a provided composite.
- *
+ *
* @param parent
* the parent
* @param style
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ComboPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ComboPart.java
index 17cd277de..4c97c7e10 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ComboPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ComboPart.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 ComboPart {
public ComboPart() {
}
-
+
public ComboPart(Composite parent, FormToolkit toolkit, int style) {
createControl(parent, toolkit, style);
}
@@ -34,20 +34,20 @@ public class ComboPart {
else
((CCombo) combo).addSelectionListener(listener);
}
-
+
public void addModifyListener(ModifyListener listener) {
if (combo instanceof Combo)
((Combo) combo).addModifyListener(listener);
else
((CCombo) combo).addModifyListener(listener);
- }
-
+ }
+
public void addKeyListener(KeyListener listener) {
if (combo instanceof Combo)
((Combo) combo).addKeyListener(listener);
else
((CCombo) combo).addKeyListener(listener);
- }
+ }
public void createControl(Composite parent, FormToolkit toolkit, int style) {
if (toolkit.getBorderStyle() == SWT.BORDER)
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.java
index e37a24540..df697e977 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.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
*******************************************************************************/
@@ -80,7 +80,7 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
private ReusableHelpPart parent;
private static final String HELP_KEY = "org.eclipse.ui.help"; //$NON-NLS-1$
-
+
private static final String MORE_HREF = "__more__"; //$NON-NLS-1$
private FormText text;
@@ -96,7 +96,7 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
private String defaultText = ""; //$NON-NLS-1$
private String id;
-
+
private Font codeFont;
private String savedDescription;
@@ -171,8 +171,8 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
public void getName(AccessibleEvent e) {
if (e.childID == ACC.CHILDID_SELF) {
String currentName = e.result;
- e.result = Messages.ReusableHelpPart_contextHelpPage_name
- + ' ' + getSection().getText()+ ' ' +currentName;
+ e.result = Messages.ReusableHelpPart_contextHelpPage_name
+ + ' ' + getSection().getText()+ ' ' +currentName;
}
}
});
@@ -186,12 +186,12 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
}
return style;
}
-
+
private static Font createCodeFont(Display display, Font regularFont, Font textFont) {
FontData[] rfontData = regularFont.getFontData();
FontData[] tfontData = textFont.getFontData();
int height = 0;
-
+
for (int i=0; i<rfontData.length; i++) {
FontData data = rfontData[i];
height = Math.max(height, data.getHeight());
@@ -201,7 +201,7 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
}
return new Font(display, tfontData);
}
-
+
@Override
public void dispose() {
if (codeFont!=null)
@@ -258,7 +258,7 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
parent.showURL(sHref);
}
}
-
+
private void doRunCommand(String serialization) {
ExecuteCommandAction action = new ExecuteCommandAction();
action.setInitializationString(serialization);
@@ -333,11 +333,11 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
updateDynamicHelp();
}
}
-
+
private long lastUpdate = 0;
private String[] searchTerms;
-
+
/*
* If F1 was pressed within the last half second and this is a context change do not
* update dynamic help solely due to a focus change, Bug 159450
@@ -394,7 +394,7 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
searchTerms = new String[] { expression };
}
}
-
+
private void updateDynamicHelp() {
RelatedTopicsPart part = (RelatedTopicsPart) parent
.findPart(IHelpUIConstants.HV_RELATED_TOPICS);
@@ -419,9 +419,9 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
}
return buff.length() > 0 ? buff.toString().trim() : null;
}
-
+
private class SearchTerms {
-
+
private List<String> terms = new ArrayList<>();
private Set<String> termSet = new HashSet<>();
public void add(String term) {
@@ -433,7 +433,7 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
terms.add(term);
}
}
-
+
public String[] toArray() {
return terms.toArray(new String[terms.size()]);
}
@@ -518,7 +518,7 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
}
return null;
}
-
+
private String stripMnemonic(String name) {
int loc = name.indexOf('&');
if (loc!= -1)
@@ -563,12 +563,12 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
sbuf.append("<p>"); //$NON-NLS-1$
sbuf.append(decodeContextBoldTags(context));
sbuf.append("</p>"); //$NON-NLS-1$
-
+
ICommandLink[] commands = null;
if (context instanceof IContext3) {
commands = ((IContext3)context).getRelatedCommands();
}
-
+
String category = new String();
if (commands != null && commands.length > 0) {
for (int i=0;i<commands.length;++i) {
@@ -589,7 +589,7 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
}
}
}
-
+
IHelpResource[] links = context.getRelatedTopics();
if (links != null && context instanceof IContext2) {
ContextHelpSorter sorter = new ContextHelpSorter((IContext2)context);
@@ -676,7 +676,7 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
/**
* Make sure to support the Help system bold tag. The help system returns a
* regular string for getText(). Use internal apis for now to get bold.
- *
+ *
* @param context
* @return
*/
@@ -749,7 +749,7 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
@Override
public void saveState(IMemento memento) {
}
-
+
private void doMore(String moreText) {
int index = Integer.parseInt(moreText);
parent.startSearch(searchTerms[index]);
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpProviderInput.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpProviderInput.java
index c3f1a4f00..d1af30b08 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpProviderInput.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpProviderInput.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
*******************************************************************************/
@@ -28,7 +28,7 @@ public class ContextHelpProviderInput {
this.part = part;
this.explicitRequest = explicitRequest;
}
-
+
public IContextProvider getProvider() {
return provider;
}
@@ -41,7 +41,7 @@ public class ContextHelpProviderInput {
public IWorkbenchPart getPart() {
return part;
}
-
+
public boolean isExplicitRequest() {
return explicitRequest;
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpSorter.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpSorter.java
index daea69229..3cc783597 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpSorter.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpSorter.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.jface.viewers.ViewerComparator;
public class ContextHelpSorter extends ViewerComparator {
private IContext2 context;
private LinkedList<String> list;
-
+
public ContextHelpSorter(IContext2 context) {
super(ReusableHelpPart.SHARED_COLLATOR);
list = new LinkedList<>();
this.context = context;
}
-
+
@Override
public void sort(Viewer viewer, Object[] elements) {
for (int i = 0; i < elements.length; i++) {
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/DynamicHelpPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/DynamicHelpPart.java
index 742ee940f..eec77dd4e 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/DynamicHelpPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/DynamicHelpPart.java
@@ -91,7 +91,7 @@ public class DynamicHelpPart extends SectionPart implements IHelpPart {
| Section.TITLE_BAR);
// configure section
Section section = getSection();
- section.setText(Messages.SearchPart_title);
+ section.setText(Messages.SearchPart_title);
section.marginWidth = 5;
section.addExpansionListener(new ExpansionAdapter() {
@@ -117,7 +117,7 @@ public class DynamicHelpPart extends SectionPart implements IHelpPart {
}
});
section.setTextClient(clearLink);
- */
+ */
resultSorter = new SorterByScore();
searchResults = toolkit.createFormText(section, false);
section.setClient(searchResults);
@@ -134,7 +134,7 @@ public class DynamicHelpPart extends SectionPart implements IHelpPart {
@Override
public void linkActivated(HyperlinkEvent e) {
Object href = e.getHref();
- if (href.equals(CANCEL_HREF)) {
+ if (href.equals(CANCEL_HREF)) {
if (runningJob != null) {
runningJob.cancel();
runningJob = null;
@@ -167,19 +167,19 @@ public class DynamicHelpPart extends SectionPart implements IHelpPart {
stop();
super.dispose();
}
-
+
@Override
public void setFocus() {
if (searchResults!=null)
searchResults.setFocus();
}
-
+
@Override
public void stop () {
if (runningJob!=null) {
runningJob.cancel();
runningJob=null;
- }
+ }
}
@Override
@@ -212,7 +212,7 @@ public class DynamicHelpPart extends SectionPart implements IHelpPart {
searchResults.setText("", false, false); //$NON-NLS-1$
getManagedForm().reflow(true);
}
-
+
public void startSearch(String newPhrase, IContext excludeContext) {
if (phrase!=null && phrase.equals(newPhrase))
return;
@@ -221,10 +221,10 @@ public class DynamicHelpPart extends SectionPart implements IHelpPart {
if (getSection().isExpanded())
startInPlaceSearch(phrase, excludeContext);
}
-
+
private void startInPlaceSearch(final String phrase,
final IContext excludeContext) {
- Job job = new Job(Messages.SearchPart_dynamicJob) {
+ Job job = new Job(Messages.SearchPart_dynamicJob) {
@Override
protected IStatus run(IProgressMonitor monitor) {
@@ -246,7 +246,7 @@ public class DynamicHelpPart extends SectionPart implements IHelpPart {
job.setSystem(true);
scheduleSearch(job);
}
-
+
private void performSearch(String phrase, IContext excludeContext,
IProgressMonitor monitor) {
SearchQuery searchQuery = new SearchQuery();
@@ -275,12 +275,12 @@ public class DynamicHelpPart extends SectionPart implements IHelpPart {
buff.append("<p><span color=\""); //$NON-NLS-1$
buff.append(IFormColors.TITLE);
buff.append("\">"); //$NON-NLS-1$
- buff.append(Messages.SearchResultsPart_progress);
+ buff.append(Messages.SearchResultsPart_progress);
buff.append("</span>"); //$NON-NLS-1$
buff.append("<a href=\""); //$NON-NLS-1$
buff.append(CANCEL_HREF);
buff.append("\">"); //$NON-NLS-1$
- buff.append(Messages.SearchResultsPart_cancel);
+ buff.append(Messages.SearchResultsPart_cancel);
buff.append("</a></p>"); //$NON-NLS-1$
buff.append("</form>"); //$NON-NLS-1$
searchResults.setText(buff.toString(), true, false);
@@ -288,14 +288,14 @@ public class DynamicHelpPart extends SectionPart implements IHelpPart {
runningJob = job;
job.schedule();
}
-
+
private void updateResults(final String phrase,
final IContext excludeContext, final StringBuffer buffer,
final SearchHit[] hits) {
if (getSection().isDisposed())
return;
getSection().getDisplay().asyncExec(() -> doUpdateResults(phrase, excludeContext, buffer, hits));
- }
+ }
private void doUpdateResults(String phrase, IContext excludeContext, StringBuffer buff, SearchHit[] hits) {
if (runningJob != null) {
@@ -308,7 +308,7 @@ public class DynamicHelpPart extends SectionPart implements IHelpPart {
buff.append("<p><span color=\""); //$NON-NLS-1$
buff.append(IFormColors.TITLE);
buff.append("\">"); //$NON-NLS-1$
- buff.append(NLS.bind(Messages.SearchResultsPart_label, phrase));
+ buff.append(NLS.bind(Messages.SearchResultsPart_label, phrase));
buff.append("</span></p>"); //$NON-NLS-1$
resultSorter.sort(null, hits);
IHelpResource [] excludedTopics = excludeContext!=null?excludeContext.getRelatedTopics():null;
@@ -345,7 +345,7 @@ public class DynamicHelpPart extends SectionPart implements IHelpPart {
buff.append(" <a href=\""); //$NON-NLS-1$
buff.append(MORE_HREF);
buff.append("\">"); //$NON-NLS-1$
- buff.append(Messages.SearchResultsPart_moreResults);
+ buff.append(Messages.SearchResultsPart_moreResults);
buff.append("</a></p>"); //$NON-NLS-1$
}
buff.append("</form>"); //$NON-NLS-1$
@@ -353,11 +353,11 @@ public class DynamicHelpPart extends SectionPart implements IHelpPart {
searchResults.setText(buff.toString(), true, false);
} else
if (!searchResults.isDisposed())
- searchResults.setText(NLS.bind(Messages.SearchResultsPart_noHits, phrase) , false, false);
+ searchResults.setText(NLS.bind(Messages.SearchResultsPart_noHits, phrase) , false, false);
if (!searchResults.isDisposed())
getManagedForm().reflow(true);
}
-
+
private boolean isExcluded(String href, IHelpResource [] excludedTopics) {
if (excludedTopics==null) return false;
for (int i=0; i<excludedTopics.length; i++) {
@@ -409,7 +409,7 @@ public class DynamicHelpPart extends SectionPart implements IHelpPart {
@Override
public void refilter() {
if (phrase!=null && phrase.length() > 0)
- startInPlaceSearch(phrase, context);
+ startInPlaceSearch(phrase, context);
}
@Override
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptor.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptor.java
index f81f3093d..79c02832c 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptor.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptor.java
@@ -32,7 +32,7 @@ public class EngineDescriptor implements IEngineDescriptor {
private ISearchEngine engine;
private IConfigurationElement config;
-
+
private EngineDescriptorManager manager;
private EngineTypeDescriptor etdesc;
@@ -52,12 +52,12 @@ public class EngineDescriptor implements IEngineDescriptor {
private boolean userDefined;
/**
- *
+ *
*/
public EngineDescriptor(IConfigurationElement config) {
this.config = config;
}
-
+
public EngineDescriptor(EngineDescriptorManager manager) {
this.manager = manager;
}
@@ -65,7 +65,7 @@ public class EngineDescriptor implements IEngineDescriptor {
public void setEngineType(EngineTypeDescriptor etdesc) {
this.etdesc = etdesc;
}
-
+
public void setEngineDescriptorManager(EngineDescriptorManager manager) {
this.manager = manager;
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptorManager.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptorManager.java
index 45e195c5f..a90956b4b 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptorManager.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineDescriptorManager.java
@@ -48,7 +48,7 @@ public class EngineDescriptorManager extends Observable implements IHelpUIConsta
private static final String USER_FILE = "userSearches.xml"; //$NON-NLS-1$
private static final String ATT_ENGINE_TYPE_ID = "engineTypeId"; //$NON-NLS-1$
-
+
public static class DescriptorEvent {
private EngineDescriptor desc;
private int kind;
@@ -68,7 +68,7 @@ public class EngineDescriptorManager extends Observable implements IHelpUIConsta
descriptors = new ArrayList<>();
load();
}
-
+
public void add(EngineDescriptor desc) {
descriptors.add(desc);
this.setChanged();
@@ -85,11 +85,11 @@ public class EngineDescriptorManager extends Observable implements IHelpUIConsta
this.setChanged();
this.notifyObservers(new DescriptorEvent(desc, CHANGE));
}
-
+
public EngineDescriptor[] getDescriptors() {
return descriptors.toArray(new EngineDescriptor[descriptors.size()]);
}
-
+
public EngineDescriptor findEngine(String engineId) {
for (int i=0; i<descriptors.size(); i++) {
EngineDescriptor desc = descriptors.get(i);
@@ -124,7 +124,7 @@ public class EngineDescriptorManager extends Observable implements IHelpUIConsta
writer.flush();
}
catch (IOException e) {
- HelpUIPlugin.logError(Messages.EngineDescriptorManager_errorSaving, e);
+ HelpUIPlugin.logError(Messages.EngineDescriptorManager_errorSaving, e);
}
finally {
if (osw!=null) {
@@ -152,7 +152,7 @@ public class EngineDescriptorManager extends Observable implements IHelpUIConsta
load(fileName);
}
catch (IOException e) {
- HelpUIPlugin.logError(Messages.EngineDescriptorManager_errorLoading, e);
+ HelpUIPlugin.logError(Messages.EngineDescriptorManager_errorLoading, e);
}
}
@@ -162,7 +162,7 @@ public class EngineDescriptorManager extends Observable implements IHelpUIConsta
Hashtable<String, EngineTypeDescriptor> engineTypes = loadEngineTypes(elements);
for (int i = 0; i < elements.length; i++) {
IConfigurationElement element = elements[i];
- if (element.getName().equals(TAG_ENGINE)) {
+ if (element.getName().equals(TAG_ENGINE)) {
EngineDescriptor desc = new EngineDescriptor(element);
String engineId = desc.getEngineTypeId();
if (engineId != null) {
@@ -279,7 +279,7 @@ public class EngineDescriptorManager extends Observable implements IHelpUIConsta
}
return typeId;
}
-
+
private boolean isUsed(int value, ArrayList<Integer> used) {
for (int i=0; i<used.size(); i++) {
Integer iv = used.get(i);
@@ -304,7 +304,7 @@ public class EngineDescriptorManager extends Observable implements IHelpUIConsta
}
return null;
}
-
+
private void save(PrintWriter writer, EngineDescriptor desc) {
String indent = " "; //$NON-NLS-1$
String attIndent = indent + indent;
@@ -318,14 +318,14 @@ public class EngineDescriptorManager extends Observable implements IHelpUIConsta
writer.print(indent);
writer.println("</engine>"); //$NON-NLS-1$
}
-
+
private String getAttribute(Node node, String name) {
Node att = node.getAttributes().getNamedItem(name);
if (att!=null)
return att.getNodeValue();
return null;
}
-
+
private void saveAttribute(PrintWriter writer, String indent, String name, String value) {
if (value==null)
return;
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeDescriptor.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeDescriptor.java
index 61d8f7b41..c85b21ab9 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeDescriptor.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeDescriptor.java
@@ -33,7 +33,7 @@ public class EngineTypeDescriptor {
private Image image;
private ISearchScopeFactory factory;
/**
- *
+ *
*/
public EngineTypeDescriptor(IConfigurationElement config) {
this.config = config;
@@ -44,9 +44,9 @@ public class EngineTypeDescriptor {
public IConfigurationElement [] getPages() {
return config.getChildren("subpage"); //$NON-NLS-1$
}
-
+
public String getLabel() {
- return config.getAttribute(IHelpUIConstants.ATT_LABEL);
+ return config.getAttribute(IHelpUIConstants.ATT_LABEL);
}
public String getId() {
return config.getAttribute(IHelpUIConstants.ATT_ID);
@@ -64,15 +64,15 @@ public class EngineTypeDescriptor {
image = HelpUIResources.getImage(IHelpUIConstants.IMAGE_HELP_SEARCH);
return image;
}
-
+
public String getDescription() {
String desc = null;
IConfigurationElement [] children = config.getChildren(IHelpUIConstants.TAG_DESC);
- if (children.length==1)
+ if (children.length==1)
desc = children[0].getValue();
return desc;
}
-
+
public ImageDescriptor getImageDescriptor() {
ImageDescriptor desc=null;
String icon = config.getAttribute(IHelpUIConstants.ATT_ICON);
@@ -110,7 +110,7 @@ public class EngineTypeDescriptor {
}
return null;
}
-
+
public ISearchScope createSearchScope(IPreferenceStore store, String engineId,
Dictionary<String, Object> parameters) {
if (factory==null) {
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeWizardPage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeWizardPage.java
index d00d819b7..e106422e1 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeWizardPage.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineTypeWizardPage.java
@@ -31,7 +31,7 @@ public class EngineTypeWizardPage extends WizardPage {
private TableViewer tableViewer;
private EngineTypeDescriptor [] engineTypes;
private EngineTypeDescriptor selection;
-
+
class EngineContentProvider implements IStructuredContentProvider {
@Override
@@ -47,7 +47,7 @@ public class EngineTypeWizardPage extends WizardPage {
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
}
-
+
class EngineLabelProvider extends LabelProvider implements ITableLabelProvider {
@Override
@@ -75,8 +75,8 @@ public class EngineTypeWizardPage extends WizardPage {
public EngineTypeWizardPage(EngineTypeDescriptor[] engineTypes) {
super("engineType"); //$NON-NLS-1$
- setTitle(Messages.EngineTypeWizardPage_title);
- setDescription(Messages.EngineTypeWizardPage_desc);
+ setTitle(Messages.EngineTypeWizardPage_title);
+ setDescription(Messages.EngineTypeWizardPage_desc);
this.engineTypes = engineTypes;
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/FederatedSearchSorter.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/FederatedSearchSorter.java
index 4af3f2569..c4bf00a6c 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/FederatedSearchSorter.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/FederatedSearchSorter.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
*******************************************************************************/
@@ -19,7 +19,7 @@ public class FederatedSearchSorter extends ViewerComparator {
public FederatedSearchSorter() {
super(ReusableHelpPart.SHARED_COLLATOR);
}
-
+
@Override
public int category(Object element) {
if (element instanceof ISearchEngineResult) {
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpTray.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpTray.java
index 290f18635..93e5130cd 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpTray.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpTray.java
@@ -50,20 +50,20 @@ import org.eclipse.ui.forms.widgets.FormToolkit;
* help or a cheat sheet follows the user into a dialog.
*/
public class HelpTray extends DialogTray implements IPageChangedListener {
-
+
public static final int MINIMUM_HEIGHT = 450;
private static final int DEFAULT_WIDTH = 210;
-
+
private int originalHeight;
private int heightAdded;
-
+
private FormToolkit toolkit;
private ReusableHelpPart helpPart;
private Shell shell;
private IContributionItem closeAction;
private Image normal;
private Image hover;
-
+
/**
* Creates any actions needed by the tray.
*/
@@ -85,17 +85,17 @@ public class HelpTray extends DialogTray implements IPageChangedListener {
}
};
}
-
+
/**
* Creates the contents of the tray.
- *
+ *
* @param parent the parent composite that will contain the tray
*/
@Override
protected Control createContents(Composite parent) {
// if the dialog is too short, make it taller
ensureMinimumHeight(parent.getShell());
-
+
toolkit = new FormToolkit(parent.getDisplay());
toolkit.getHyperlinkGroup().setHyperlinkUnderlineMode(HyperlinkGroup.UNDERLINE_HOVER);
toolkit.getColors().initializeSectionToolBarColors();
@@ -105,7 +105,7 @@ public class HelpTray extends DialogTray implements IPageChangedListener {
layout.verticalSpacing = 0;
container.setLayout(layout);
container.addListener(SWT.Dispose, event -> dispose());
-
+
ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
tbm.createControl(container);
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
@@ -122,14 +122,14 @@ public class HelpTray extends DialogTray implements IPageChangedListener {
gd = new GridData(GridData.FILL_BOTH);
gd.widthHint = DEFAULT_WIDTH;
helpPart.getControl().setLayoutData(gd);
-
+
createActions();
tbm.add(closeAction);
-
+
shell = parent.getShell();
hookPageChangeListener(shell);
helpPart.getControl().addListener(SWT.Dispose, event -> unhookPageChangeListener(shell));
-
+
return container;
}
@@ -138,13 +138,13 @@ public class HelpTray extends DialogTray implements IPageChangedListener {
*/
private void createImages() {
Display display = Display.getCurrent();
- int[] shape = new int[] {
- 3, 3, 5, 3, 7, 5, 8, 5, 10, 3, 12, 3,
+ int[] shape = new int[] {
+ 3, 3, 5, 3, 7, 5, 8, 5, 10, 3, 12, 3,
12, 5, 10, 7, 10, 8, 12,10, 12,12,
10,12, 8, 10, 7, 10, 5, 12, 3, 12,
3, 10, 5, 8, 5, 7, 3, 5
};
-
+
/*
* Use magenta as transparency color since it is used infrequently.
*/
@@ -174,7 +174,7 @@ public class HelpTray extends DialogTray implements IPageChangedListener {
gc.setForeground(border);
gc.drawPolygon(shape);
gc.dispose();
-
+
backgroundHot.dispose();
}
@@ -186,7 +186,7 @@ public class HelpTray extends DialogTray implements IPageChangedListener {
hover.dispose();
toolkit.dispose();
helpPart.dispose();
-
+
/*
* Shell is about to be closed. Add a one-time-only listener
* that will return the dialog height back to original.
@@ -209,7 +209,7 @@ public class HelpTray extends DialogTray implements IPageChangedListener {
* Ensures that the dialog's height is sufficient to contain the help tray.
* If the dialog is too short, its height is increased. When closing the tray,
* the height is returned to original (see dispose()).
- *
+ *
* @param shell the dialog's shell
*/
private void ensureMinimumHeight(Shell shell) {
@@ -224,20 +224,20 @@ public class HelpTray extends DialogTray implements IPageChangedListener {
heightAdded = 0;
}
}
-
+
/**
* Returns the ReusableHelpPart contained in the tray.
- *
+ *
* @return the tray's ReusableHelpPart
*/
public ReusableHelpPart getHelpPart() {
return helpPart;
}
-
+
/**
* Add the listener that gets notified of page changes (to automatically
* update context help).
- *
+ *
* @param parent the Composite to hook the listener to
*/
private void hookPageChangeListener(Composite parent) {
@@ -251,7 +251,7 @@ public class HelpTray extends DialogTray implements IPageChangedListener {
* Returns whether or not the help tray can handle the given shell. In some
* cases the help tray is not appropriate for shells that are too short and
* not resizable. In these cases infopops are used.
- *
+ *
* @param shell the shell to check
* @return whether or not the help tray is appropriate for the hsell
*/
@@ -266,7 +266,7 @@ public class HelpTray extends DialogTray implements IPageChangedListener {
/**
* Called whenever the dialog we're inside has changed pages. This updates
* the context help page if it is visible.
- *
+ *
* @param event the page change event
*/
@Override
@@ -287,11 +287,11 @@ public class HelpTray extends DialogTray implements IPageChangedListener {
}
helpPart.update(null, null, null, c, false);
}
-
+
/**
* Remove the listener that gets notified of page changes (to automatically
* update context help).
- *
+ *
* @param parent the Composite that had the listener
*/
private void unhookPageChangeListener(Composite parent) {
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpView.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpView.java
index 24870ac52..b28cd37df 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpView.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpView.java
@@ -44,7 +44,7 @@ import org.eclipse.ui.part.ViewPart;
public class HelpView extends ViewPart implements IPartListener2,
ISelectionChangedListener, IPageChangedListener {
private FormToolkit toolkit;
-
+
private String firstPageId;
private ReusableHelpPart reusableHelpPart;
@@ -56,7 +56,7 @@ public class HelpView extends ViewPart implements IPartListener2,
private boolean visible;
/**
- *
+ *
*/
public HelpView() {
}
@@ -69,7 +69,7 @@ public class HelpView extends ViewPart implements IPartListener2,
// toolkit.setBackground(toolkit.getColors().createNoContentBackground());
toolkit.getColors().initializeSectionToolBarColors();
reusableHelpPart.createControl(parent, toolkit);
- reusableHelpPart.setDefaultContextHelpText(Messages.HelpView_defaultText);
+ reusableHelpPart.setDefaultContextHelpText(Messages.HelpView_defaultText);
reusableHelpPart.showPage(getFirstPage());
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
"org.eclipse.help.ui.helpView"); //$NON-NLS-1$
@@ -118,7 +118,7 @@ public class HelpView extends ViewPart implements IPartListener2,
IPartService service = window.getPartService();
service.addPartListener(this);
}
-
+
@Override
public void saveState(IMemento memento) {
if (reusableHelpPart!=null && memento!=null) {
@@ -154,7 +154,7 @@ public class HelpView extends ViewPart implements IPartListener2,
} else {
if (HelpPlugin.DEBUG_CONTEXT) {
if (c == null) {
- System.out.println("Context: focus control is null " ); //$NON-NLS-1$
+ System.out.println("Context: focus control is null " ); //$NON-NLS-1$
}
if (!c.isVisible()) {
System.out.println("Context: focus control not visible " ); //$NON-NLS-1$
@@ -168,7 +168,7 @@ public class HelpView extends ViewPart implements IPartListener2,
((IPageChangeProvider)part).addPageChangedListener(this);
monitoredPart = part;
}
-
+
private void uninstallPageListener(IWorkbenchPart part) {
if (part instanceof IPageChangeProvider)
((IPageChangeProvider)part).removePageChangedListener(this);
@@ -313,7 +313,7 @@ public class HelpView extends ViewPart implements IPartListener2,
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.help.ui.internal.views.BaseHelpView#getFirstPage()
*/
protected String getFirstPage() {
@@ -348,7 +348,7 @@ public class HelpView extends ViewPart implements IPartListener2,
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.help.ui.internal.views.BaseHelpView#getHelpPartStyle()
*/
protected int getHelpPartStyle() {
@@ -365,17 +365,17 @@ public class HelpView extends ViewPart implements IPartListener2,
if (reusableHelpPart != null)
reusableHelpPart.startSearch(phrase);
}
-
+
public void showIndex() {
if (reusableHelpPart != null)
reusableHelpPart.showPage(IHelpUIConstants.HV_INDEX_PAGE, true);
}
-
+
public void showHelp(String href) {
if (reusableHelpPart != null)
reusableHelpPart.showURL(href);
}
-
+
public void showDynamicHelp(IWorkbenchPart part, Control c) {
if (reusableHelpPart != null)
reusableHelpPart.showDynamicHelp(part, c);
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpviewProtocol.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpviewProtocol.java
index 6869af147..68bccbd49 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpviewProtocol.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpviewProtocol.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 @@ public class HelpviewProtocol {
public static final String HELPVIEW_PROTOCOL = "helpview:"; //$NON-NLS-1$
public static final String CHECK_REMOTE_STATUS = "checkremote"; //$NON-NLS-1$
public static final String IGNORE_MISSING_BOOKS = "ignoreMissingBooks"; //$NON-NLS-1$
-
+
public static void handleProtocolCall(String url, ReusableHelpPart part) {
int index = url.indexOf(HELPVIEW_PROTOCOL);
if (index == -1) {
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HistoryEntry.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HistoryEntry.java
index 676bb5d04..6de685601 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HistoryEntry.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HistoryEntry.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 @@ public class HistoryEntry {
private String target;
private Object data;
/**
- *
+ *
*/
public HistoryEntry(int type, String target, Object data) {
this.type = type;
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HistoryScopeSet.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HistoryScopeSet.java
index ba5fde352..a0f2828c4 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HistoryScopeSet.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HistoryScopeSet.java
@@ -30,7 +30,7 @@ public class HistoryScopeSet extends ScopeSet {
super(set, set.getName());
setExpression(set.getExpression());
}
-
+
@Override
public void copyFrom(ScopeSet set) {
String expression = getExpression();
@@ -42,16 +42,16 @@ public class HistoryScopeSet extends ScopeSet {
IPreferenceStore store = getPreferenceStore();
return store.getString(KEY_EXPRESSION);
}
-
+
@Override
public boolean isImplicit() {
return true;
- }
-
+ }
+
@Override
protected String getExtension() {
return EXT;
- }
+ }
@Override
protected String encodeFileName(String name) {
@@ -72,6 +72,6 @@ public class HistoryScopeSet extends ScopeSet {
public void setExpression(String expression) {
IPreferenceStore store = getPreferenceStore();
- store.setValue(KEY_EXPRESSION, expression);
+ store.setValue(KEY_EXPRESSION, expression);
}
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HyperlinkTreePart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HyperlinkTreePart.java
index a302fd916..94662a7e3 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HyperlinkTreePart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HyperlinkTreePart.java
@@ -57,7 +57,7 @@ import org.eclipse.ui.forms.widgets.FormToolkit;
public abstract class HyperlinkTreePart extends AbstractFormPart implements
IHelpPart {
-
+
public class ScopeObserver implements Observer {
@Override
@@ -67,13 +67,13 @@ public abstract class HyperlinkTreePart extends AbstractFormPart implements
}
}
}
-
+
private class ScopeFilter extends ViewerFilter {
-
+
public ScopeFilter(AbstractHelpScope scope) {
this.scope = scope;
}
-
+
AbstractHelpScope scope;
@Override
@@ -92,7 +92,7 @@ public abstract class HyperlinkTreePart extends AbstractFormPart implements
}
return true;
}
-
+
}
protected ReusableHelpPart parent;
@@ -235,7 +235,7 @@ public abstract class HyperlinkTreePart extends AbstractFormPart implements
}
treeViewer.getTree().setCursor(null);
});
- contributeToToolBar(tbm);
+ contributeToToolBar(tbm);
scopeObserver = new ScopeObserver();
ScopeState.getInstance().getScopeSetManager().addObserver(scopeObserver);
}
@@ -266,7 +266,7 @@ public abstract class HyperlinkTreePart extends AbstractFormPart implements
collapseAllAction.setImageDescriptor(HelpUIResources
.getImageDescriptor(IHelpUIConstants.IMAGE_COLLAPSE_ALL));
collapseAllAction
- .setToolTipText(Messages.AllTopicsPart_collapseAll_tooltip);
+ .setToolTipText(Messages.AllTopicsPart_collapseAll_tooltip);
tbm.insertBefore("back", collapseAllAction); //$NON-NLS-1$
tbm.insertBefore("back", new Separator()); //$NON-NLS-1$
}
@@ -395,7 +395,7 @@ public abstract class HyperlinkTreePart extends AbstractFormPart implements
if (lastItem != null && lastItem.isDisposed())
lastItem = null;
}
-
+
@Override
public void refilter() {
ScopeSetManager manager = ScopeState.getInstance().getScopeSetManager();
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IHelpPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IHelpPart.java
index fed97250e..a8c1b4471 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IHelpPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IHelpPart.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.ui/src/org/eclipse/help/ui/internal/views/IHelpPartPage.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IHelpPartPage.java
index 34c36cbb6..d9ea33ec9 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IHelpPartPage.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IHelpPartPage.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.ui/src/org/eclipse/help/ui/internal/views/IndexPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexPart.java
index bf6fd0506..3d74930d0 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexPart.java
@@ -4,12 +4,12 @@
* 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:
* Intel Corporation - initial API and implementation
* IBM Corporation - 163558 Dynamic content support for all UA
* IBM Corporation - Support for see elements
- * Andreas Meissner - Fix Bug 351272
+ * Andreas Meissner - Fix Bug 351272
*******************************************************************************/
package org.eclipse.help.ui.internal.views;
@@ -87,7 +87,7 @@ public class IndexPart extends HyperlinkTreePart implements IHelpUIConstants {
if (obj instanceof IndexSee) {
IndexSee see = (IndexSee) obj;
return getSeeString(see);
- }
+ }
return super.getText(obj);
}
@@ -96,7 +96,7 @@ public class IndexPart extends HyperlinkTreePart implements IHelpUIConstants {
return super.getImage(obj);
}
}
-
+
public String getSeeString(IIndexSee see) {
String seeText = see.isSeeAlso() ? Messages.SeeAlso : Messages.See;
String message = NLS.bind(seeText, see.getKeyword());
@@ -215,16 +215,16 @@ public class IndexPart extends HyperlinkTreePart implements IHelpUIConstants {
private Object[] getChildren(IIndexEntry entry) {
/*
* Index entry has two types of children: topics and subentries.
- *
+ *
* The method returns topics among children only if number of the topics
* more than 1.
- *
+ *
* In case when the entry owns only one topic, this topic is not returned
* as child because the entry will represent this topic by its keyword.
*/
IHelpResource[] topics = entry.getTopics();
IIndexEntry[] subentries = entry.getSubentries();
- IIndexSee[] sees = entry instanceof IIndexEntry2 ? ((IIndexEntry2)entry).getSees() :
+ IIndexSee[] sees = entry instanceof IIndexEntry2 ? ((IIndexEntry2)entry).getSees() :
new IIndexSee[0];
if (topics.length <= 1 && subentries.length == 0 && sees.length == 0) {
@@ -244,9 +244,9 @@ public class IndexPart extends HyperlinkTreePart implements IHelpUIConstants {
System.arraycopy(sees, 0, children, topics.length + subentries.length, sees.length);
}
- return children;
+ return children;
}
-
+
protected Tree getTreeWidget() {
return treeViewer.getTree();
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexTypeinPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexTypeinPart.java
index 1ac4d8f25..932dff13c 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexTypeinPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexTypeinPart.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:
* Intel Corporation - initial API and implementation
* IBM Corporation 2008 - Bug 248079 [Help][Index] unicode sort issue in index view
@@ -120,7 +120,7 @@ public class IndexTypeinPart extends AbstractFormPart implements IHelpPart, IHel
return;
}
}
- TreeItem item = indexTree.getItem(index);
+ TreeItem item = indexTree.getItem(index);
indexTree.setSelection(new TreeItem[] { item });
String text = item.getText();
indexText.setText(text);
@@ -139,7 +139,7 @@ public class IndexTypeinPart extends AbstractFormPart implements IHelpPart, IHel
return;
}
}
- TreeItem item = indexTree.getItem(index);
+ TreeItem item = indexTree.getItem(index);
indexTree.setSelection(new TreeItem[] { item });
String text = item.getText();
indexText.setText(text);
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/LocalScopeDialog.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/LocalScopeDialog.java
index e72881e21..564f7b932 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/LocalScopeDialog.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/LocalScopeDialog.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,12 +36,12 @@ public class LocalScopeDialog extends TrayDialog {
this.preferenceStore = set.getPreferenceStore();
this.scopeSet = set;
}
-
+
@Override
protected boolean isResizable() {
return true;
}
-
+
@Override
protected Control createDialogArea(Composite parent) {
EngineDescriptor localSearchDesc = null;
@@ -62,7 +62,7 @@ public class LocalScopeDialog extends TrayDialog {
helpPageControl.setLayoutData(layoutData);
return helpPageControl;
}
-
+
@Override
protected void okPressed() {
localHelpPage.performOk();
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/MissingContentPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/MissingContentPart.java
index 74537dcb7..f8c4af900 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/MissingContentPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/MissingContentPart.java
@@ -39,8 +39,8 @@ public class MissingContentPart extends AbstractFormPart implements IHelpPart {
private ImageHyperlink statusLink;
private boolean wasRemoteHelpUnavailable = false;
private boolean wasUnresolvedPlaceholders = false;
-
- public MissingContentPart(Composite parent, FormToolkit toolkit) {
+
+ public MissingContentPart(Composite parent, FormToolkit toolkit) {
container = toolkit.createComposite(parent, SWT.NULL);
container.setBackgroundMode(SWT.INHERIT_DEFAULT);
GridLayout layout = new GridLayout();
@@ -66,15 +66,15 @@ public class MissingContentPart extends AbstractFormPart implements IHelpPart {
wasUnresolvedPlaceholders = isUnresolvedPlaceholders;
FormToolkit toolkit = new FormToolkit(container.getDisplay());
if ( isRemoteHelpUnavailable ) {
- createHelpMissingLink(container, toolkit, Dialog.DLG_IMG_MESSAGE_WARNING, Messages.remoteHelpUnavailable,
+ createHelpMissingLink(container, toolkit, Dialog.DLG_IMG_MESSAGE_WARNING, Messages.remoteHelpUnavailable,
MissingContentManager.getInstance().getRemoteHelpUnavailablePage(true), true);
} else if ( isUnresolvedPlaceholders) {
- createHelpMissingLink(container, toolkit, Dialog.DLG_IMG_MESSAGE_INFO, Messages.ReusableHelpPart_missingContent,
+ createHelpMissingLink(container, toolkit, Dialog.DLG_IMG_MESSAGE_INFO, Messages.ReusableHelpPart_missingContent,
MissingContentManager.getInstance().getHelpMissingPage(true), false);
}
toolkit.dispose();
}
-
+
private void createHelpMissingLink(Composite container, FormToolkit toolkit, String imageKey, String linkText, String linkTarget, boolean isRemoteUnavailableLink) {
final String target = linkTarget;
final boolean isRemote = isRemoteUnavailableLink;
@@ -83,7 +83,7 @@ public class MissingContentPart extends AbstractFormPart implements IHelpPart {
paddingData.heightHint = 2;
padding.setLayoutData(paddingData);
toolkit.adapt(padding);
- Image warningImage = JFaceResources.getImage(imageKey);
+ Image warningImage = JFaceResources.getImage(imageKey);
statusLink = toolkit.createImageHyperlink(container, SWT.NULL);
statusLink.setText(linkText);
statusLink.setImage(warningImage);
@@ -91,7 +91,7 @@ public class MissingContentPart extends AbstractFormPart implements IHelpPart {
@Override
public void linkActivated(HyperlinkEvent e) {
- helpPart.showURL(target);
+ helpPart.showURL(target);
if ( isRemote ) {
helpPart.checkRemoteStatus();
} else {
@@ -102,17 +102,17 @@ public class MissingContentPart extends AbstractFormPart implements IHelpPart {
GridData statusData = new GridData(GridData.BEGINNING, GridData.CENTER, false, false);
statusLink.setLayoutData(statusData);
}
-
+
private void disposeLink() {
if (statusLink != null) {
statusLink.dispose();
}
statusLink = null;
}
-
+
public void setSubsequentPage(String subsequentPage) {
-
- }
+
+ }
@Override
public void init(ReusableHelpPart parent, String id, IMemento memento) {
@@ -158,22 +158,22 @@ public class MissingContentPart extends AbstractFormPart implements IHelpPart {
@Override
public void stop() {
-
+
}
@Override
public void toggleRoleFilter() {
-
+
}
@Override
public void refilter() {
-
+
}
-
+
@Override
public void dispose() {
disposeLink();
}
-
+
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/NewEngineWizard.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/NewEngineWizard.java
index c6b5a675a..521b3bb09 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/NewEngineWizard.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/NewEngineWizard.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.ui/src/org/eclipse/help/ui/internal/views/RelatedTopicsPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RelatedTopicsPart.java
index 3cab7b791..1268c2835 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RelatedTopicsPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RelatedTopicsPart.java
@@ -44,7 +44,7 @@ public class RelatedTopicsPart extends AbstractFormPart implements IHelpPart {
private String id;
private int VSPACE = 10;
-
+
private static boolean dynamicHelpPreferenceRead = false;
private static boolean useDynamicHelp = false;
@@ -55,7 +55,7 @@ public class RelatedTopicsPart extends AbstractFormPart implements IHelpPart {
boolean flushCache) {
Point topSize = contextHelpPart.getControl().computeSize(wHint,
hHint, flushCache);
-
+
Point botSize = dynamicHelpPart == null ? new Point(0, 0) :
dynamicHelpPart.getControl().computeSize(wHint,
hHint, flushCache);
@@ -87,7 +87,7 @@ public class RelatedTopicsPart extends AbstractFormPart implements IHelpPart {
int bot = dynamicHelpPart == null ? 0 : computeMinimumWidth(dynamicHelpPart, parent, changed);
return Math.max(top, bot);
}
-
+
private int computeMinimumWidth(IHelpPart part, Composite parent, boolean changed) {
ILayoutExtension le = (ILayoutExtension)((Composite)part.getControl()).getLayout();
return le.computeMinimumWidth(parent, changed);
@@ -123,22 +123,22 @@ public class RelatedTopicsPart extends AbstractFormPart implements IHelpPart {
contextHelpPart.init(parent, IHelpUIConstants.HV_CONTEXT_HELP, memento);
mform.addPart(contextHelpPart);
if (isUseDynamicHelp()) {
- dynamicHelpPart.init(parent, IHelpUIConstants.HV_SEARCH_RESULT, memento);
+ dynamicHelpPart.init(parent, IHelpUIConstants.HV_SEARCH_RESULT, memento);
mform.addPart(dynamicHelpPart);
}
mform.initialize();
}
-
+
@Override
public void dispose() {
mform.dispose();
}
-
+
public void handleActivation(Control c, IWorkbenchPart wpart) {
IContextProvider provider = (wpart == null) ? null : (IContextProvider) wpart.getAdapter(IContextProvider.class);
contextHelpPart.handleActivation(provider, null, c, wpart, false);
}
-
+
public void setDefaultText(String defaultText) {
contextHelpPart.setDefaultText(defaultText);
}
@@ -227,7 +227,7 @@ public class RelatedTopicsPart extends AbstractFormPart implements IHelpPart {
// Preference created in case anyone complains about the removal of
// the dynamic help section. This is not API, not documented and may
// be removed in a future release.
- useDynamicHelp =
+ useDynamicHelp =
Platform.getPreferencesService().getBoolean(HelpBasePlugin.PLUGIN_ID, "show_dynamic_help", false, null); //$NON-NLS-1$
}
return useDynamicHelp;
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RenameDialog.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RenameDialog.java
index 764f5d7e1..0781498ff 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RenameDialog.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RenameDialog.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
*******************************************************************************/
@@ -35,7 +35,7 @@ public class RenameDialog extends SelectionStatusDialog {
private Text text;
private IStatus status;
private boolean isCaseSensitive;
-
+
/**
* Create a new rename dialog instance for the given window.
* @param shell The parent of the dialog
@@ -47,7 +47,7 @@ public class RenameDialog extends SelectionStatusDialog {
initialize();
setOldName(oldName);
}
-
+
/**
* Create a new rename dialog instance for the given window.
* @param shell The parent of the dialog
@@ -65,7 +65,7 @@ public class RenameDialog extends SelectionStatusDialog {
}
setOldName(oldName);
}
-
+
public void initialize(){
oldNames = new ArrayList<>();
setStatusLineAboveButtons(true);
@@ -74,15 +74,15 @@ public class RenameDialog extends SelectionStatusDialog {
public void addOldName(String oldName){
if (!oldNames.contains(oldName))
oldNames.add(oldName);
-
+
}
public void setOldName(String oldName) {
this.oldName = oldName;
- if (text!=null)
+ if (text!=null)
text.setText(oldName);
this.newName = oldName;
}
-
+
@Override
protected Control createDialogArea(Composite parent) {
Composite container = new Composite(parent, SWT.NULL);
@@ -90,13 +90,13 @@ public class RenameDialog extends SelectionStatusDialog {
layout.numColumns = 2;
layout.marginHeight = layout.marginWidth = 9;
container.setLayout(layout);
-
+
GridData gd = new GridData(GridData.FILL_BOTH);
container.setLayoutData(gd);
-
+
Label label = new Label(container, SWT.NULL);
- label.setText(Messages.RenameDialog_label);
-
+ label.setText(Messages.RenameDialog_label);
+
text = new Text(container, SWT.SINGLE|SWT.BORDER);
text.addModifyListener(e -> textChanged(text.getText(), true));
gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -105,7 +105,7 @@ public class RenameDialog extends SelectionStatusDialog {
applyDialogFont(container);
return container;
}
-
+
@Override
public int open() {
text.setText(oldName);
@@ -114,7 +114,7 @@ public class RenameDialog extends SelectionStatusDialog {
textChanged(oldName, false);
return super.open();
}
-
+
private void textChanged(String text, boolean setStatus) {
Button okButton = getButton(IDialogConstants.OK_ID);
for (int i=0; i<oldNames.size(); i++){
@@ -145,7 +145,7 @@ public class RenameDialog extends SelectionStatusDialog {
IStatus.ERROR,
HelpUIPlugin.PLUGIN_ID,
IStatus.ERROR,
- errorMessage,
+ errorMessage,
null);
updateStatus(status);
}
@@ -159,7 +159,7 @@ public class RenameDialog extends SelectionStatusDialog {
null);
updateStatus(status);
}
-
+
public String getNewName() {
return newName;
}
@@ -173,7 +173,7 @@ public class RenameDialog extends SelectionStatusDialog {
@Override
protected void computeResult() {
}
-
+
@Override
public void setTitle(String title) {
getShell().setText(title);
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java
index 4649ffd1a..856328b3b 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.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
*******************************************************************************/
@@ -122,7 +122,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
private static final int STATE_LT_B = 3;
private static final int STATE_LT_BR = 4;
-
+
/*
* Used as a bridge from live help actions back (e.g. breadcrumb links)
* to the originating help part.
@@ -178,7 +178,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
private IStatusLineManager statusLineManager;
private IActionBars actionBars;
-
+
private EngineDescriptorManager engineManager;
public IMenuManager menuManager;
@@ -304,7 +304,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
private SubActionBars bars;
private IToolBarManager subToolBarManager;
-
+
private IMenuManager subMenuManager;
protected ArrayList<PartRec> partRecs;
@@ -328,7 +328,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
subMenuManager = new SubMenuManager(
ReusableHelpPart.this.menuManager);
} else {
- subMenuManager = null;
+ subMenuManager = null;
}
}
}
@@ -345,7 +345,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
bars = null;
subToolBarManager = null;
subMenuManager = null;
- } else {
+ } else {
try {
((SubToolBarManager) subToolBarManager).disposeManager();
if (subMenuManager != null) {
@@ -413,13 +413,13 @@ public class ReusableHelpPart implements IHelpUIConstants,
public PartRec[] getParts() {
return partRecs.toArray(new PartRec[partRecs.size()]);
}
-
+
public void refreshPage()
{
PartRec parts[] = getParts();
if (parts==null)
return;
-
+
for (int p=0;p<parts.length;p++)
if (parts[p]!=null && parts[p].part!=null && parts[p].part.isStale())
parts[p].part.refresh();
@@ -460,7 +460,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
rec.part.stop();
}
}
-
+
@Override
public void saveState(IMemento memento) {
for (int i = 0; i < partRecs.size(); i++) {
@@ -522,7 +522,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
if (pageAction != null)
pageAction.setChecked(visible);
}
-
+
if (bars != null) {
if (visible)
bars.activate();
@@ -537,7 +537,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
ReusableHelpPart.this.toolBarManager.update(true);
getControl().getParent().layout();
}
-
+
}
private void hookGlobalAction(String id, IHelpPart part) {
@@ -570,7 +570,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
for (int focusPart = 0; focusPart < partRecs.size(); focusPart++) {
PartRec rec = partRecs.get(focusPart);
String partId = rec.part.getId();
- if ( partId != IHelpUIConstants.HV_SEE_ALSO && partId != IHelpUIConstants.HV_MISSING_CONTENT) {
+ if ( partId != IHelpUIConstants.HV_SEE_ALSO && partId != IHelpUIConstants.HV_MISSING_CONTENT) {
rec.part.setFocus();
return;
}
@@ -693,7 +693,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
return HelpBasePlugin.getActivitySupport().isEnabled(href);
}
}
-
+
class UAFilter extends ViewerFilter {
@Override
@@ -723,7 +723,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
public static ReusableHelpPart getLastActiveInstance() {
return lastActiveInstance;
}
-
+
private void ensureHelpIndexed() {
// make sure we have the index but
// don't schedule the indexer job if one is
@@ -734,20 +734,20 @@ public class ReusableHelpPart implements IHelpUIConstants,
indexerJob.schedule();
}
}
-
+
/**
* Adds the given page to this part.
- *
+ *
* @param page the page to add
*/
public void addPage(IHelpPartPage page) {
- pages.add(page);
+ pages.add(page);
}
-
+
/**
* Adds the given part to this one. The part can then be used inside
* any page and referred to by id.
- *
+ *
* @param id the part's unique id
* @param part the part to add
*/
@@ -755,10 +755,10 @@ public class ReusableHelpPart implements IHelpUIConstants,
part.init(this, id, memento);
mform.addPart(part);
}
-
+
/**
* Creates a new page for this part.
- *
+ *
* @param id the page's unique id
* @param text the page's heading, or null for none
* @param iconId the page's icon
@@ -767,7 +767,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
public IHelpPartPage createPage(String id, String text, String iconId) {
return new HelpPartPage(id, text, iconId);
}
-
+
private void definePages() {
pages = new ArrayList<>();
// federated search page
@@ -784,7 +784,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
// all topics page
page = new HelpPartPage(HV_ALL_TOPICS_PAGE,
Messages.ReusableHelpPart_allTopicsPage_name,
- IHelpUIConstants.IMAGE_ALL_TOPICS);
+ IHelpUIConstants.IMAGE_ALL_TOPICS);
page.setVerticalSpacing(0);
page.setHorizontalMargin(0);
page.addPart(HV_SEE_ALSO, false);
@@ -795,8 +795,8 @@ public class ReusableHelpPart implements IHelpUIConstants,
// bookmarks page
page = new HelpPartPage(HV_BOOKMARKS_PAGE,
- Messages.ReusableHelpPart_bookmarksPage_name,
- IHelpUIConstants.IMAGE_BOOKMARKS);
+ Messages.ReusableHelpPart_bookmarksPage_name,
+ IHelpUIConstants.IMAGE_BOOKMARKS);
page.setVerticalSpacing(0);
page.setHorizontalMargin(0);
page.addPart(HV_SEE_ALSO, false);
@@ -813,7 +813,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
// context help page
page = new HelpPartPage(HV_CONTEXT_HELP_PAGE,
Messages.ReusableHelpPart_contextHelpPage_name,
- IHelpUIConstants.IMAGE_RELATED_TOPICS);
+ IHelpUIConstants.IMAGE_RELATED_TOPICS);
// page.addPart(HV_CONTEXT_HELP, false);
// page.addPart(HV_SEARCH_RESULT, false, true);
page.setVerticalSpacing(0);
@@ -826,7 +826,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
// index page
page = new HelpPartPage(HV_INDEX_PAGE,
Messages.ReusableHelpPart_indexPage_name,
- IHelpUIConstants.IMAGE_INDEX);
+ IHelpUIConstants.IMAGE_INDEX);
page.setVerticalSpacing(0);
page.addPart(HV_SEE_ALSO, false);
page.addPart(HV_MISSING_CONTENT, false);
@@ -862,8 +862,8 @@ public class ReusableHelpPart implements IHelpUIConstants,
.getSharedImages().getImageDescriptor(
ISharedImages.IMG_TOOL_BACK_DISABLED));
backAction.setEnabled(false);
- backAction.setText(Messages.ReusableHelpPart_back_label);
- backAction.setToolTipText(Messages.ReusableHelpPart_back_tooltip);
+ backAction.setText(Messages.ReusableHelpPart_back_label);
+ backAction.setToolTipText(Messages.ReusableHelpPart_back_tooltip);
backAction.setId("back"); //$NON-NLS-1$
nextAction = new Action("next") { //$NON-NLS-1$
@@ -873,7 +873,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
doNext();
}
};
- nextAction.setText(Messages.ReusableHelpPart_forward_label);
+ nextAction.setText(Messages.ReusableHelpPart_forward_label);
nextAction.setImageDescriptor(PlatformUI.getWorkbench()
.getSharedImages().getImageDescriptor(
ISharedImages.IMG_TOOL_FORWARD));
@@ -881,7 +881,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
.getSharedImages().getImageDescriptor(
ISharedImages.IMG_TOOL_FORWARD_DISABLED));
nextAction.setEnabled(false);
- nextAction.setToolTipText(Messages.ReusableHelpPart_forward_tooltip);
+ nextAction.setToolTipText(Messages.ReusableHelpPart_forward_tooltip);
nextAction.setId("next"); //$NON-NLS-1$
toolBarManager.add(backAction);
toolBarManager.add(nextAction);
@@ -894,7 +894,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
}
};
openInfoCenterAction
- .setText(Messages.ReusableHelpPart_openInfoCenterAction_label);
+ .setText(Messages.ReusableHelpPart_openInfoCenterAction_label);
openAction = new OpenHrefAction("open") { //$NON-NLS-1$
@Override
@@ -902,7 +902,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
doOpen(getTarget(), getShowDocumentsInPlace());
}
};
- openAction.setText(Messages.ReusableHelpPart_openAction_label);
+ openAction.setText(Messages.ReusableHelpPart_openAction_label);
openInHelpAction = new OpenHrefAction("") {//$NON-NLS-1$
@Override
@@ -911,9 +911,9 @@ public class ReusableHelpPart implements IHelpUIConstants,
}
};
openInHelpAction
- .setText(Messages.ReusableHelpPart_openInHelpContentsAction_label);
+ .setText(Messages.ReusableHelpPart_openInHelpContentsAction_label);
copyAction = new CopyAction();
- copyAction.setText(Messages.ReusableHelpPart_copyAction_label);
+ copyAction.setText(Messages.ReusableHelpPart_copyAction_label);
bookmarkAction = new OpenHrefAction("bookmark") { //$NON-NLS-1$
@Override
@@ -921,12 +921,12 @@ public class ReusableHelpPart implements IHelpUIConstants,
doBookmark(getTarget());
}
};
- bookmarkAction.setText(Messages.ReusableHelpPart_bookmarkAction_label);
+ bookmarkAction.setText(Messages.ReusableHelpPart_bookmarkAction_label);
bookmarkAction.setImageDescriptor(HelpUIResources
.getImageDescriptor(IHelpUIConstants.IMAGE_ADD_BOOKMARK));
if (actionBars != null && actionBars.getMenuManager() != null)
contributeToDropDownMenu(actionBars.getMenuManager());
-
+
roleFilter = new RoleFilter();
uaFilter = new UAFilter();
if (HelpBasePlugin.getActivitySupport().isUserCanToggleFiltering()) {
@@ -941,7 +941,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
showAllAction.setImageDescriptor(HelpUIResources
.getImageDescriptor(IHelpUIConstants.IMAGE_SHOW_ALL));
showAllAction
- .setToolTipText(Messages.AllTopicsPart_showAll_tooltip);
+ .setToolTipText(Messages.AllTopicsPart_showAll_tooltip);
toolBarManager.insertBefore("back", showAllAction); //$NON-NLS-1$
toolBarManager.insertBefore("back", new Separator()); //$NON-NLS-1$
showAllAction.setChecked(!HelpBasePlugin.getActivitySupport()
@@ -962,7 +962,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
// pages is null when the activity manager listener is added, and is set to null
// prior to the activity manager listener being removed, so very short timeframes in
// logic where pages could equals null entering this method
- if (pages != null){
+ if (pages != null){
for (int i = 0; i < pages.size(); i++) {
HelpPartPage page = (HelpPartPage) pages.get(i);
page.refilter();
@@ -1029,7 +1029,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
BrowserPart part = (BrowserPart) findPart(IHelpUIConstants.HV_BROWSER);
part.clearBrowser();
}
-
+
HelpPartPage page = findPage(id);
if (page != null) {
page.refreshPage();
@@ -1160,7 +1160,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.internal.intro.impl.parts.IStandbyContentPart#setFocus()
*/
public void setFocus() {
@@ -1180,7 +1180,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
* @param context
* @param part
* @param control
- * @param isExplicitRequest is true if this is the result of a direct user request such as
+ * @param isExplicitRequest is true if this is the result of a direct user request such as
* pressing F1 and false if it is in response to a focus change listener
*/
public void update(IContextProvider provider, IContext context, IWorkbenchPart part,
@@ -1230,7 +1230,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
part = new MissingContentPart(parent, mform.getToolkit());
}
if (part != null) {
- mform.addPart(part);
+ mform.addPart(part);
part.init(this, id, memento);
}
return part;
@@ -1293,7 +1293,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
}
private boolean openInternalBrowser(String url) {
- String openMode = Platform.getPreferencesService().getString(HelpBasePlugin.PLUGIN_ID,
+ String openMode = Platform.getPreferencesService().getString(HelpBasePlugin.PLUGIN_ID,
IHelpBaseConstants.P_KEY_HELP_VIEW_OPEN_MODE, IHelpBaseConstants.P_IN_PLACE, null);
boolean openInEditor = IHelpBaseConstants.P_IN_EDITOR.equals(openMode);
boolean openInBrowser = IHelpBaseConstants.P_IN_BROWSER.equals(openMode);
@@ -1329,9 +1329,9 @@ public class ReusableHelpPart implements IHelpUIConstants,
aurl = aurl.substring(0, aurl.length() - 14);
DefaultHelpUI.showInWorkbenchBrowser(aurl, false);
*/
-
+
PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(aurl);
-
+
} catch (Exception e) {
HelpUIPlugin.logError("Error opening browser", e); //$NON-NLS-1$
}
@@ -1672,7 +1672,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
mng.setMessage(null);
}
-
+
private void toggleShowAll(boolean checked) {
if (checked) {
@@ -1698,7 +1698,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
page.toggleRoleFilter();
}
}
-
+
public void saveState(IMemento memento) {
for (int i = 0; i < pages.size(); i++) {
HelpPartPage page = (HelpPartPage) pages.get(i);
@@ -1743,7 +1743,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
}
return buff.toString();
}
-
+
EngineDescriptorManager getEngineManager() {
if (engineManager==null) {
engineManager = new EngineDescriptorManager();
@@ -1772,9 +1772,9 @@ public class ReusableHelpPart implements IHelpUIConstants,
clearBrowser();
showURL("/org.eclipse.help.webapp/" + MissingContentManager.MISSING_BOOKS_HELP_VIEW_HREF); //$NON-NLS-1$
updateStatusLinks();
-
+
}
-
+
private void clearBrowser() {
IHelpPart part = findPart(HV_BROWSER);
if ( part == null ) {
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPartHistory.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPartHistory.java
index 0b90e4e4c..5fd60115b 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPartHistory.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPartHistory.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
*******************************************************************************/
@@ -24,7 +24,7 @@ public class ReusableHelpPartHistory {
public void addEntry(HistoryEntry entry) {
if (cursor!= -1) {
- // If we are adding a new entry while
+ // If we are adding a new entry while
// the cursor is not at the end, discard
// all the entries after the cursor.
int extra = queue.size()-1 -cursor;
@@ -47,11 +47,11 @@ public class ReusableHelpPartHistory {
public boolean hasPrev() {
return cursor != -1 && cursor > 0;
}
-
+
public HistoryEntry getNext() {
return hasNext()?(HistoryEntry)queue.get(cursor+1):null;
}
-
+
public HistoryEntry getPrev() {
return hasPrev() ? (HistoryEntry)queue.get(cursor-1):null;
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceDialog.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceDialog.java
index a2e5699d6..ed3b7994b 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceDialog.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceDialog.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 @@ import org.eclipse.swt.widgets.Shell;
public class ScopePreferenceDialog extends PreferenceDialog {
private EngineDescriptorManager descManager;
private ArrayList<PendingOperation> pendingOperations;
-
+
class PendingOperation {
int action;
EngineDescriptor desc;
@@ -51,7 +51,7 @@ public class ScopePreferenceDialog extends PreferenceDialog {
* The Remove button id.
*/
private final static int DELETE_ID = IDialogConstants.CLIENT_ID + 2;
-
+
public ScopePreferenceDialog(Shell parentShell, PreferenceManager manager, EngineDescriptorManager descManager, boolean editable) {
super(parentShell, manager);
this.descManager = descManager;
@@ -69,10 +69,10 @@ public class ScopePreferenceDialog extends PreferenceDialog {
gd.horizontalSpan = 2;
treeControl.setLayoutData(gd);
- Button lbutton = createButton(container, NEW_ID, Messages.ScopePreferenceDialog_new, false);
+ Button lbutton = createButton(container, NEW_ID, Messages.ScopePreferenceDialog_new, false);
gd = (GridData)lbutton.getLayoutData();
gd.horizontalAlignment = GridData.HORIZONTAL_ALIGN_BEGINNING;
- Button rbutton = createButton(container, DELETE_ID, Messages.ScopePreferenceDialog_delete, false);
+ Button rbutton = createButton(container, DELETE_ID, Messages.ScopePreferenceDialog_delete, false);
rbutton.setEnabled(false);
gd = (GridData)rbutton.getLayoutData();
gd.horizontalAlignment = GridData.HORIZONTAL_ALIGN_BEGINNING;
@@ -82,7 +82,7 @@ public class ScopePreferenceDialog extends PreferenceDialog {
treeGd.widthHint = Math.max(treeGd.widthHint, size.x);
return container;
}
-
+
@Override
protected TreeViewer createTreeViewer(Composite parent) {
TreeViewer viewer = super.createTreeViewer(parent);
@@ -93,7 +93,7 @@ public class ScopePreferenceDialog extends PreferenceDialog {
});
return viewer;
}
-
+
@Override
protected void buttonPressed(int buttonId) {
switch (buttonId) {
@@ -107,7 +107,7 @@ public class ScopePreferenceDialog extends PreferenceDialog {
super.buttonPressed(buttonId);
}
}
-
+
private void treeSelectionChanged(Object obj) {
boolean removable = false;
if (obj instanceof ScopePreferenceManager.EnginePreferenceNode) {
@@ -117,7 +117,7 @@ public class ScopePreferenceDialog extends PreferenceDialog {
}
getButton(DELETE_ID).setEnabled(removable);
}
-
+
private void doNew() {
NewEngineWizard wizard = new NewEngineWizard(descManager.getEngineTypes());
WizardDialog dialog = new WizardDialog(getShell(), wizard);
@@ -147,7 +147,7 @@ public class ScopePreferenceDialog extends PreferenceDialog {
scheduleOperation(DELETE_ID, desc);
}
}
-
+
private void scheduleOperation(int action, EngineDescriptor desc) {
if (pendingOperations==null)
pendingOperations = new ArrayList<>();
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceManager.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceManager.java
index 32c437cd4..8417cae3c 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceManager.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopePreferenceManager.java
@@ -20,10 +20,10 @@ import org.eclipse.jface.preference.PreferenceManager;
import org.eclipse.jface.preference.PreferenceNode;
public class ScopePreferenceManager extends PreferenceManager implements IHelpUIConstants {
- private ScopeSet set;
+ private ScopeSet set;
class SubpagePreferenceNode extends PreferenceNode {
private IConfigurationElement config;
-
+
public SubpagePreferenceNode(String id, String label,
IConfigurationElement config) {
super(id, label, null, null);
@@ -45,7 +45,7 @@ public class ScopePreferenceManager extends PreferenceManager implements IHelpUI
}
class EnginePreferenceNode extends PreferenceNode {
private EngineDescriptor desc;
-
+
public EnginePreferenceNode(EngineDescriptor desc) {
super(desc.getId(), desc.getLabel(), desc.getImageDescriptor(), null);
this.desc = desc;
@@ -64,10 +64,10 @@ public class ScopePreferenceManager extends PreferenceManager implements IHelpUI
}
}
/**
- *
+ *
*/
public ScopePreferenceManager(EngineDescriptorManager descManager, ScopeSet set) {
- this.set = set;
+ this.set = set;
load(descManager.getDescriptors());
}
@@ -78,8 +78,8 @@ public class ScopePreferenceManager extends PreferenceManager implements IHelpUI
IConfigurationElement [] pages = desc.getPages();
for (int j=0; j<pages.length; j++) {
String category = pages[i].getAttribute(ATT_CATEGORY);
- addNode(category, pages[i].getAttribute(ATT_ID),
- pages[i].getAttribute(ATT_LABEL),
+ addNode(category, pages[i].getAttribute(ATT_ID),
+ pages[i].getAttribute(ATT_LABEL),
pages[i]);
}
}
@@ -95,5 +95,5 @@ public class ScopePreferenceManager extends PreferenceManager implements IHelpUI
if (parent!=null)
parent.add(node);
return node;
- }
+ }
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSelectPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSelectPart.java
index 123a04f72..8f9021e49 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSelectPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSelectPart.java
@@ -32,8 +32,8 @@ import org.eclipse.ui.forms.widgets.TableWrapData;
import org.eclipse.ui.forms.widgets.TableWrapLayout;
public class ScopeSelectPart extends AbstractFormPart implements IHelpPart {
-
-
+
+
public class ScopeObserver implements Observer {
@Override
@@ -49,14 +49,14 @@ public class ScopeSelectPart extends AbstractFormPart implements IHelpPart {
private String id;
private ScopeObserver scopeObserver;
- public ScopeSelectPart(Composite parent, FormToolkit toolkit) {
+ public ScopeSelectPart(Composite parent, FormToolkit toolkit) {
container = toolkit.createComposite(parent);
TableWrapLayout layout = new TableWrapLayout();
layout.numColumns = 1;
container.setLayout(layout);
ScopeSetManager scopeSetManager = ScopeState.getInstance().getScopeSetManager();
String name = scopeSetManager.getActiveSet().getName();
- scopeSetLink = toolkit.createFormText(container, false);
+ scopeSetLink = toolkit.createFormText(container, false);
setScopeLink(name);
scopeSetLink.addHyperlinkListener(new HyperlinkAdapter() {
@@ -70,13 +70,13 @@ public class ScopeSelectPart extends AbstractFormPart implements IHelpPart {
td.valign = TableWrapData.MIDDLE;
scopeSetLink.setLayoutData(td);
scopeObserver = new ScopeObserver();
- scopeSetManager.addObserver(scopeObserver);
+ scopeSetManager.addObserver(scopeObserver);
}
-
+
private void doChangeScopeSet() {
ScopeSetManager scopeSetManager = ScopeState.getInstance().getScopeSetManager();
- ScopeSetDialog dialog = new ScopeSetDialog(container.getShell(),
- scopeSetManager,
+ ScopeSetDialog dialog = new ScopeSetDialog(container.getShell(),
+ scopeSetManager,
ScopeState.getInstance().getEngineManager(), true);
dialog.setInput(scopeSetManager);
dialog.create();
@@ -90,7 +90,7 @@ public class ScopeSelectPart extends AbstractFormPart implements IHelpPart {
scopeSetManager.notifyObservers();
}
}
-
+
private void setActiveScopeSet(ScopeSet set) {
setScopeLink(set.getName());
ScopeState.getInstance().getScopeSetManager().setActiveSet(set);
@@ -106,7 +106,7 @@ public class ScopeSelectPart extends AbstractFormPart implements IHelpPart {
nameBuff.append(Messages.FederatedSearchPart_changeScopeSet);
nameBuff.append("\""); //$NON-NLS-1$
}
-
+
nameBuff.append(">"); //$NON-NLS-1$
nameBuff.append(EscapeUtils.escapeSpecialChars(name ));
nameBuff.append(" </a><b>"); //$NON-NLS-1$
@@ -159,19 +159,19 @@ public class ScopeSelectPart extends AbstractFormPart implements IHelpPart {
@Override
public void stop() {
-
+
}
@Override
public void toggleRoleFilter() {
-
+
}
@Override
public void refilter() {
-
+
}
-
+
@Override
public void dispose() {
if (scopeObserver != null) {
@@ -179,5 +179,5 @@ public class ScopeSelectPart extends AbstractFormPart implements IHelpPart {
}
super.dispose();
}
-
+
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSet.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSet.java
index e0c3db67a..b8d3b44c1 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSet.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSet.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
*******************************************************************************/
@@ -32,40 +32,40 @@ public class ScopeSet {
private PreferenceStore preferenceStore;
private boolean needsSaving;
private int defaultSet = -1;
-
+
public ScopeSet() {
this(Messages.ScopeSet_default);
defaultSet = 1;
}
-
+
public ScopeSet(String name) {
this.needsSaving = true;
this.name = name;
}
-
+
public boolean isEditable() {
return !isDefault();
}
-
+
public boolean isDefault() {
if (defaultSet==1)
return true;
return getPreferenceStore().getBoolean(KEY_DEFAULT);
}
-
+
public boolean isImplicit() {
return false;
}
public ScopeSet(ScopeSet set, String name) {
- this(name);
+ this(name);
copyFrom(set);
}
-
+
public void copyFrom(ScopeSet set) {
copy((PreferenceStore)set.getPreferenceStore());
}
-
+
public void dispose() {
File file = new File(getFileName(name));
if (file.exists())
@@ -88,7 +88,7 @@ public class ScopeSet {
}
return preferenceStore;
}
-
+
protected String encodeFileName(String name) {
return name;
}
@@ -96,10 +96,10 @@ public class ScopeSet {
private String getFileName(String name) {
IPath location = HelpUIPlugin.getDefault().getStateLocation();
location = location.append(SCOPE_DIR_NAME);
- location = location.append(encodeFileName(name)+getExtension());
+ location = location.append(encodeFileName(name)+getExtension());
return location.toOSString();
}
-
+
protected String getExtension() {
return EXT;
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetDialog.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetDialog.java
index 2720190b3..b800081c2 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetDialog.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetDialog.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
*******************************************************************************/
@@ -48,8 +48,8 @@ import org.eclipse.ui.PlatformUI;
* Scope dialog for federated search.
*/
public class ScopeSetDialog extends TrayDialog {
-
-
+
+
public class NonDefaultFilter extends ViewerFilter {
@Override
@@ -82,7 +82,7 @@ public class ScopeSetDialog extends TrayDialog {
private ArrayList<ScopeSet> sets;
private ArrayList<PendingOperation> operations;
private IStructuredContentProvider contentProvider;
-
+
private Button showAllRadio;
private Button showSelectedRadio;
@@ -94,7 +94,7 @@ public class ScopeSetDialog extends TrayDialog {
private ScopeSet initialSelection;
private Object[] result;
private boolean localOnly;
-
+
private abstract class PendingOperation {
ScopeSet set;
public PendingOperation(ScopeSet set) {
@@ -103,7 +103,7 @@ public class ScopeSetDialog extends TrayDialog {
public abstract void commit();
public abstract void cancel();
}
-
+
private class AddOperation extends PendingOperation {
public AddOperation(ScopeSet set) {
super(set);
@@ -163,7 +163,7 @@ public class ScopeSetDialog extends TrayDialog {
public void cancel() {
}
}
-
+
private class ScopeContentProvider implements IStructuredContentProvider {
@Override
@@ -179,7 +179,7 @@ public class ScopeSetDialog extends TrayDialog {
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
}
-
+
private class ScopeLabelProvider extends LabelProvider {
@Override
@@ -217,11 +217,11 @@ public class ScopeSetDialog extends TrayDialog {
labelProvider = new ScopeLabelProvider();
setInitialSelections( manager.getActiveSet());
}
-
+
private void setInitialSelections(ScopeSet scopeSet) {
initialSelection = scopeSet;
}
-
+
private ArrayList<ScopeSet> extractSets(ScopeSet[] array) {
ArrayList<ScopeSet> list = new ArrayList<>();
for (int i=0; i<array.length; i++) {
@@ -229,7 +229,7 @@ public class ScopeSetDialog extends TrayDialog {
}
return list;
}
-
+
@Override
protected Control createDialogArea(Composite container) {
Composite innerContainer = (Composite)super.createDialogArea(container);
@@ -244,20 +244,20 @@ public class ScopeSetDialog extends TrayDialog {
viewer.setFilters(filters );
return innerContainer;
}
-
+
private void createRadioButtons(Composite parent) {
boolean showAll = initialSelection != null && initialSelection.isDefault();
showAllRadio = new Button(parent, SWT.RADIO);
showAllRadio.setText(Messages.ScopeSet_selectAll);
-
+
showSelectedRadio = new Button(parent, SWT.RADIO);
showSelectedRadio.setText(Messages.ScopeSet_selectWorkingSet);
showAllRadio.addSelectionListener(new ShowAllListener());
showAllRadio.setSelection(showAll);
showSelectedRadio.setSelection(!showAll);
}
-
- private void createTable(Composite parent) {
+
+ private void createTable(Composite parent) {
viewer = new TableViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
viewer.setContentProvider(contentProvider);
viewer.setLabelProvider(labelProvider);
@@ -265,7 +265,7 @@ public class ScopeSetDialog extends TrayDialog {
viewer.addDoubleClickListener(event -> okPressed());
if (initialSelection != null) {
viewer.setSelection(new StructuredSelection(initialSelection));
- }
+ }
GridData gd = new GridData(GridData.FILL_BOTH);
gd.heightHint = convertHeightInCharsToPixels(heightInChars);
gd.widthHint = convertWidthInCharsToPixels(widthInChars);
@@ -273,13 +273,13 @@ public class ScopeSetDialog extends TrayDialog {
table.setLayoutData(gd);
table.setFont(parent.getFont());
}
-
+
private void enableTable() {
if (viewer != null) {
boolean showSelected = showSelectedRadio.getSelection();
viewer.getTable().setEnabled(showSelected);
viewer.refresh();
- // Ensure that a scope is selected unless there are no
+ // Ensure that a scope is selected unless there are no
// user defined scopes
if (showSelected && viewer.getSelection().isEmpty()) {
Object firstElement = viewer.getElementAt(0);
@@ -289,7 +289,7 @@ public class ScopeSetDialog extends TrayDialog {
}
}
}
-
+
private void createEditingButtons(Composite composite) {
Composite buttonComposite= new Composite(composite, SWT.RIGHT);
GridLayout layout= new GridLayout();
@@ -298,19 +298,19 @@ public class ScopeSetDialog extends TrayDialog {
GridData data= new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.GRAB_HORIZONTAL);
data.grabExcessHorizontalSpace= true;
composite.setData(data);
- createButton(buttonComposite, NEW_ID, Messages.ScopeSetDialog_new, false);
- renameButton = createButton(buttonComposite, RENAME_ID, Messages.ScopeSetDialog_rename, false);
- editButton = createButton(buttonComposite, EDIT_ID, Messages.ScopeSetDialog_edit, false);
- removeButton = createButton(buttonComposite, REMOVE_ID, Messages.ScopeSetDialog_remove, false);
+ createButton(buttonComposite, NEW_ID, Messages.ScopeSetDialog_new, false);
+ renameButton = createButton(buttonComposite, RENAME_ID, Messages.ScopeSetDialog_rename, false);
+ editButton = createButton(buttonComposite, EDIT_ID, Messages.ScopeSetDialog_edit, false);
+ removeButton = createButton(buttonComposite, REMOVE_ID, Messages.ScopeSetDialog_remove, false);
updateButtons();
}
-
+
public ScopeSet getActiveSet() {
if (result!=null && result.length>0)
return (ScopeSet)result[0];
return null;
}
-
+
@Override
protected void okPressed() {
if (operations!=null) {
@@ -330,7 +330,7 @@ public class ScopeSetDialog extends TrayDialog {
}
super.okPressed();
}
-
+
private void setResult(ScopeSet scope) {
result = new Object[] { scope };
}
@@ -343,7 +343,7 @@ public class ScopeSetDialog extends TrayDialog {
newResult.toArray(result);
}
}
-
+
@Override
protected void cancelPressed() {
if (operations!=null) {
@@ -355,7 +355,7 @@ public class ScopeSetDialog extends TrayDialog {
}
super.cancelPressed();
}
-
+
@Override
protected void buttonPressed(int buttonId) {
switch (buttonId) {
@@ -375,7 +375,7 @@ public class ScopeSetDialog extends TrayDialog {
}
super.buttonPressed(buttonId);
}
-
+
private void doNew() {
ScopeSet newSet = new ScopeSet(getDefaultName());
String name = getNewName(newSet.getName(), false);
@@ -388,7 +388,7 @@ public class ScopeSetDialog extends TrayDialog {
updateButtons();
}
}
-
+
private String getDefaultName() {
Set<String> namesInUse = new HashSet<>();
for (int i=0; i<sets.size(); i++) {
@@ -396,7 +396,7 @@ public class ScopeSetDialog extends TrayDialog {
namesInUse.add(set.getName().toLowerCase());
}
for (int i = 1; i < 1000; i++) {
- String name = Messages.ScopeSetDialog_defaultName + i;
+ String name = Messages.ScopeSetDialog_defaultName + i;
if (!namesInUse.contains(name.toLowerCase())) {
return name;
}
@@ -412,15 +412,15 @@ public class ScopeSetDialog extends TrayDialog {
return;
}
PreferenceManager manager = new ScopePreferenceManager(descManager, set);
-
- if (!localOnly) {
+
+ if (!localOnly) {
PreferenceDialog dialog = new ScopePreferenceDialog(getShell(), manager, descManager, set.isEditable());
dialog.setPreferenceStore(set.getPreferenceStore());
dialog.create();
dialog.getShell().setText(NLS.bind(Messages.ScopePreferenceDialog_wtitle, set.getName()));
dialog.open();
} else {
- LocalScopeDialog localDialog = new LocalScopeDialog(getShell(), manager, descManager, set);
+ LocalScopeDialog localDialog = new LocalScopeDialog(getShell(), manager, descManager, set);
localDialog.create();
localDialog.getShell().setText(NLS.bind(Messages.ScopePreferenceDialog_wtitle, set.getName()));
localDialog.open();
@@ -437,7 +437,7 @@ public class ScopeSetDialog extends TrayDialog {
if (newName!=null) {
if (rop!=null)
rop.newName = newName;
- else
+ else
scheduleOperation(new RenameOperation(set, newName));
viewer.update(set, null);
updateButtons();
@@ -454,13 +454,13 @@ public class ScopeSetDialog extends TrayDialog {
dialog.create();
String dialogTitle = isRename ?
Messages.RenameDialog_wtitle : Messages.NewDialog_wtitle;
- dialog.getShell().setText(dialogTitle);
+ dialog.getShell().setText(dialogTitle);
if (dialog.open()==RenameDialog.OK) {
return dialog.getNewName();
}
return null;
}
-
+
private void doRemove() {
IStructuredSelection ssel = (IStructuredSelection)viewer.getSelection();
ScopeSet set = (ScopeSet)ssel.getFirstElement();
@@ -472,17 +472,17 @@ public class ScopeSetDialog extends TrayDialog {
Object element = viewer.getElementAt(0);
if (element != null) {
viewer.setSelection(new StructuredSelection(element));
- }
+ }
updateButtons();
}
}
-
+
private void scheduleOperation(PendingOperation op) {
if (operations==null)
operations = new ArrayList<>();
operations.add(op);
}
-
+
private void updateButtons() {
IStructuredSelection ssel = (IStructuredSelection)viewer.getSelection();
editButton.setEnabled(ssel.isEmpty()==false);
@@ -491,7 +491,7 @@ public class ScopeSetDialog extends TrayDialog {
removeButton.setEnabled(editableSet);
renameButton.setEnabled(editableSet);
}
-
+
private PendingOperation findOperation(ScopeSet set, Class<?> type) {
if (operations!=null) {
for (int i=0; i<operations.size(); i++) {
@@ -506,6 +506,6 @@ public class ScopeSetDialog extends TrayDialog {
}
public void setInput(ScopeSetManager scopeSetManager) {
- input = scopeSetManager;
- }
+ input = scopeSetManager;
+ }
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetManager.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetManager.java
index a2732d6af..6a018e9e0 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetManager.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeSetManager.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
*******************************************************************************/
@@ -113,7 +113,7 @@ public class ScopeSetManager extends Observable {
for (int i = 0; i < files.length; i++) {
File file = files[i];
String name = file.getName();
- int loc = name.lastIndexOf(ScopeSet.EXT);
+ int loc = name.lastIndexOf(ScopeSet.EXT);
if (loc != -1) {
ScopeSet set = new ScopeSet(name.substring(0, loc));
sets.add(set);
@@ -121,7 +121,7 @@ public class ScopeSetManager extends Observable {
defSet = set;
continue;
}
- loc = name.lastIndexOf(HistoryScopeSet.EXT);
+ loc = name.lastIndexOf(HistoryScopeSet.EXT);
if (loc != -1) {
HistoryScopeSet set = new HistoryScopeSet(name.substring(0,
loc), null);
@@ -138,7 +138,7 @@ public class ScopeSetManager extends Observable {
}
}
-
+
public ScopeSet getDefaultScope() {
return defSet;
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeState.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeState.java
index 4b99bd111..e559c19cb 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeState.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ScopeState.java
@@ -12,20 +12,20 @@
package org.eclipse.help.ui.internal.views;
public class ScopeState {
-
+
private static ScopeState instance;
private ScopeSetManager scopeSetManager;
private EngineDescriptorManager engineManager;
-
- public static synchronized ScopeState getInstance() {
+
+ public static synchronized ScopeState getInstance() {
if ( instance == null )
{
instance = new ScopeState();
}
return instance;
}
-
- private ScopeState() {
+
+ private ScopeState() {
scopeSetManager = new ScopeSetManager();
}
@@ -40,5 +40,5 @@ public class ScopeState {
public void setEngineManager(EngineDescriptorManager engineManager) {
this.engineManager = engineManager;
}
-
+
}
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java
index 4264433c2..997c3aada 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java
@@ -63,7 +63,7 @@ import org.eclipse.ui.forms.widgets.TableWrapLayout;
public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUIConstants {
-
+
public class SearchScopeObserver implements Observer {
@Override
@@ -255,11 +255,11 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo
shellDefaultButton = null;
}
});
-
+
createScopeSection(toolkit);
-
+
// createAlternateQueriesSection(toolkit);
-
+
toolkit.paintBordersFor(container);
jobListener = new JobListener();
Job.getJobManager().addJobChangeListener(jobListener);
@@ -284,7 +284,7 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo
scopeObserver = new SearchScopeObserver();
scopeSetManager.addObserver(scopeObserver);
}
-
+
private void createSearchExpressionSection(FormToolkit toolkit) {
TableWrapData td;
Section searchExpressionSection = toolkit.createSection(container, Section.TWISTIE | Section.COMPACT
@@ -312,7 +312,7 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo
updateSearchWordText();
toolkit.paintBordersFor(detailGroup);
}
-
+
private void createAlternateQueriesSection(FormToolkit toolkit){
TableWrapData td = new TableWrapData();
@@ -320,12 +320,12 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo
td.align = TableWrapData.FILL;
container.setMenu(new Menu(container));
-
+
alternateQuerySection = toolkit.createSection(container, Section.TWISTIE | Section.COMPACT
| Section.LEFT_TEXT_CLIENT_ALIGNMENT);
alternateQuerySection.setLayoutData(td);
alternateQuerySection.setText(Messages.AlternateQueries);
-
+
alternateQueryComposite = toolkit.createComposite(alternateQuerySection);
alternateQuerySection.setClient(alternateQueryComposite);
TableWrapLayout flayout = new TableWrapLayout();
@@ -335,7 +335,7 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo
// alternateQuerySection.setVisible(false);
}
-
+
private void createAdvancedLink(Composite parent, FormToolkit toolkit) {
advancedLink = toolkit.createHyperlink(parent, Messages.FederatedSearchPart_advanced, SWT.NULL);
advancedLink.addHyperlinkListener(new HyperlinkAdapter() {
@@ -623,10 +623,10 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo
}
});
}
- }
+ }
}
});
- }
+ }
}
@Override
@@ -735,7 +735,7 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo
searchPending = false;
doSearch(searchWordCombo.getText());
}
-
+
}
@Override
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchResultsPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchResultsPart.java
index dcf0cef28..c0dbf7781 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchResultsPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchResultsPart.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
*******************************************************************************/
@@ -110,7 +110,7 @@ public class SearchResultsPart extends AbstractFormPart implements IHelpPart {
results = new ArrayList<>();
contributeToToolBar(tbm);
}
-
+
void updateSeparatorVisibility() {
ScrollBar scrollBar = innerForm.getVerticalBar();
separator.setVisible(scrollBar.getSelection()>0);
@@ -127,9 +127,9 @@ public class SearchResultsPart extends AbstractFormPart implements IHelpPart {
*/
boolean descOn = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_SHOW_SEARCH_DESCRIPTION, false, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_SHOW_SEARCH_DESCRIPTION, false, null);
boolean showCategories = Platform.getPreferencesService().getBoolean
- (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_SHOW_SEARCH_CATEGORIES, false, null);
+ (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_SHOW_SEARCH_CATEGORIES, false, null);
showCategoriesAction = new Action() {
@Override
@@ -146,7 +146,7 @@ public class SearchResultsPart extends AbstractFormPart implements IHelpPart {
showCategoriesAction.setImageDescriptor(HelpUIResources
.getImageDescriptor(IHelpUIConstants.IMAGE_SHOW_CATEGORIES));
showCategoriesAction.setChecked(showCategories);
- showCategoriesAction.setToolTipText(Messages.SearchResultsPart_showCategoriesAction_tooltip);
+ showCategoriesAction.setToolTipText(Messages.SearchResultsPart_showCategoriesAction_tooltip);
showCategoriesAction.setId("categories"); //$NON-NLS-1$
tbm.insertBefore("back", showCategoriesAction); //$NON-NLS-1$
@@ -166,7 +166,7 @@ public class SearchResultsPart extends AbstractFormPart implements IHelpPart {
showDescriptionAction.setImageDescriptor(HelpUIResources
.getImageDescriptor(IHelpUIConstants.IMAGE_SHOW_DESC));
showDescriptionAction.setChecked(descOn);
- showDescriptionAction.setToolTipText(Messages.SearchResultsPart_showDescriptionAction_tooltip);
+ showDescriptionAction.setToolTipText(Messages.SearchResultsPart_showDescriptionAction_tooltip);
showDescriptionAction.setId("description"); //$NON-NLS-1$
tbm.insertAfter("categories", showDescriptionAction); //$NON-NLS-1$
tbm.insertAfter("description", new Separator()); //$NON-NLS-1$
@@ -216,7 +216,7 @@ public class SearchResultsPart extends AbstractFormPart implements IHelpPart {
public void setVisible(boolean visible) {
container.setVisible(visible);
}
-
+
void clearResults() {
clearResultSections();
separator.setVisible(false);
@@ -247,7 +247,7 @@ public class SearchResultsPart extends AbstractFormPart implements IHelpPart {
}
reflow();
}
-
+
private EngineDescriptor findLocalHelp(ArrayList<EngineDescriptor> eds) {
for (int i=0; i<eds.size(); i++) {
EngineDescriptor ed = eds.get(i);
@@ -256,14 +256,14 @@ public class SearchResultsPart extends AbstractFormPart implements IHelpPart {
}
return null;
}
-
+
void completed() {
for (int i = 0; i < results.size(); i++) {
EngineResultSection section = results.get(i);
section.completed();
}
}
-
+
void canceling() {
for (int i = 0; i < results.size(); i++) {
EngineResultSection section = results.get(i);
@@ -279,7 +279,7 @@ public class SearchResultsPart extends AbstractFormPart implements IHelpPart {
} else
parent.showURL(url);
}
-
+
void doCategoryLink(String href) {
parent.showPage(IHelpUIConstants.HV_ALL_TOPICS_PAGE);
AllTopicsPart part = (AllTopicsPart) parent
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SeeAlsoPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SeeAlsoPart.java
index c30697211..8185bb963 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SeeAlsoPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SeeAlsoPart.java
@@ -68,7 +68,7 @@ public class SeeAlsoPart extends AbstractFormPart implements IHelpPart {
rlayout.justify = false;
rlayout.wrap = true;
linkContainer.setLayout(rlayout);
-
+
hyperlinkGroup = new HyperlinkGroup(container.getDisplay());
hyperlinkGroup.setHyperlinkUnderlineMode(toolkit.getHyperlinkGroup().getHyperlinkUnderlineMode());
}
@@ -84,7 +84,7 @@ public class SeeAlsoPart extends AbstractFormPart implements IHelpPart {
} else {
link.setFont(JFaceResources.getDefaultFont());
}
- data.exclude = false;
+ data.exclude = false;
link.setVisible(!data.exclude);
}
linkContainer.layout();
@@ -101,24 +101,24 @@ public class SeeAlsoPart extends AbstractFormPart implements IHelpPart {
}
};
if ((helpPart.getStyle() & ReusableHelpPart.ALL_TOPICS) != 0)
- addPageLink(container, toolkit, Messages.SeeAlsoPart_allTopics, IHelpUIConstants.HV_ALL_TOPICS_PAGE,
+ addPageLink(container, toolkit, Messages.SeeAlsoPart_allTopics, IHelpUIConstants.HV_ALL_TOPICS_PAGE,
IHelpUIConstants.IMAGE_ALL_TOPICS, listener);
if ((helpPart.getStyle() & ReusableHelpPart.SEARCH) != 0) {
- addPageLink(container, toolkit, Messages.SeeAlsoPart_search, IHelpUIConstants.HV_FSEARCH_PAGE,
+ addPageLink(container, toolkit, Messages.SeeAlsoPart_search, IHelpUIConstants.HV_FSEARCH_PAGE,
IHelpUIConstants.IMAGE_HELP_SEARCH, listener);
}
if ((helpPart.getStyle() & ReusableHelpPart.CONTEXT_HELP) != 0) {
- addPageLink(container, toolkit, Messages.SeeAlsoPart_contextHelp,
+ addPageLink(container, toolkit, Messages.SeeAlsoPart_contextHelp,
IHelpUIConstants.HV_CONTEXT_HELP_PAGE,
IHelpUIConstants.IMAGE_RELATED_TOPICS, listener);
}
if ((helpPart.getStyle() & ReusableHelpPart.BOOKMARKS) != 0) {
- addPageLink(container, toolkit, Messages.SeeAlsoPart_bookmarks,
+ addPageLink(container, toolkit, Messages.SeeAlsoPart_bookmarks,
IHelpUIConstants.HV_BOOKMARKS_PAGE,
IHelpUIConstants.IMAGE_BOOKMARKS, listener);
}
if ((helpPart.getStyle() & ReusableHelpPart.INDEX) != 0) {
- addPageLink(container, toolkit, Messages.SeeAlsoPart_index,
+ addPageLink(container, toolkit, Messages.SeeAlsoPart_index,
IHelpUIConstants.HV_INDEX_PAGE,
IHelpUIConstants.IMAGE_INDEX, listener);
}
@@ -183,7 +183,7 @@ public class SeeAlsoPart extends AbstractFormPart implements IHelpPart {
bgImage.dispose();
}
}
-
+
@Override
public boolean fillContextMenu(IMenuManager manager) {
return false;
@@ -222,8 +222,8 @@ public class SeeAlsoPart extends AbstractFormPart implements IHelpPart {
@Override
public void saveState(IMemento memento) {
- }
-
+ }
+
@Override
public void setFocus() {
if (linkContainer!=null)
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SorterByScore.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SorterByScore.java
index 115a6cd03..b4a5bf9c4 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SorterByScore.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SorterByScore.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
*******************************************************************************/

Back to the top