Align modules in Configure Kotlin dialog
This commit is contained in:
@@ -8,20 +8,12 @@
|
|||||||
<properties/>
|
<properties/>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
<children>
|
<children>
|
||||||
<component id="6717d" class="javax.swing.JRadioButton" binding="allModulesWithKtRadioButton" default-binding="true">
|
|
||||||
<constraints>
|
|
||||||
<grid row="0" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
|
||||||
</constraints>
|
|
||||||
<properties>
|
|
||||||
<text value="All modules containing Kotlin files: "/>
|
|
||||||
</properties>
|
|
||||||
</component>
|
|
||||||
<component id="e348f" class="javax.swing.JRadioButton" binding="singleModuleRadioButton" default-binding="true">
|
<component id="e348f" class="javax.swing.JRadioButton" binding="singleModuleRadioButton" default-binding="true">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="Single module"/>
|
<text value="Single module:"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
<component id="8acf5" class="javax.swing.JComboBox" binding="singleModuleComboBox">
|
<component id="8acf5" class="javax.swing.JComboBox" binding="singleModuleComboBox">
|
||||||
@@ -43,6 +35,26 @@
|
|||||||
<grid row="3" column="0" row-span="1" col-span="3" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
<grid row="3" column="0" row-span="1" col-span="3" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</vspacer>
|
</vspacer>
|
||||||
|
<component id="5ca07" class="javax.swing.JTextField" binding="allModulesNames">
|
||||||
|
<constraints>
|
||||||
|
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||||
|
<preferred-size width="150" height="-1"/>
|
||||||
|
<maximum-size width="-1" height="100"/>
|
||||||
|
</grid>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<editable value="false"/>
|
||||||
|
<enabled value="true"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
<component id="6717d" class="javax.swing.JRadioButton" binding="allModulesWithKtRadioButton" default-binding="true">
|
||||||
|
<constraints>
|
||||||
|
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<text value="All modules containing Kotlin files: "/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
</children>
|
</children>
|
||||||
</grid>
|
</grid>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import com.intellij.util.Function;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
import java.awt.*;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -35,6 +36,7 @@ public class ChooseModulePanel {
|
|||||||
private JRadioButton singleModuleRadioButton;
|
private JRadioButton singleModuleRadioButton;
|
||||||
private JComboBox singleModuleComboBox;
|
private JComboBox singleModuleComboBox;
|
||||||
private JSeparator separator;
|
private JSeparator separator;
|
||||||
|
private JTextField allModulesNames;
|
||||||
|
|
||||||
@NotNull private final Project project;
|
@NotNull private final Project project;
|
||||||
@NotNull private final List<Module> modules;
|
@NotNull private final List<Module> modules;
|
||||||
@@ -62,14 +64,15 @@ public class ChooseModulePanel {
|
|||||||
updateComponents();
|
updateComponents();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
String fullList = StringUtil.join(modules, new Function<Module, String>() {
|
String fullList = StringUtil.join(modules, new Function<Module, String>() {
|
||||||
@Override
|
@Override
|
||||||
public String fun(Module module) {
|
public String fun(Module module) {
|
||||||
return module.getName();
|
return module.getName();
|
||||||
}
|
}
|
||||||
}, ", ");
|
}, ", ");
|
||||||
|
allModulesNames.setText(fullList);
|
||||||
allModulesWithKtRadioButton.setText(allModulesWithKtRadioButton.getText() + StringUtil.shortenTextWithEllipsis(fullList, 80, 0));
|
allModulesNames.setBorder(null);
|
||||||
|
|
||||||
ButtonGroup modulesGroup = new ButtonGroup();
|
ButtonGroup modulesGroup = new ButtonGroup();
|
||||||
modulesGroup.add(allModulesWithKtRadioButton);
|
modulesGroup.add(allModulesWithKtRadioButton);
|
||||||
|
|||||||
Reference in New Issue
Block a user