nicer UI for Python Integrated Tools

This commit is contained in:
Dmitry Jemerov
2013-02-15 15:57:54 +01:00
parent db602c2176
commit 4c2d80eb03
2 changed files with 70 additions and 62 deletions
@@ -22,60 +22,11 @@
<text value="Default test runner:"/>
</properties>
</component>
<component id="88016" class="com.intellij.ui.components.JBLabel">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<labelFor value="e486b"/>
<text value="Docstring format:"/>
</properties>
</component>
<component id="e486b" class="javax.swing.JComboBox" binding="myDocstringFormatComboBox" default-binding="true">
<constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<model/>
</properties>
</component>
<component id="653de" class="com.intellij.ui.components.JBLabel">
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<labelFor value="e486b"/>
<text value="Sphinx working directory:"/>
</properties>
</component>
<component id="bef7c" class="com.intellij.openapi.ui.TextFieldWithBrowseButton" binding="myWorkDir">
<constraints>
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
</component>
<vspacer id="fc19e">
<constraints>
<grid row="7" 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>
<component id="40acf" class="com.intellij.ui.components.JBLabel">
<constraints>
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<labelFor value="e486b"/>
<text value="Treat *.txt files as reStructuredText "/>
</properties>
</component>
<component id="31e02" class="javax.swing.JCheckBox" binding="txtIsRst" default-binding="true">
<constraints>
<grid row="4" column="1" 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 value=""/>
</properties>
</component>
<grid id="728f8" binding="myErrorPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<grid row="6" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
@@ -98,23 +49,74 @@
</constraints>
<properties/>
</component>
<component id="67e78" class="com.intellij.ui.components.JBLabel">
<grid id="e7a5f" binding="myDocStringsPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="2" column="0" row-span="2" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<labelFor value="e486b"/>
<text value="Analyze docstring test examples"/>
</properties>
</component>
<component id="29b83" class="javax.swing.JCheckBox" binding="analyzeDoctest">
<properties/>
<border type="none"/>
<children>
<component id="88016" class="com.intellij.ui.components.JBLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<labelFor value="e486b"/>
<text value="Docstring format:"/>
</properties>
</component>
<component id="e486b" class="javax.swing.JComboBox" binding="myDocstringFormatComboBox" default-binding="true">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<model/>
</properties>
</component>
<component id="29b83" class="javax.swing.JCheckBox" binding="analyzeDoctest">
<constraints>
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Analyze Python code in docstrings"/>
</properties>
</component>
</children>
</grid>
<grid id="9f040" binding="myRestPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="5" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="4" column="0" row-span="2" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value=""/>
</properties>
</component>
<properties/>
<border type="none"/>
<children>
<component id="653de" class="com.intellij.ui.components.JBLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<labelFor value="e486b"/>
<text value="Sphinx working directory:"/>
</properties>
</component>
<component id="bef7c" class="com.intellij.openapi.ui.TextFieldWithBrowseButton" binding="myWorkDir">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
</component>
<component id="31e02" class="javax.swing.JCheckBox" binding="txtIsRst" default-binding="true">
<constraints>
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Treat *.txt files as reStructuredText "/>
</properties>
</component>
</children>
</grid>
</children>
</grid>
</form>
@@ -17,6 +17,7 @@ import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.ui.TextFieldWithBrowseButton;
import com.intellij.openapi.util.Comparing;
import com.intellij.ui.CollectionComboBoxModel;
import com.intellij.ui.IdeBorderFactory;
import com.jetbrains.python.PyBundle;
import com.jetbrains.python.PyNames;
import com.jetbrains.python.ReSTService;
@@ -51,6 +52,8 @@ public class PyIntegratedToolsConfigurable implements SearchableConfigurable, No
private JPanel myErrorPanel;
private TextFieldWithBrowseButton myRequirementsPathField;
private JCheckBox analyzeDoctest;
private JPanel myDocStringsPanel;
private JPanel myRestPanel;
public PyIntegratedToolsConfigurable(@NotNull Module module) {
myModule = module;
@@ -67,6 +70,9 @@ public class PyIntegratedToolsConfigurable implements SearchableConfigurable, No
myRequirementsPathField.addBrowseFolderListener("Choose path to the package requirements file:", null, myProject,
FileChooserDescriptorFactory.createSingleLocalFileDescriptor());
myRequirementsPathField.setText(getRequirementsPath());
myDocStringsPanel.setBorder(IdeBorderFactory.createTitledBorder("Docstrings"));
myRestPanel.setBorder(IdeBorderFactory.createTitledBorder("reStructuredText"));
}
@NotNull