[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jedit-cvs
Subject:    [ jEdit-commits ] SF.net SVN: jedit:[23557] plugins/FTP/trunk
From:       ezust () users ! sourceforge ! net
Date:       2014-05-22 6:11:41
Message-ID: E1WnMEG-0003WM-3J () sfs-ml-3 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 23557
          http://sourceforge.net/p/jedit/svn/23557
Author:   ezust
Date:     2014-05-22 06:11:38 +0000 (Thu, 22 May 2014)
Log Message:
-----------
Request #336 FTP plugin: configure connection timeout option

Modified Paths:
--------------
    plugins/FTP/trunk/FTP.props
    plugins/FTP/trunk/ftp/ConnectionManager.java
    plugins/FTP/trunk/ftp/OptionPane.java
    plugins/FTP/trunk/users-guide.xml

Modified: plugins/FTP/trunk/FTP.props
===================================================================
--- plugins/FTP/trunk/FTP.props	2014-05-21 00:43:50 UTC (rev 23556)
+++ plugins/FTP/trunk/FTP.props	2014-05-22 06:11:38 UTC (rev 23557)
@@ -3,7 +3,7 @@
 
 plugin.ftp.FtpPlugin.name=FTP
 plugin.ftp.FtpPlugin.author=Slava Pestov (Former), Nicholas O'Leary (Former), Vadim \
                Voituk (former), Alan Ezust
-plugin.ftp.FtpPlugin.version=1.1
+plugin.ftp.FtpPlugin.version=1.1.1
 plugin.ftp.FtpPlugin.dev.revision=$Rev$
 plugin.ftp.FtpPlugin.docs=index.html
 plugin.ftp.FtpPlugin.depend.0=jedit 04.05.99.00
@@ -33,6 +33,7 @@
 options.ftp.useKeyFile.tooltip=Saves an AES256 hash of the master password here
 options.sftp.enableCompression=Enable compression over SFTP
 options.ftp.disableWeakCrypto=Disable (don't fallback on) weak encryption when \
saving passwords +options.ftp.timeOutMinutes=Connection Timeout in minutes
 options.sftp.MaxAuthTries=SFTP MaxAuthTries
 
 # Actions

Modified: plugins/FTP/trunk/ftp/ConnectionManager.java
===================================================================
--- plugins/FTP/trunk/ftp/ConnectionManager.java	2014-05-21 00:43:50 UTC (rev 23556)
+++ plugins/FTP/trunk/ftp/ConnectionManager.java	2014-05-22 06:11:38 UTC (rev 23557)
@@ -80,6 +80,11 @@
 	public static JSch client = null;
 	// }}}
 
+	
+	public static void setConnectionTimeout(int minutes) {
+		connectionTimeout = 60000 * minutes;
+	}
+	
 	//{{{ forgetPasswords() method
 	public static void forgetPasswords()
 	{
@@ -604,6 +609,8 @@
 		}
 		else
 		{
+			int minutes = jEdit.getIntegerProperty("ftp.timeOutMinutes", 1);
+			connectionTimeout = 60000 * minutes;
 			String passwordDirectory = MiscUtilities.constructPath(settingsDirectory, \
"cache");  passwordFile = new \
File(MiscUtilities.constructPath(passwordDirectory,"password-cache"));  \
passwordFile.getParentFile().mkdirs();

Modified: plugins/FTP/trunk/ftp/OptionPane.java
===================================================================
--- plugins/FTP/trunk/ftp/OptionPane.java	2014-05-21 00:43:50 UTC (rev 23556)
+++ plugins/FTP/trunk/ftp/OptionPane.java	2014-05-22 06:11:38 UTC (rev 23557)
@@ -26,6 +26,7 @@
 import java.awt.event.ActionListener;
 import javax.swing.JCheckBox;
 import javax.swing.JComboBox;
+
 import org.gjt.sp.jedit.AbstractOptionPane;
 import common.gui.FileTextField;
 import org.gjt.sp.jedit.jEdit;
@@ -42,12 +43,13 @@
 	JCheckBox enableCompression;
 	JCheckBox disableWeakCrypto;
 	JComboBox<String> sftpMaxAuthTries;
+	JComboBox<String> timeOutMinutes;
 
 	public OptionPane() {
 		super("ftp");
 	}
 
-
+	
 	protected void _init() {
 		storePasswords = new JCheckBox(jEdit.getProperty("options.ftp.savePasswords"), \
jEdit.getBooleanProperty("vfs.ftp.storePassword"));  \
storePasswords.addActionListener(this); @@ -70,6 +72,13 @@
 				jEdit.getBooleanProperty("vfs.sftp.compression"));
 		addComponent(enableCompression);
 
+		
+		timeOutMinutes = new JComboBox<String>(new String[] {"1", "2", "4", "8", "16", \
"32", "64" }); +		String timeOut = jEdit.getProperty("ftp.timeOutMinutes", "1");
+		timeOutMinutes.setSelectedItem(timeOut);
+		addComponent(jEdit.getProperty("options.ftp.timeOutMinutes"), timeOutMinutes);
+		
+		
 		sftpMaxAuthTries = new JComboBox<String>(new String[] {"1", "2", "3", "4", "5", \
"6" });  sftpMaxAuthTries.setSelectedItem(jEdit.getProperty("vfs.sftp.MaxAuthTries"));
  addComponent(jEdit.getProperty("options.sftp.MaxAuthTries"), sftpMaxAuthTries);
@@ -87,12 +96,17 @@
 
 		jEdit.setBooleanProperty("ftp.useKeyFile", useKeyFile.isSelected());
 		jEdit.setBooleanProperty("ftp.disableWeakCrypto", disableWeakCrypto.isSelected());
-
+		
 		if (useKeyFile.isSelected()) {
 			jEdit.setProperty("ftp.passKeyFile", keyFile.getTextField().getText());
 		}
 		jEdit.setBooleanProperty("vfs.ftp.storePassword", storePasswords.isSelected());
 		jEdit.setBooleanProperty("vfs.sftp.compression", enableCompression.isSelected());
+		String minStr = timeOutMinutes.getSelectedItem().toString();
+		jEdit.setProperty("ftp.timeOutMinutes", minStr );
+		Integer minutes = Integer.parseInt(minStr);
+		ConnectionManager.setConnectionTimeout(minutes);
+		
 		jEdit.setProperty("vfs.sftp.MaxAuthTries", \
sftpMaxAuthTries.getSelectedItem().toString());  }
 }

Modified: plugins/FTP/trunk/users-guide.xml
===================================================================
--- plugins/FTP/trunk/users-guide.xml	2014-05-21 00:43:50 UTC (rev 23556)
+++ plugins/FTP/trunk/users-guide.xml	2014-05-22 06:11:38 UTC (rev 23557)
@@ -237,6 +237,14 @@
 <appendix id="changes"><title>Change log</title>
 
  <itemizedlist>
+ 
+     <listitem><para><emphasis role="bold">Version 1.1.1</emphasis>
+      by Alan Ezust Requires Java 1.6, CommonControls 1.5, and jEdit 4.5. 
+      <itemizedlist>
+       <listitem><para> Request #336 FTP plugin: configure connection timeout
+       option </para></listitem>
+      </itemizedlist></para></listitem>
+ 
      <listitem><para><emphasis role="bold">Version 1.1</emphasis>
       by Alan Ezust Requires Java 1.6, CommonControls 1.5, and jEdit 4.5. </para>
     <itemizedlist>

This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
jEdit-CVS mailing list
jEdit-CVS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic