mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Hide templates list from new "new file" popup if it has only one template (IDEA-210532)
GitOrigin-RevId: e9d19cafe2f3fcb718217f1048e559f4e1e6926d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
eb0271fd6d
commit
76f2997bf2
+9
-7
@@ -59,13 +59,15 @@ public class CreateWithTemplatesDialogPanel extends JBPanel implements Disposabl
|
||||
selectTemplate(selectedItem);
|
||||
add(myNameField, BorderLayout.NORTH);
|
||||
|
||||
JBScrollPane scrollPane = new JBScrollPane(myTemplatesList);
|
||||
scrollPane.setBorder(JBUI.Borders.empty());
|
||||
scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
Box listHolder = new Box(BoxLayout.Y_AXIS);
|
||||
listHolder.setBorder(JBUI.Borders.emptyTop(JBUI.CurrentTheme.NewClassDialog.fieldsSeparatorWidth()));
|
||||
listHolder.add(scrollPane);
|
||||
add(listHolder, BorderLayout.CENTER);
|
||||
if (templates.size() > 1) {
|
||||
JBScrollPane scrollPane = new JBScrollPane(myTemplatesList);
|
||||
scrollPane.setBorder(JBUI.Borders.empty());
|
||||
scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
Box listHolder = new Box(BoxLayout.Y_AXIS);
|
||||
listHolder.setBorder(JBUI.Borders.emptyTop(JBUI.CurrentTheme.NewClassDialog.fieldsSeparatorWidth()));
|
||||
listHolder.add(scrollPane);
|
||||
add(listHolder, BorderLayout.CENTER);
|
||||
}
|
||||
}
|
||||
|
||||
public JTextField getNameField() {
|
||||
|
||||
Reference in New Issue
Block a user