mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-22 04:05:39 +00:00
GP-4594: Fixing regression with library search paths not getting saved
This commit is contained in:
parent
ce970fa416
commit
29f215348a
@ -79,17 +79,17 @@ public class ScriptPathsPropertyEditor extends AbstractTypedPropertyEditor<Strin
|
||||
|
||||
@Override
|
||||
protected PathnameTablePanel newPathnameTablePanel() {
|
||||
PathnameTablePanel tablePanel = new ScriptPathsPanel(this::reset);
|
||||
tablePanel.setFileChooserProperties(getTitle(), "DebuggerLaunchScriptDirectory",
|
||||
PathnameTablePanel panel = new ScriptPathsPanel(loadPaths(), this::reset);
|
||||
panel.setFileChooserProperties(getTitle(), "DebuggerLaunchScriptDirectory",
|
||||
GhidraFileChooserMode.DIRECTORIES_ONLY, true, null);
|
||||
return tablePanel;
|
||||
return panel;
|
||||
}
|
||||
}
|
||||
|
||||
protected class ScriptPathsPanel extends PathnameTablePanel {
|
||||
public ScriptPathsPanel(Callback resetCallback) {
|
||||
public ScriptPathsPanel(String[] paths, Callback resetCallback) {
|
||||
// disable edits, top/bottom irrelevant, unordered
|
||||
super(null, resetCallback, false, false, false);
|
||||
super(paths, resetCallback, false, false, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -43,11 +43,11 @@ public class LibraryPathsDialog extends AbstractPathsDialog {
|
||||
@Override
|
||||
protected PathnameTablePanel newPathnameTablePanel() {
|
||||
// disable edits, add to top, ordered
|
||||
PathnameTablePanel tablePanel =
|
||||
new PathnameTablePanel(null, this::reset, false, true, true);
|
||||
tablePanel.setFileChooserProperties("Select Directory or Filesystem",
|
||||
PathnameTablePanel panel =
|
||||
new PathnameTablePanel(loadPaths(), this::reset, false, true, true);
|
||||
panel.setFileChooserProperties("Select Directory or Filesystem",
|
||||
"LibrarySearchDirectory", GhidraFileChooserMode.FILES_AND_DIRECTORIES, false, null);
|
||||
return tablePanel;
|
||||
return panel;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -15,8 +15,6 @@
|
||||
*/
|
||||
package docking.widgets.pathmanager;
|
||||
|
||||
import javax.swing.JComponent;
|
||||
|
||||
import docking.DialogComponentProvider;
|
||||
|
||||
public abstract class AbstractPathsDialog extends DialogComponentProvider {
|
||||
@ -26,7 +24,7 @@ public abstract class AbstractPathsDialog extends DialogComponentProvider {
|
||||
protected AbstractPathsDialog(String title) {
|
||||
super(title);
|
||||
tablePanel = newPathnameTablePanel();
|
||||
addWorkPanel(buildWorkPanel());
|
||||
addWorkPanel(tablePanel);
|
||||
addOKButton();
|
||||
addCancelButton();
|
||||
setPreferredSize(600, 400);
|
||||
@ -44,11 +42,6 @@ public abstract class AbstractPathsDialog extends DialogComponentProvider {
|
||||
tablePanel.setPaths(paths);
|
||||
}
|
||||
|
||||
protected JComponent buildWorkPanel() {
|
||||
reset();
|
||||
return tablePanel;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void okCallback() {
|
||||
String[] paths = tablePanel.getPaths();
|
||||
|
Loading…
Reference in New Issue
Block a user