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