mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
GP-5852: Force saved tracking config to be an option.
This commit is contained in:
parent
3cfa867ac3
commit
07105dbc33
1 changed files with 8 additions and 2 deletions
|
@ -222,13 +222,19 @@ public class DebuggerTrackLocationTrait {
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected ActionState<LocationTrackingSpec> makeState(LocationTrackingSpec spec) {
|
||||||
|
return new ActionState<>(spec.getMenuName(), spec.getMenuIcon(), spec);
|
||||||
|
}
|
||||||
|
|
||||||
public List<ActionState<LocationTrackingSpec>> getStates() {
|
public List<ActionState<LocationTrackingSpec>> getStates() {
|
||||||
Map<String, ActionState<LocationTrackingSpec>> states = new TreeMap<>();
|
Map<String, ActionState<LocationTrackingSpec>> states = new TreeMap<>();
|
||||||
|
// NOTE: Ensure the saved spec is available, even if no factory produces it, yet.
|
||||||
|
// NOTE: In particular, the DebuggerWatchesPlugin may not read its config before us.
|
||||||
|
states.put(spec.getConfigName(), makeState(spec));
|
||||||
for (LocationTrackingSpec spec : LocationTrackingSpecFactory
|
for (LocationTrackingSpec spec : LocationTrackingSpecFactory
|
||||||
.allSuggested(tool)
|
.allSuggested(tool)
|
||||||
.values()) {
|
.values()) {
|
||||||
states.put(spec.getConfigName(),
|
states.put(spec.getConfigName(), makeState(spec));
|
||||||
new ActionState<>(spec.getMenuName(), spec.getMenuIcon(), spec));
|
|
||||||
}
|
}
|
||||||
ActionState<LocationTrackingSpec> current = action.getCurrentState();
|
ActionState<LocationTrackingSpec> current = action.getCurrentState();
|
||||||
if (current != null) {
|
if (current != null) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue