mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
Fixed tests failing due to focus timing issues by allowing the test
framework to specify the source of key bindings
This commit is contained in:
parent
3418492a8c
commit
3f62f91a2e
5 changed files with 71 additions and 10 deletions
|
@ -354,9 +354,9 @@ public class DockingWindowManager implements PropertyChangeListener, Placeholder
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the window which contains the specified Provider's component.
|
||||
* Get the window that contains the specified Provider's component
|
||||
* @param provider component provider
|
||||
* @return window or null if component is not visible or not found.
|
||||
* @return window or null if component is not visible or not found
|
||||
*/
|
||||
public Window getProviderWindow(ComponentProvider provider) {
|
||||
ComponentPlaceholder placeholder = getActivePlaceholder(provider);
|
||||
|
@ -366,6 +366,24 @@ public class DockingWindowManager implements PropertyChangeListener, Placeholder
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the provider that contains the specified component
|
||||
* @param c the component
|
||||
* @return the provider; null if now containing provider is found
|
||||
*/
|
||||
public ComponentProvider getProvider(Component c) {
|
||||
if (c != null) {
|
||||
DockableComponent dc = getDockableComponent(c);
|
||||
if (dc != null) {
|
||||
ComponentPlaceholder placeholder = dc.getComponentWindowingPlaceholder();
|
||||
if (placeholder != null) {
|
||||
return placeholder.getProvider();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
ComponentPlaceholder getActivePlaceholder(ComponentProvider provider) {
|
||||
return placeholderManager.getActivePlaceholder(provider);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue