mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-31 21:01:24 +08:00
Merge remote-tracking branch 'origin/GP-3105-dragonmacher-dialog-stack-trace'
This commit is contained in:
+14
-20
@@ -87,8 +87,6 @@ public class ProgramManagerPlugin extends Plugin implements ProgramManager {
|
|||||||
private RedoAction redoAction;
|
private RedoAction redoAction;
|
||||||
private ProgramLocation currentLocation;
|
private ProgramLocation currentLocation;
|
||||||
|
|
||||||
private OpenVersionedFileDialog<Program> openDialog;
|
|
||||||
|
|
||||||
public ProgramManagerPlugin(PluginTool tool) {
|
public ProgramManagerPlugin(PluginTool tool) {
|
||||||
super(tool);
|
super(tool);
|
||||||
|
|
||||||
@@ -297,9 +295,6 @@ public class ProgramManagerPlugin extends Plugin implements ProgramManager {
|
|||||||
public void dispose() {
|
public void dispose() {
|
||||||
programMgr.dispose();
|
programMgr.dispose();
|
||||||
tool.clearLastEvents();
|
tool.clearLastEvents();
|
||||||
if (openDialog != null) {
|
|
||||||
openDialog.dispose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -610,22 +605,21 @@ public class ProgramManagerPlugin extends Plugin implements ProgramManager {
|
|||||||
|
|
||||||
private void open() {
|
private void open() {
|
||||||
|
|
||||||
if (openDialog == null) {
|
OpenVersionedFileDialog<Program> openDialog =
|
||||||
openDialog = new OpenVersionedFileDialog<>(tool, "Open Program", Program.class);
|
new OpenVersionedFileDialog<>(tool, "Open Program", Program.class);
|
||||||
openDialog.setHelpLocation(new HelpLocation(HelpTopics.PROGRAM, "Open_File_Dialog"));
|
openDialog.setHelpLocation(new HelpLocation(HelpTopics.PROGRAM, "Open_File_Dialog"));
|
||||||
|
|
||||||
openDialog.addOkActionListener(e -> {
|
openDialog.addOkActionListener(e -> {
|
||||||
DomainFile domainFile = openDialog.getDomainFile();
|
DomainFile domainFile = openDialog.getDomainFile();
|
||||||
int version = openDialog.getVersion();
|
int version = openDialog.getVersion();
|
||||||
if (domainFile == null) {
|
if (domainFile == null) {
|
||||||
openDialog.setStatusText("Please choose a Program");
|
openDialog.setStatusText("Please choose a Program");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
openDialog.close();
|
openDialog.close();
|
||||||
doOpenProgram(domainFile, version, OPEN_CURRENT);
|
doOpenProgram(domainFile, version, OPEN_CURRENT);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
tool.showDialog(openDialog);
|
tool.showDialog(openDialog);
|
||||||
contextChanged();
|
contextChanged();
|
||||||
|
|||||||
Reference in New Issue
Block a user