mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
Component Provider - fixed bug that prevented some providers' close
button from working
This commit is contained in:
parent
cada47a258
commit
8f13b601d8
3 changed files with 40 additions and 2 deletions
|
@ -100,7 +100,7 @@ public class ActionContext {
|
|||
* Sets the sourceObject for this ActionContext. This method is used internally by the
|
||||
* DockingWindowManager. ComponentProvider and action developers should
|
||||
* only use this method for testing.
|
||||
* @param sourceObject
|
||||
* @param sourceObject the source object
|
||||
*/
|
||||
public void setSource(Object sourceObject) {
|
||||
this.sourceObject = sourceObject;
|
||||
|
@ -125,4 +125,18 @@ public class ActionContext {
|
|||
public MouseEvent getMouseEvent() {
|
||||
return mouseEvent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
//@formatter:off
|
||||
return "{\n" +
|
||||
"\tprovider: " + provider + ",\n" +
|
||||
"\tcontextObject: " + contextObject + ",\n" +
|
||||
"\tsourceObject: " + sourceObject + ",\n" +
|
||||
"\tmouseEvent: " + mouseEvent + "\n" +
|
||||
"}";
|
||||
//@formatter:on
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -229,7 +229,8 @@ public class ToolBarItemManager implements PropertyChangeListener, ActionListene
|
|||
private ActionContext getActionContext() {
|
||||
ComponentProvider provider = getComponentProvider();
|
||||
ActionContext context = provider == null ? null : provider.getActionContext(null);
|
||||
final ActionContext actionContext = context == null ? new ActionContext() : context;
|
||||
final ActionContext actionContext =
|
||||
context == null ? new ActionContext(provider, null) : context;
|
||||
return actionContext;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue