mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-186564 Default size of Edit configuration -> tasks before launch is just for 1 step
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.execution.impl;
|
||||
|
||||
import com.intellij.execution.BeforeRunTask;
|
||||
@@ -57,27 +57,22 @@ class BeforeRunStepsPanel extends JPanel {
|
||||
myList.getEmptyText().setText(ExecutionBundle.message("before.launch.panel.empty"));
|
||||
myList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||
myList.setCellRenderer(new MyListCellRenderer());
|
||||
myList.setVisibleRowCount(4);
|
||||
|
||||
myModel.addListDataListener(new ListDataListener() {
|
||||
@Override
|
||||
public void intervalAdded(ListDataEvent e) {
|
||||
adjustVisibleRowCount();
|
||||
updateText();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void intervalRemoved(ListDataEvent e) {
|
||||
adjustVisibleRowCount();
|
||||
updateText();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void contentsChanged(ListDataEvent e) {
|
||||
}
|
||||
|
||||
private void adjustVisibleRowCount() {
|
||||
myList.setVisibleRowCount(Math.max(4, Math.min(8, myModel.getSize())));
|
||||
}
|
||||
});
|
||||
|
||||
ToolbarDecorator myDecorator = ToolbarDecorator.createDecorator(myList);
|
||||
|
||||
Reference in New Issue
Block a user