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 d9a797a8cde1..ac80749045af 100644 --- a/platform/lang-impl/src/com/intellij/execution/impl/BeforeRunStepsPanel.java +++ b/platform/lang-impl/src/com/intellij/execution/impl/BeforeRunStepsPanel.java @@ -18,6 +18,7 @@ package com.intellij.execution.impl; import com.intellij.execution.*; import com.intellij.execution.configurations.RunConfiguration; import com.intellij.execution.configurations.UnknownRunConfiguration; +import com.intellij.openapi.actionSystem.ActionToolbarPosition; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.DefaultActionGroup; @@ -28,6 +29,7 @@ import com.intellij.openapi.ui.popup.ListPopup; import com.intellij.openapi.util.Condition; import com.intellij.openapi.util.Key; import com.intellij.openapi.util.Pair; +import com.intellij.openapi.util.SystemInfo; import com.intellij.ui.*; import com.intellij.ui.components.JBList; import com.intellij.util.containers.hash.HashSet; @@ -57,9 +59,12 @@ class BeforeRunStepsPanel extends JPanel { myListener = listener; myModel = new CollectionListModel(); myList = new JBList(myModel); + myList.getEmptyText().setText(ExecutionBundle.message("before.launch.panel.empty")); myList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); myList.setCellRenderer(new MyListCellRenderer()); - ToolbarDecorator myDecorator = ToolbarDecorator.createDecorator(myList); + ToolbarDecorator myDecorator = ToolbarDecorator.createDecorator(myList).setVisibleRowCount(4); + if (!SystemInfo.isMac) + myDecorator.setToolbarPosition(ActionToolbarPosition.TOP); myDecorator.setEditAction(new AnActionButtonRunnable() { @Override public void run(AnActionButton button) { diff --git a/platform/lang-impl/src/com/intellij/execution/impl/ConfigurationSettingsEditorWrapper.form b/platform/lang-impl/src/com/intellij/execution/impl/ConfigurationSettingsEditorWrapper.form index 89bbe4fdf05f..0a6fff678be3 100644 --- a/platform/lang-impl/src/com/intellij/execution/impl/ConfigurationSettingsEditorWrapper.form +++ b/platform/lang-impl/src/com/intellij/execution/impl/ConfigurationSettingsEditorWrapper.form @@ -1,6 +1,6 @@
- + @@ -30,7 +30,7 @@ - + @@ -45,11 +45,6 @@ - - - - -
diff --git a/platform/platform-api/src/com/intellij/ui/ListToolbarDecorator.java b/platform/platform-api/src/com/intellij/ui/ListToolbarDecorator.java index 4cf0bd8f4166..7c458e2cb95d 100644 --- a/platform/platform-api/src/com/intellij/ui/ListToolbarDecorator.java +++ b/platform/platform-api/src/com/intellij/ui/ListToolbarDecorator.java @@ -105,4 +105,10 @@ class ListToolbarDecorator extends ToolbarDecorator { } } } + + @Override + public ToolbarDecorator setVisibleRowCount(int rowCount) { + myList.setVisibleRowCount(rowCount); + return this; + } } diff --git a/platform/platform-api/src/com/intellij/ui/TreeToolbarDecorator.java b/platform/platform-api/src/com/intellij/ui/TreeToolbarDecorator.java index 667d89a274d6..79d1a3af4621 100644 --- a/platform/platform-api/src/com/intellij/ui/TreeToolbarDecorator.java +++ b/platform/platform-api/src/com/intellij/ui/TreeToolbarDecorator.java @@ -43,4 +43,10 @@ class TreeToolbarDecorator extends ToolbarDecorator { @Override protected void updateButtons() { } + + @Override + public ToolbarDecorator setVisibleRowCount(int rowCount) { + myTree.setVisibleRowCount(rowCount); + return this; + } } diff --git a/platform/platform-resources-en/src/messages/ExecutionBundle.properties b/platform/platform-resources-en/src/messages/ExecutionBundle.properties index 425bf9a1b642..afde9982522f 100644 --- a/platform/platform-resources-en/src/messages/ExecutionBundle.properties +++ b/platform/platform-resources-en/src/messages/ExecutionBundle.properties @@ -282,6 +282,7 @@ run.configuration.cannot.find.vm.executable=Cannot find VM executable logs.tab.title=Logs before.launch.panel.title=Before Launch +before.launch.panel.empty=There are no tasks to run before launch before.launch.panel.cyclic_dependency_warning=''{0}'' has already configured to be launched before {1}.\nSuch cyclic dependencies are not allowed. before.launch.run.another.configuration=Run another Configuration before.launch.run.certain.configuration=Run ''{0}''