mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-07-30 07:18:37 -09:00
Merge remote-tracking branch 'origin/GP-2-dragonmacher-minor-help-tweaks'
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user