mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 02:09:44 +02:00
GP-4583 Fixed issue where open program were not being shown when the OpenVersionedFileDialog was being shown from diff
This commit is contained in:
parent
c4ea004218
commit
a3f16ff05f
30 changed files with 790 additions and 661 deletions
|
@ -15,6 +15,8 @@
|
|||
*/
|
||||
package ghidra.feature.vt.gui.actions;
|
||||
|
||||
import static ghidra.framework.main.DataTreeDialogType.*;
|
||||
|
||||
import docking.ActionContext;
|
||||
import docking.action.DockingAction;
|
||||
import docking.action.MenuData;
|
||||
|
@ -45,8 +47,8 @@ public class OpenVersionTrackingSessionAction extends DockingAction {
|
|||
public void actionPerformed(ActionContext context) {
|
||||
PluginTool tool = controller.getTool();
|
||||
DataTreeDialog dialog =
|
||||
new DataTreeDialog(tool.getToolFrame(), "Open Version Tracking Session",
|
||||
DataTreeDialog.OPEN, new VTDomainFileFilter());
|
||||
new DataTreeDialog(tool.getToolFrame(), "Open Version Tracking Session", OPEN,
|
||||
new VTDomainFileFilter());
|
||||
|
||||
tool.showDialog(dialog);
|
||||
if (!dialog.wasCancelled()) {
|
||||
|
@ -56,6 +58,7 @@ public class OpenVersionTrackingSessionAction extends DockingAction {
|
|||
}
|
||||
|
||||
class VTDomainFileFilter implements DomainFileFilter {
|
||||
@Override
|
||||
public boolean accept(DomainFile f) {
|
||||
Class<?> c = f.getDomainObjectClass();
|
||||
return VTSession.class.isAssignableFrom(c);
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
*/
|
||||
package ghidra.feature.vt.gui.wizard;
|
||||
|
||||
import static ghidra.framework.main.DataTreeDialogType.*;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.*;
|
||||
|
||||
|
@ -236,7 +238,7 @@ public class NewSessionPanel extends AbstractMageJPanel<VTWizardStateKey> {
|
|||
*/
|
||||
private void browseDataTreeFolders() {
|
||||
final DataTreeDialog dataTreeDialog =
|
||||
new DataTreeDialog(this, "Choose a project folder", DataTreeDialog.CHOOSE_FOLDER);
|
||||
new DataTreeDialog(this, "Choose a project folder", CHOOSE_FOLDER);
|
||||
|
||||
dataTreeDialog.addOkActionListener(e -> {
|
||||
dataTreeDialog.close();
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
*/
|
||||
package ghidra.feature.vt.gui.wizard;
|
||||
|
||||
import static ghidra.framework.main.DataTreeDialogType.*;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
@ -55,8 +57,8 @@ public class VTWizardUtils {
|
|||
static DomainFile chooseDomainFile(Component parent, String domainIdentifier,
|
||||
DomainFileFilter filter, DomainFile fileToSelect) {
|
||||
final DataTreeDialog dataTreeDialog = filter == null
|
||||
? new DataTreeDialog(parent, "Choose " + domainIdentifier, DataTreeDialog.OPEN)
|
||||
: new DataTreeDialog(parent, "Choose " + domainIdentifier, DataTreeDialog.OPEN,
|
||||
? new DataTreeDialog(parent, "Choose " + domainIdentifier, OPEN)
|
||||
: new DataTreeDialog(parent, "Choose " + domainIdentifier, OPEN,
|
||||
filter);
|
||||
final DomainFileBox box = new DomainFileBox();
|
||||
dataTreeDialog.addOkActionListener(new ActionListener() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue