JComponent () { final JPanel panel = new JPanel(new BorderLayout()); if (myAllowDelegation) { myDelegationPanel = createDelegationPanel(); panel.add(myDelegationPanel, BorderLayout.WEST); } myPropagateParamChangesButton = new AnActionButton(RefactoringBundle.message("changeSignature.propagate.parameters.title"), null, AllIcons.Hierarchy.Supertypes) { @Override public void actionPerformed(@NotNull AnActionEvent e) { final Ref<CallerChooserBase<Method>> chooser = new Ref<>(); Consumer<Set<Method>> callback = callers -> { myMethodsToPropagateParameters = callers; myParameterPropagationTreeToReuse = chooser.get().getTree(); }; try { String message = RefactoringBundle.message("changeSignature.parameter.caller.chooser"); chooser.set(createCallerChooser(message, myParameterPropagationTreeToReuse, callback)); } catch (ProcessCanceledException ex) { // user cancelled initial callers search, don't show dialog return; } chooser.get().show(); } @Override public @NotNull ActionUpdateThread getActionUpdateThread() { return ActionUpdateThread.EDT; } }; final JPanel result = new JPanel(new VerticalFlowLayout(VerticalFlowLayout.TOP)); result.add(panel); return result; }