mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
GP-0 correct AnalysisOptionsTest failures
This commit is contained in:
parent
43476f2e20
commit
4e16b3aa3a
2 changed files with 16 additions and 2 deletions
|
@ -17,6 +17,7 @@ package docking.widgets.dialogs;
|
|||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Dimension;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
|
@ -182,4 +183,17 @@ public class InputWithChoicesDialog extends DialogComponentProvider {
|
|||
Object selectedItem = combo.getSelectedItem();
|
||||
return selectedItem == null ? null : selectedItem.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the current choice to value.
|
||||
* @param value updated choice
|
||||
* @throws NoSuchElementException if choice does not permit edits and value is
|
||||
* not a valid choice.
|
||||
*/
|
||||
public void setValue(String value) {
|
||||
combo.setSelectedItem(value);
|
||||
if (!combo.isEditable() && !combo.getSelectedItem().equals(value)) {
|
||||
throw new NoSuchElementException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue