mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inplace introduce parameter: no need to choose method when you only want to tweak settings in the dialog
This commit is contained in:
+8
@@ -291,4 +291,12 @@ public class InplaceIntroduceParameterPopup extends AbstractJavaInplaceIntroduce
|
||||
public void setReplaceAllOccurrences(boolean replaceAll) {
|
||||
myPanel.setReplaceAllOccurrences(replaceAll);
|
||||
}
|
||||
|
||||
public PsiMethod getMethodToIntroduceParameter() {
|
||||
return myMethod;
|
||||
}
|
||||
|
||||
public PsiMethod getMethodToSearchFor() {
|
||||
return myMethodToSearchFor;
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -182,6 +182,13 @@ public class IntroduceParameterHandler extends IntroduceHandlerBase implements R
|
||||
private void chooseMethodToIntroduceParameter(final Editor editor,
|
||||
final List<PsiMethod> validEnclosingMethods,
|
||||
final Introducer introducer) {
|
||||
final AbstractInplaceIntroducer inplaceIntroducer = AbstractInplaceIntroducer.getActiveIntroducer(editor);
|
||||
if (inplaceIntroducer instanceof InplaceIntroduceParameterPopup) {
|
||||
final InplaceIntroduceParameterPopup introduceParameterPopup = (InplaceIntroduceParameterPopup)inplaceIntroducer;
|
||||
introducer.introduceParameter(introduceParameterPopup.getMethodToIntroduceParameter(),
|
||||
introduceParameterPopup.getMethodToSearchFor());
|
||||
return;
|
||||
}
|
||||
final JPanel panel = new JPanel(new BorderLayout());
|
||||
final JCheckBox superMethod = new JCheckBox("Use super method of", true);
|
||||
superMethod.setMnemonic('U');
|
||||
|
||||
Reference in New Issue
Block a user