mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GT-2971 - Key Bindings - Added the ability to set a key binding for the
close button for all Component Providers
This commit is contained in:
parent
8739d8e750
commit
380d863c96
113 changed files with 612 additions and 477 deletions
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -19,7 +18,6 @@ package ghidra.feature.vt.gui.actions;
|
|||
import ghidra.feature.vt.gui.plugin.VTController;
|
||||
import ghidra.feature.vt.gui.plugin.VTPlugin;
|
||||
import ghidra.feature.vt.gui.wizard.VTAddToSessionWizardManager;
|
||||
import ghidra.framework.plugintool.util.ToolConstants;
|
||||
import ghidra.util.HelpLocation;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
@ -27,6 +25,7 @@ import javax.swing.Icon;
|
|||
import resources.ResourceManager;
|
||||
import docking.ActionContext;
|
||||
import docking.action.*;
|
||||
import docking.tool.ToolConstants;
|
||||
import docking.wizard.WizardManager;
|
||||
|
||||
public class AddToVersionTrackingSessionAction extends DockingAction {
|
||||
|
|
|
@ -19,10 +19,10 @@ import javax.swing.Icon;
|
|||
|
||||
import docking.ActionContext;
|
||||
import docking.action.*;
|
||||
import docking.tool.ToolConstants;
|
||||
import ghidra.feature.vt.api.main.VTSession;
|
||||
import ghidra.feature.vt.gui.plugin.VTController;
|
||||
import ghidra.feature.vt.gui.plugin.VTPlugin;
|
||||
import ghidra.framework.plugintool.util.ToolConstants;
|
||||
import ghidra.util.HTMLUtilities;
|
||||
import ghidra.util.HelpLocation;
|
||||
import resources.ResourceManager;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -18,11 +17,11 @@ package ghidra.feature.vt.gui.actions;
|
|||
|
||||
import ghidra.feature.vt.gui.plugin.VTController;
|
||||
import ghidra.feature.vt.gui.plugin.VTPlugin;
|
||||
import ghidra.framework.plugintool.util.ToolConstants;
|
||||
import ghidra.util.HelpLocation;
|
||||
import docking.ActionContext;
|
||||
import docking.action.DockingAction;
|
||||
import docking.action.MenuData;
|
||||
import docking.tool.ToolConstants;
|
||||
|
||||
public class CloseVersionTrackingSessionAction extends DockingAction {
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -19,7 +18,6 @@ package ghidra.feature.vt.gui.actions;
|
|||
import ghidra.feature.vt.gui.plugin.VTController;
|
||||
import ghidra.feature.vt.gui.plugin.VTPlugin;
|
||||
import ghidra.feature.vt.gui.wizard.VTNewSessionWizardManager;
|
||||
import ghidra.framework.plugintool.util.ToolConstants;
|
||||
import ghidra.util.HelpLocation;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
@ -27,6 +25,7 @@ import javax.swing.Icon;
|
|||
import resources.ResourceManager;
|
||||
import docking.ActionContext;
|
||||
import docking.action.*;
|
||||
import docking.tool.ToolConstants;
|
||||
import docking.widgets.OptionDialog;
|
||||
import docking.wizard.WizardManager;
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ import docking.ActionContext;
|
|||
import docking.action.*;
|
||||
import docking.help.Help;
|
||||
import docking.help.HelpService;
|
||||
import docking.tool.ToolConstants;
|
||||
import ghidra.feature.vt.gui.plugin.VTPlugin;
|
||||
import ghidra.framework.plugintool.util.ToolConstants;
|
||||
import ghidra.util.HelpLocation;
|
||||
import ghidra.util.Msg;
|
||||
import resources.ResourceManager;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -23,11 +22,11 @@ import ghidra.framework.main.DataTreeDialog;
|
|||
import ghidra.framework.model.DomainFile;
|
||||
import ghidra.framework.model.DomainFileFilter;
|
||||
import ghidra.framework.plugintool.PluginTool;
|
||||
import ghidra.framework.plugintool.util.ToolConstants;
|
||||
import ghidra.util.HelpLocation;
|
||||
import docking.ActionContext;
|
||||
import docking.action.DockingAction;
|
||||
import docking.action.MenuData;
|
||||
import docking.tool.ToolConstants;
|
||||
|
||||
public class OpenVersionTrackingSessionAction extends DockingAction {
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -16,21 +15,20 @@
|
|||
*/
|
||||
package ghidra.feature.vt.gui.actions;
|
||||
|
||||
import ghidra.feature.vt.api.db.VTSessionDB;
|
||||
import ghidra.feature.vt.api.main.VTSession;
|
||||
import ghidra.feature.vt.gui.plugin.VTController;
|
||||
import ghidra.feature.vt.gui.plugin.VTPlugin;
|
||||
import ghidra.framework.plugintool.util.ToolConstants;
|
||||
import ghidra.util.*;
|
||||
|
||||
import java.awt.event.InputEvent;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
||||
import resources.ResourceManager;
|
||||
import docking.ActionContext;
|
||||
import docking.action.*;
|
||||
import docking.tool.ToolConstants;
|
||||
import ghidra.feature.vt.api.db.VTSessionDB;
|
||||
import ghidra.feature.vt.api.main.VTSession;
|
||||
import ghidra.feature.vt.gui.plugin.VTController;
|
||||
import ghidra.feature.vt.gui.plugin.VTPlugin;
|
||||
import ghidra.util.*;
|
||||
import resources.ResourceManager;
|
||||
|
||||
public class RedoAction extends DockingAction {
|
||||
private final VTController controller;
|
||||
|
@ -38,7 +36,7 @@ public class RedoAction extends DockingAction {
|
|||
public RedoAction(VTController controller) {
|
||||
super("Redo", VTPlugin.OWNER);
|
||||
this.controller = controller;
|
||||
setHelpLocation(new HelpLocation("Tool", "Redo"));
|
||||
setHelpLocation(new HelpLocation(ToolConstants.TOOL_HELP_TOPIC, "Redo"));
|
||||
String[] menuPath = { ToolConstants.MENU_EDIT, "&Redo" };
|
||||
String group = "ZZUndo";
|
||||
Icon icon = ResourceManager.loadImage("images/redo.png");
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -20,11 +19,11 @@ import ghidra.feature.vt.api.db.VTSessionDB;
|
|||
import ghidra.feature.vt.api.main.VTSession;
|
||||
import ghidra.feature.vt.gui.plugin.*;
|
||||
import ghidra.framework.model.DomainFile;
|
||||
import ghidra.framework.plugintool.util.ToolConstants;
|
||||
import ghidra.util.HelpLocation;
|
||||
import docking.ActionContext;
|
||||
import docking.action.DockingAction;
|
||||
import docking.action.MenuData;
|
||||
import docking.tool.ToolConstants;
|
||||
import docking.widgets.OptionDialog;
|
||||
|
||||
public class ResetToolAction extends DockingAction {
|
||||
|
|
|
@ -21,13 +21,13 @@ import javax.swing.Icon;
|
|||
|
||||
import docking.ActionContext;
|
||||
import docking.action.*;
|
||||
import docking.tool.ToolConstants;
|
||||
import ghidra.feature.vt.api.db.VTSessionDB;
|
||||
import ghidra.feature.vt.api.main.VTSession;
|
||||
import ghidra.feature.vt.gui.plugin.VTController;
|
||||
import ghidra.feature.vt.gui.plugin.VTPlugin;
|
||||
import ghidra.feature.vt.gui.task.SaveTask;
|
||||
import ghidra.framework.model.DomainFile;
|
||||
import ghidra.framework.plugintool.util.ToolConstants;
|
||||
import ghidra.program.model.listing.Program;
|
||||
import ghidra.util.HelpLocation;
|
||||
import ghidra.util.task.TaskLauncher;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -16,20 +15,19 @@
|
|||
*/
|
||||
package ghidra.feature.vt.gui.actions;
|
||||
|
||||
import ghidra.feature.vt.api.db.VTSessionDB;
|
||||
import ghidra.feature.vt.gui.plugin.VTController;
|
||||
import ghidra.feature.vt.gui.plugin.VTPlugin;
|
||||
import ghidra.framework.plugintool.util.ToolConstants;
|
||||
import ghidra.util.*;
|
||||
|
||||
import java.awt.event.InputEvent;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
||||
import resources.ResourceManager;
|
||||
import docking.ActionContext;
|
||||
import docking.action.*;
|
||||
import docking.tool.ToolConstants;
|
||||
import ghidra.feature.vt.api.db.VTSessionDB;
|
||||
import ghidra.feature.vt.gui.plugin.VTController;
|
||||
import ghidra.feature.vt.gui.plugin.VTPlugin;
|
||||
import ghidra.util.*;
|
||||
import resources.ResourceManager;
|
||||
|
||||
public class UndoAction extends DockingAction {
|
||||
private final VTController controller;
|
||||
|
@ -37,7 +35,7 @@ public class UndoAction extends DockingAction {
|
|||
public UndoAction(VTController controller) {
|
||||
super("Undo", VTPlugin.OWNER);
|
||||
this.controller = controller;
|
||||
setHelpLocation(new HelpLocation("Tool", "Undo"));
|
||||
setHelpLocation(new HelpLocation(ToolConstants.TOOL_HELP_TOPIC, "Undo"));
|
||||
String[] menuPath = { ToolConstants.MENU_EDIT, "&Undo" };
|
||||
String group = "ZZUndo";
|
||||
Icon icon = ResourceManager.loadImage("images/undo.png");
|
||||
|
|
|
@ -24,6 +24,7 @@ import javax.swing.*;
|
|||
import docking.action.DockingActionIf;
|
||||
import docking.help.Help;
|
||||
import docking.help.HelpService;
|
||||
import docking.tool.ToolConstants;
|
||||
import docking.wizard.WizardManager;
|
||||
import ghidra.GhidraOptions;
|
||||
import ghidra.app.plugin.core.codebrowser.CodeBrowserPlugin;
|
||||
|
@ -137,7 +138,7 @@ public class VTPlugin extends Plugin {
|
|||
}
|
||||
|
||||
private DockingActionIf getToolAction(String actionName) {
|
||||
Set<DockingActionIf> actions = tool.getDockingActionsByOwnerName("Tool");
|
||||
Set<DockingActionIf> actions = tool.getDockingActionsByOwnerName(ToolConstants.TOOL_OWNER);
|
||||
for (DockingActionIf action : actions) {
|
||||
if (action.getName().equals(actionName)) {
|
||||
return action;
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.jdom.output.XMLOutputter;
|
|||
|
||||
import docking.ActionContext;
|
||||
import docking.action.*;
|
||||
import docking.tool.ToolConstants;
|
||||
import docking.tool.util.DockingToolConstants;
|
||||
import docking.widgets.OptionDialog;
|
||||
import docking.widgets.fieldpanel.FieldPanel;
|
||||
|
@ -48,7 +49,8 @@ import ghidra.framework.ToolUtils;
|
|||
import ghidra.framework.model.*;
|
||||
import ghidra.framework.options.*;
|
||||
import ghidra.framework.plugintool.*;
|
||||
import ghidra.framework.plugintool.util.*;
|
||||
import ghidra.framework.plugintool.util.PluginException;
|
||||
import ghidra.framework.plugintool.util.PluginStatus;
|
||||
import ghidra.framework.project.tool.GhidraTool;
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.program.model.listing.*;
|
||||
|
@ -173,7 +175,7 @@ public class VTSubToolManager implements VTControllerListener, OptionsChangeList
|
|||
}
|
||||
|
||||
private DockingActionIf getToolAction(Tool tool, String actionName) {
|
||||
Set<DockingActionIf> actions = tool.getDockingActionsByOwnerName("Tool");
|
||||
Set<DockingActionIf> actions = tool.getDockingActionsByOwnerName(ToolConstants.TOOL_OWNER);
|
||||
for (DockingActionIf action : actions) {
|
||||
if (action.getName().equals(actionName)) {
|
||||
return action;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue