From 94ed9c62ea40ea083e8511d30b76084251f4bb86 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Mon, 19 Feb 2018 13:43:32 +0300 Subject: [PATCH] IDEA-186564 Default size of Edit configuration -> tasks before launch is just for 1 step --- .../com/intellij/execution/impl/BeforeRunStepsPanel.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/execution/impl/BeforeRunStepsPanel.java b/platform/lang-impl/src/com/intellij/execution/impl/BeforeRunStepsPanel.java index bed4a33dcda3..5f5a41729c18 100644 --- a/platform/lang-impl/src/com/intellij/execution/impl/BeforeRunStepsPanel.java +++ b/platform/lang-impl/src/com/intellij/execution/impl/BeforeRunStepsPanel.java @@ -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);