IDEA-69306 Time out problems while connecting to a JIRA server

This commit is contained in:
Dmitry Avdeev
2012-03-30 12:00:14 +04:00
parent be06a4414e
commit 26ecb5e9d7
3 changed files with 54 additions and 18 deletions
@@ -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.tasks.config.TaskConfigurable">
<grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="7" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="8" column-count="4" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="555" height="400"/>
@@ -10,7 +10,7 @@
<children>
<component id="e53da" class="javax.swing.JCheckBox" binding="myUpdateCheckBox" default-binding="true">
<constraints>
<grid row="4" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="5" column="0" row-span="1" col-span="4" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Enable issue &amp;cache"/>
@@ -18,7 +18,7 @@
</component>
<component id="9f69d" class="javax.swing.JFormattedTextField" binding="myHistoryLength">
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false">
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="4" fill="0" indent="0" use-parent-layout="false">
<preferred-size width="50" height="-1"/>
</grid>
</constraints>
@@ -39,13 +39,15 @@
</component>
<vspacer id="3f700">
<constraints>
<grid row="6" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
<grid row="7" column="1" row-span="1" col-span="3" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false">
<preferred-size width="136" height="14"/>
</grid>
</constraints>
</vspacer>
<grid id="e4d1f" binding="myCacheSettings" layout-manager="GridLayoutManager" row-count="1" column-count="6" 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="3" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<grid row="6" column="0" row-span="1" col-span="4" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<clientProperties>
@@ -68,9 +70,9 @@
<grid row="0" column="5" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
<component id="4b4f6" class="javax.swing.JTextField" binding="myUpdateCount">
<component id="4b4f6" class="javax.swing.JFormattedTextField" binding="myUpdateCount">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false">
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="4" fill="0" indent="0" use-parent-layout="false">
<preferred-size width="50" height="-1"/>
</grid>
</constraints>
@@ -89,9 +91,9 @@
<text value="issues e&amp;very"/>
</properties>
</component>
<component id="fc85e" class="javax.swing.JTextField" binding="myUpdateInterval">
<component id="fc85e" class="javax.swing.JFormattedTextField" binding="myUpdateInterval">
<constraints>
<grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false">
<grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="4" fill="0" indent="0" use-parent-layout="false">
<preferred-size width="50" height="-1"/>
</grid>
</constraints>
@@ -110,14 +112,9 @@
</component>
</children>
</grid>
<hspacer id="ac0b8">
<constraints>
<grid row="1" column="2" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
<component id="6f93" class="javax.swing.JCheckBox" binding="mySaveContextOnCommit">
<constraints>
<grid row="3" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="4" column="0" row-span="1" col-span="4" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="&amp;Save context on commit"/>
@@ -135,7 +132,7 @@
</component>
<component id="ef62" class="javax.swing.JTextField" binding="myChangelistNameFormat">
<constraints>
<grid row="0" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<grid row="0" column="1" row-span="1" col-span="3" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
@@ -143,12 +140,45 @@
</component>
<component id="6010f" class="com.intellij.ui.components.JBCheckBox" binding="myAlwaysDisplayTaskCombo">
<constraints>
<grid row="2" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="3" column="0" row-span="1" col-span="4" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Always &amp;display task combo in toolbar"/>
</properties>
</component>
<component id="f47eb" 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="4" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<horizontalAlignment value="11"/>
<text value="Connection &amp;timeout:"/>
</properties>
</component>
<component id="f5566" class="javax.swing.JFormattedTextField" binding="myConnectionTimeout">
<constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="4" fill="0" indent="0" use-parent-layout="false">
<preferred-size width="50" height="-1"/>
</grid>
</constraints>
<properties>
<horizontalAlignment value="4"/>
<text value="3000"/>
</properties>
</component>
<component id="737ae" class="javax.swing.JLabel">
<constraints>
<grid row="2" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="milliseconds"/>
</properties>
</component>
<hspacer id="c38af">
<constraints>
<grid row="2" column="3" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
</children>
</grid>
</form>
@@ -48,6 +48,7 @@ public class TaskConfigurable extends BindableConfigurable implements Searchable
@BindControl("changelistNameFormat")
private JTextField myChangelistNameFormat;
private JBCheckBox myAlwaysDisplayTaskCombo;
private JTextField myConnectionTimeout;
private final Project myProject;
private Configurable[] myConfigurables;
@@ -87,6 +88,7 @@ public class TaskConfigurable extends BindableConfigurable implements Searchable
super.reset();
enableFields();
myAlwaysDisplayTaskCombo.setSelected(TaskSettings.getInstance().ALWAYS_DISPLAY_COMBO);
myConnectionTimeout.setText(Integer.toString(TaskSettings.getInstance().CONNECTION_TIMEOUT));
}
@Override
@@ -97,11 +99,14 @@ public class TaskConfigurable extends BindableConfigurable implements Searchable
TaskManager.getManager(myProject).updateIssues(null);
}
TaskSettings.getInstance().ALWAYS_DISPLAY_COMBO = myAlwaysDisplayTaskCombo.isSelected();
TaskSettings.getInstance().CONNECTION_TIMEOUT = Integer.valueOf(myConnectionTimeout.getText());
}
@Override
public boolean isModified() {
return super.isModified() || TaskSettings.getInstance().ALWAYS_DISPLAY_COMBO != myAlwaysDisplayTaskCombo.isSelected();
return super.isModified() ||
TaskSettings.getInstance().ALWAYS_DISPLAY_COMBO != myAlwaysDisplayTaskCombo.isSelected() ||
TaskSettings.getInstance().CONNECTION_TIMEOUT != Integer.valueOf(myConnectionTimeout.getText());
}
@Nls
@@ -35,6 +35,7 @@ import com.intellij.util.xmlb.XmlSerializerUtil;
public class TaskSettings implements PersistentStateComponent<TaskSettings> {
public boolean ALWAYS_DISPLAY_COMBO = false;
public int CONNECTION_TIMEOUT = 5000;
public static TaskSettings getInstance() {
return ServiceManager.getService(TaskSettings.class);