Merge remote-tracking branch 'origin/GP-2-dragonmacher-minor-help-tweaks'

This commit is contained in:
ghidra1
2026-05-26 17:35:52 -04:00
2 changed files with 13 additions and 7 deletions

View File

@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,6 +22,7 @@ import javax.swing.KeyStroke;
import docking.*;
import ghidra.util.HelpLocation;
import ghidra.util.SystemUtilities;
import help.HelpDescriptor;
import help.HelpService;
/**
@@ -56,6 +57,7 @@ public abstract class AbstractHelpAction extends DockingAction {
@Override
public void actionPerformed(ActionContext context) {
DockingActionIf mouseOverAction = DockingWindowManager.getMouseOverAction();
if (mouseOverAction != null) {
showHelp(mouseOverAction);
@@ -126,7 +128,12 @@ public abstract class AbstractHelpAction extends DockingAction {
return startingHelpObject;
}
// Second, with no help registered for the starting component, start looking for a suitable
// Second, see if we are showing help info and this object knows how to do that
if (isInfo() && startingHelpObject instanceof HelpDescriptor) {
return startingHelpObject;
}
// Finally, with no help registered for the starting component, start looking for a suitable
// help proxy.
//
// For Components, we can walk their containment hierarchy to find a potential help object

View File

@@ -18,8 +18,7 @@ package docking.help;
import java.awt.*;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.*;
import java.util.*;
import java.util.List;
import java.util.Map;
@@ -358,9 +357,9 @@ public class HelpManager implements HelpService {
// To do this, try making a URL out of the help string and doing a reverse lookup
URL URL = null;
try {
URL = new URL(helpIDString);
URL = URI.create(helpIDString).toURL();
}
catch (MalformedURLException e) {
catch (IllegalArgumentException | MalformedURLException e) {
// nothing we can do, fall through the method to the previous exception
}