IDEA-79934 Run Configurations: Ability to specify another Run configuration as a 'before run' task

Visual improvements
This commit is contained in:
Vassiliy Kudryashov
2012-04-24 15:07:48 +04:00
parent 3fc80399cd
commit ff2c953882
5 changed files with 21 additions and 8 deletions
@@ -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<BeforeRunTask>();
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) {
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.execution.impl.ConfigurationSettingsEditorWrapper">
<grid id="27dc6" binding="myWholePanel" layout-manager="GridLayoutManager" row-count="5" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="27dc6" binding="myWholePanel" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="5" bottom="0" right="0"/>
<constraints>
<xy x="124" y="274" width="276" height="150"/>
@@ -30,7 +30,7 @@
</grid>
<component id="c7b94" class="javax.swing.JCheckBox" binding="myCbStoreProjectConfiguration">
<constraints>
<grid row="4" 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="3" 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 resource-bundle="messages/ExecutionBundle" key="run.configuration.store.place.option"/>
@@ -45,11 +45,6 @@
</grid>
</constraints>
</vspacer>
<vspacer id="48f8f">
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
</children>
</grid>
</form>
@@ -105,4 +105,10 @@ class ListToolbarDecorator extends ToolbarDecorator {
}
}
}
@Override
public ToolbarDecorator setVisibleRowCount(int rowCount) {
myList.setVisibleRowCount(rowCount);
return this;
}
}
@@ -43,4 +43,10 @@ class TreeToolbarDecorator extends ToolbarDecorator {
@Override
protected void updateButtons() {
}
@Override
public ToolbarDecorator setVisibleRowCount(int rowCount) {
myTree.setVisibleRowCount(rowCount);
return this;
}
}
@@ -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}''