mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
replace constructor with builder ui: add splitter (IDEA-92956)
This commit is contained in:
+5
-7
@@ -25,6 +25,7 @@ import com.intellij.ide.util.TreeClassChooserFactory;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.options.ConfigurationException;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.Splitter;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.psi.*;
|
||||
@@ -109,13 +110,10 @@ public class ReplaceConstructorWithBuilderDialog extends RefactoringDialog {
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected JComponent createNorthPanel() {
|
||||
return createTablePanel();
|
||||
}
|
||||
|
||||
protected JComponent createCenterPanel() {
|
||||
|
||||
final Splitter splitter = new Splitter(true);
|
||||
splitter.setFirstComponent(createTablePanel());
|
||||
splitter.setSecondComponent(myWholePanel);
|
||||
final ActionListener enableDisableListener = new ActionListener() {
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
setEnabled(myCreateBuilderClassRadioButton.isSelected());
|
||||
@@ -140,7 +138,7 @@ public class ReplaceConstructorWithBuilderDialog extends RefactoringDialog {
|
||||
LOG.assertTrue(psiClass != null);
|
||||
myNewClassName.setText(psiClass.getName() + "Builder");
|
||||
|
||||
return myWholePanel;
|
||||
return splitter;
|
||||
}
|
||||
|
||||
private void setEnabled(final boolean createNew) {
|
||||
|
||||
Reference in New Issue
Block a user