Note: this manager will validate all registered help when in development mode. In order
- * to catch items that have not registered help at all, we rely on those items to register a
+ * to catch items that have not registered help at all, we rely on those items to register a
* default {@link HelpLocation} that will get flagged as invalid. Examples of this usage are
* the {@link DockingActionIf} and the {@link ComponentProvider} base classes.
*/
@@ -78,7 +78,7 @@ public class HelpManager implements HelpService {
/**
* Constructor.
- *
+ *
* @param url url for the main HelpSet file for the application.
* @throws HelpSetException if HelpSet could not be created
*/
@@ -104,7 +104,7 @@ public class HelpManager implements HelpService {
/**
* Add the help set for the given URL.
- *
+ *
* @param url url for the HelpSet (.hs) file
* @param classLoader the help classloader that knows how to find help modules in the classpath
* @throws HelpSetException if the help set could not be created from the given URL.
@@ -160,8 +160,8 @@ public class HelpManager implements HelpService {
}
// Implementation Note: the same object can have different help registered. For example,
- // DockingActions do this as part of their construction process.
- // These actions will register a default help location and then
+ // DockingActions do this as part of their construction process.
+ // These actions will register a default help location and then
// subclasses may change that location. We always use the most
// recently registered action.
helpLocations.put(helpObject, location);
@@ -188,6 +188,7 @@ public class HelpManager implements HelpService {
/**
* Returns the master help set (the one into which all other help sets are merged).
+ * @return the help set
*/
public GHelpSet getMasterHelpSet() {
return mainHS;
@@ -195,10 +196,10 @@ public class HelpManager implements HelpService {
/**
* Display the help page for the given URL. This is a specialty method for displaying
- * help when a specific file is desired, like an introduction page. Showing help for
- * objects within the system is accomplished by calling
+ * help when a specific file is desired, like an introduction page. Showing help for
+ * objects within the system is accomplished by calling
* {@link #showHelp(Object, boolean, Component)}.
- *
+ *
* @param url the URL to display
* @see #showHelp(Object, boolean, Component)
*/
@@ -400,7 +401,7 @@ public class HelpManager implements HelpService {
((DefaultHelpBroker) mainHB).setActivationWindow(owner);
}
- // make sure we are visible before we set data (prevents bugs in JavaHelp)
+ // make sure we are visible before we set data (prevents bugs in JavaHelp)
mainHB.setDisplayed(true);
if (!wasDisplayed) {
@@ -443,21 +444,20 @@ public class HelpManager implements HelpService {
return;
}
- TaskLauncher.launchNonModal("Validating Help", monitor -> {
- try {
- printBadHelp(monitor);
- }
- catch (CancelledException e) {
- // user cancelled; just exit
- }
- });
+ GThreadPool.runAsync(Swing.GSWING_THREAD_POOL_NAME, this::doPrintBadHelp);
}
- private void printBadHelp(TaskMonitor monitor) throws CancelledException {
+ private void doPrintBadHelp() {
- Map