Extract Function: Fix signature update on dialog opening
This commit is contained in:
+6
-8
@@ -63,7 +63,7 @@ public class KotlinExtractFunctionDialog extends DialogWrapper {
|
|||||||
setModal(true);
|
setModal(true);
|
||||||
setTitle(JetRefactoringBundle.message("extract.function"));
|
setTitle(JetRefactoringBundle.message("extract.function"));
|
||||||
init();
|
init();
|
||||||
update(false);
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createUIComponents() {
|
private void createUIComponents() {
|
||||||
@@ -94,10 +94,8 @@ public class KotlinExtractFunctionDialog extends DialogWrapper {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void update(boolean recreateDescriptor) {
|
private void update() {
|
||||||
if (recreateDescriptor) {
|
this.currentDescriptor = createDescriptor();
|
||||||
this.currentDescriptor = createDescriptor();
|
|
||||||
}
|
|
||||||
|
|
||||||
setOKActionEnabled(checkNames());
|
setOKActionEnabled(checkNames());
|
||||||
signaturePreviewField.setText(
|
signaturePreviewField.setText(
|
||||||
@@ -116,7 +114,7 @@ public class KotlinExtractFunctionDialog extends DialogWrapper {
|
|||||||
new DocumentAdapter() {
|
new DocumentAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void documentChanged(DocumentEvent event) {
|
public void documentChanged(DocumentEvent event) {
|
||||||
update(true);
|
update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -130,7 +128,7 @@ public class KotlinExtractFunctionDialog extends DialogWrapper {
|
|||||||
new ItemListener() {
|
new ItemListener() {
|
||||||
@Override
|
@Override
|
||||||
public void itemStateChanged(@NotNull ItemEvent e) {
|
public void itemStateChanged(@NotNull ItemEvent e) {
|
||||||
update(true);
|
update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -138,7 +136,7 @@ public class KotlinExtractFunctionDialog extends DialogWrapper {
|
|||||||
parameterTablePanel = new KotlinParameterTablePanel() {
|
parameterTablePanel = new KotlinParameterTablePanel() {
|
||||||
@Override
|
@Override
|
||||||
protected void updateSignature() {
|
protected void updateSignature() {
|
||||||
KotlinExtractFunctionDialog.this.update(true);
|
KotlinExtractFunctionDialog.this.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user