void () { classNameField.setText(innerClass.getName()); classNameField.selectAll(); if (innerClass instanceof KtClass && ((KtClass) innerClass).isInner()) { passOuterClassCheckBox.setSelected(true); passOuterClassCheckBox.addItemListener(e -> parameterField.setEnabled(passOuterClassCheckBox.isSelected())); } else { passOuterClassCheckBox.setSelected(false); passOuterClassCheckBox.setEnabled(false); parameterField.setEnabled(false); } if (passOuterClassCheckBox.isEnabled()) { boolean thisNeeded = isThisNeeded(); passOuterClassCheckBox.setSelected(thisNeeded); parameterField.setEnabled(thisNeeded); } passOuterClassCheckBox.addItemListener(e -> { boolean selected = passOuterClassCheckBox.isSelected(); parameterField.getComponent().setEnabled(selected); }); if (!(targetContainer instanceof PsiDirectory)) { packageNameField.setVisible(false); packageNameLabel.setVisible(false); } if (innerClass instanceof KtClass && ((KtClass) innerClass).isInner()) { KtClassBody innerClassBody = innerClass.getBody(); Function1<String, Boolean> validator = innerClassBody != null ? new Fe10KotlinNewDeclarationNameValidator(innerClassBody, (PsiElement) null, KotlinNameSuggestionProvider.ValidatorTarget.PARAMETER, Collections.emptyList()) : new CollectingNameValidator(); List<String> suggestions = Fe10KotlinNameSuggester.INSTANCE.suggestNamesByType(getOuterInstanceType(), validator, "outer"); parameterField.setSuggestions(ArrayUtil.toStringArray(suggestions)); } else { parameterField.getComponent().setEnabled(false); } FqName packageFqName = getTargetPackageFqName(); if (packageFqName != null) { packageNameField.prependItem(packageFqName.asString()); } KotlinRefactoringSettings settings = KotlinRefactoringSettings.getInstance(); searchForTextOccurrencesCheckBox.setSelected(settings.MOVE_TO_UPPER_LEVEL_SEARCH_FOR_TEXT); searchInCommentsCheckBox.setSelected(settings.MOVE_TO_UPPER_LEVEL_SEARCH_IN_COMMENTS); super.init(); initializedCheckBoxesState = getCheckboxesState(true); }