mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-07-30 07:18:37 -09:00
Merge remote-tracking branch 'origin/GP-6999-dragonmacher-fid-action-enablement'
This commit is contained in:
@@ -121,7 +121,7 @@ public class FidPlugin extends ProgramPlugin implements ChangeListener {
|
||||
.buildAndInstall(tool);
|
||||
|
||||
new ActionBuilder("Detach attached FidDb", getName())
|
||||
.enabledWhen(ac -> enabledForUserFidFiles())
|
||||
.enabledWhen(ac -> fidFileManager.hasUserFidFiles())
|
||||
.onAction(ac -> removeFidFile())
|
||||
.menuPath(ToolConstants.MENU_TOOLS, FUNCTION_ID_NAME, "Detach attached FidDb...")
|
||||
.menuGroup(MENU_GROUP_1, "4")
|
||||
@@ -130,7 +130,6 @@ public class FidPlugin extends ProgramPlugin implements ChangeListener {
|
||||
.buildAndInstall(tool);
|
||||
|
||||
new ActionBuilder("Populate FidDb from programs", getName())
|
||||
.enabledWhen(ac -> enabledForUserFidFiles())
|
||||
.onAction(ac -> {
|
||||
fidFileManager.load();
|
||||
PopulateFidDialog populateFidDialog = new PopulateFidDialog(tool, service);
|
||||
@@ -153,15 +152,6 @@ public class FidPlugin extends ProgramPlugin implements ChangeListener {
|
||||
return fidFileManager.hasFidFiles();
|
||||
}
|
||||
|
||||
private boolean enabledForUserFidFiles() {
|
||||
if (!fidFileManager.hasLoadedFidFiles()) {
|
||||
// We haven't loaded Fid files yet. Since we don't know if we can enable, return true
|
||||
// so users can at least try to perform the action.
|
||||
return true;
|
||||
}
|
||||
return fidFileManager.hasUserFidFiles();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to select which known FID databases are currently active
|
||||
* during search.
|
||||
|
||||
Reference in New Issue
Block a user