directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1805443 [3/3] - in /directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio: connection/ui/ connection/ui/actions/ connection/ui/dialogs/ connection/ui/dnd/ connection/ui/preferences/ connecti...
Date Fri, 18 Aug 2017 16:24:32 GMT
Modified: directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionLabelProvider.java?rev=1805443&r1=1805442&r2=1805443&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionLabelProvider.java (original)
+++ directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionLabelProvider.java Fri Aug 18 16:24:32 2017
@@ -45,19 +45,20 @@ public class ConnectionLabelProvider ext
      * This implementation returns the connection name and appends information
      * about the used encryption method.
      */
+    @Override
     public String getText( Object obj )
     {
         if ( obj instanceof ConnectionFolder )
         {
             ConnectionFolder folder = ( ConnectionFolder ) obj;
-            
+
             return folder.getName();
         }
-        
+
         if ( obj instanceof Connection )
         {
             Connection conn = ( Connection ) obj;
-            
+
             if ( conn.getEncryptionMethod() == EncryptionMethod.LDAPS )
             {
                 return conn.getName() + " (LDAPS)"; //$NON-NLS-1$
@@ -87,6 +88,7 @@ public class ConnectionLabelProvider ext
      * 
      * This implementation returns a icon for connected or disconnected state.
      */
+    @Override
     public Image getImage( Object obj )
     {
         if ( obj instanceof ConnectionFolder )
@@ -96,19 +98,21 @@ public class ConnectionLabelProvider ext
         else if ( obj instanceof Connection )
         {
             Connection conn = ( Connection ) obj;
-            
+
             if ( ( conn.getEncryptionMethod() == EncryptionMethod.LDAPS )
                 || ( conn.getEncryptionMethod() == EncryptionMethod.START_TLS ) )
             {
                 return conn.getConnectionWrapper().isConnected() ? ConnectionUIPlugin.getDefault().getImage(
-                    ConnectionUIConstants.IMG_CONNECTION_SSL_CONNECTED ) : ConnectionUIPlugin.getDefault().getImage(
-                    ConnectionUIConstants.IMG_CONNECTION_SSL_DISCONNECTED );
+                    ConnectionUIConstants.IMG_CONNECTION_SSL_CONNECTED )
+                    : ConnectionUIPlugin.getDefault().getImage(
+                        ConnectionUIConstants.IMG_CONNECTION_SSL_DISCONNECTED );
             }
             else
             {
                 return conn.getConnectionWrapper().isConnected() ? ConnectionUIPlugin.getDefault().getImage(
-                    ConnectionUIConstants.IMG_CONNECTION_CONNECTED ) : ConnectionUIPlugin.getDefault().getImage(
-                    ConnectionUIConstants.IMG_CONNECTION_DISCONNECTED );
+                    ConnectionUIConstants.IMG_CONNECTION_CONNECTED )
+                    : ConnectionUIPlugin.getDefault().getImage(
+                        ConnectionUIConstants.IMG_CONNECTION_DISCONNECTED );
             }
         }
         else

Modified: directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionSorter.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionSorter.java?rev=1805443&r1=1805442&r2=1805443&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionSorter.java (original)
+++ directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionSorter.java Fri Aug 18 16:24:32 2017
@@ -59,6 +59,7 @@ public class ConnectionSorter extends Vi
      * 
      * This method is used to categorize connection folders and connections.
      */
+    @Override
     public int category( Object element )
     {
         if ( element instanceof ConnectionFolder )

Modified: directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionUniversalListener.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionUniversalListener.java?rev=1805443&r1=1805442&r2=1805443&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionUniversalListener.java (original)
+++ directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionUniversalListener.java Fri Aug 18 16:24:32 2017
@@ -26,7 +26,6 @@ import org.apache.directory.studio.conne
 import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
 import org.apache.directory.studio.connection.core.event.ConnectionUpdateListener;
 import org.apache.directory.studio.connection.ui.ConnectionUIPlugin;
-import org.eclipse.jface.viewers.DoubleClickEvent;
 import org.eclipse.jface.viewers.IDoubleClickListener;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.ITreeContentProvider;
@@ -45,27 +44,21 @@ public class ConnectionUniversalListener
     protected TreeViewer viewer;
 
     /** This listener expands/collapses a connection folder when double clicking */
-    private IDoubleClickListener viewerDoubleClickListener = new IDoubleClickListener()
+    private IDoubleClickListener viewerDoubleClickListener = event ->
     {
-        /**
-         * {@InheritDoc}
-         */
-        public void doubleClick( DoubleClickEvent event )
+        if ( event.getSelection() instanceof IStructuredSelection )
         {
-            if ( event.getSelection() instanceof IStructuredSelection )
+            Object obj = ( ( IStructuredSelection ) event.getSelection() ).getFirstElement();
+
+            if ( obj instanceof ConnectionFolder )
             {
-                Object obj = ( ( IStructuredSelection ) event.getSelection() ).getFirstElement();
-                
-                if ( obj instanceof ConnectionFolder )
+                if ( viewer.getExpandedState( obj ) )
+                {
+                    viewer.collapseToLevel( obj, 1 );
+                }
+                else if ( ( ( ITreeContentProvider ) viewer.getContentProvider() ).hasChildren( obj ) )
                 {
-                    if ( viewer.getExpandedState( obj ) )
-                    {
-                        viewer.collapseToLevel( obj, 1 );
-                    }
-                    else if ( ( ( ITreeContentProvider ) viewer.getContentProvider() ).hasChildren( obj ) )
-                    {
-                        viewer.expandToLevel( obj, 1 );
-                    }
+                    viewer.expandToLevel( obj, 1 );
                 }
             }
         }
@@ -119,7 +112,7 @@ public class ConnectionUniversalListener
     public void connectionAdded( Connection connection )
     {
         connectionUpdated( connection );
-        
+
         if ( viewer != null )
         {
             viewer.setSelection( new StructuredSelection( connection ), true );

Modified: directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionWidget.java?rev=1805443&r1=1805442&r2=1805443&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionWidget.java (original)
+++ directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionWidget.java Fri Aug 18 16:24:32 2017
@@ -80,6 +80,7 @@ public class ConnectionWidget extends Vi
     /**
      * {@inheritDoc}
      */
+    @Override
     public void createWidget( Composite parent )
     {
         if ( actionBars == null )
@@ -96,6 +97,7 @@ public class ConnectionWidget extends Vi
     /**
      * {@inheritDoc}
      */
+    @Override
     public IToolBarManager getToolBarManager()
     {
         if ( actionBars == null )
@@ -112,6 +114,7 @@ public class ConnectionWidget extends Vi
     /**
      * {@inheritDoc}
      */
+    @Override
     public IMenuManager getMenuManager()
     {
         if ( actionBars == null )
@@ -128,6 +131,7 @@ public class ConnectionWidget extends Vi
     /**
      * {@inheritDoc}
      */
+    @Override
     public IMenuManager getContextMenuManager()
     {
         if ( actionBars == null )
@@ -187,6 +191,7 @@ public class ConnectionWidget extends Vi
     /**
      * {@inheritDoc}
      */
+    @Override
     public void dispose()
     {
         if ( viewer != null )

Modified: directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ExtendedContentAssistCommandAdapter.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ExtendedContentAssistCommandAdapter.java?rev=1805443&r1=1805442&r2=1805443&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ExtendedContentAssistCommandAdapter.java (original)
+++ directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ExtendedContentAssistCommandAdapter.java Fri Aug 18 16:24:32 2017
@@ -57,7 +57,8 @@ public class ExtendedContentAssistComman
         IContentProposalProvider proposalProvider, String commandId, char[] autoActivationCharacters,
         boolean installDecoration )
     {
-        super( control, controlContentAdapter, proposalProvider, commandId, autoActivationCharacters, installDecoration );
+        super( control, controlContentAdapter, proposalProvider, commandId, autoActivationCharacters,
+            installDecoration );
 
         setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
         setFilterStyle( ContentProposalAdapter.FILTER_NONE );
@@ -65,6 +66,7 @@ public class ExtendedContentAssistComman
         setAutoActivationDelay( 0 );
     }
 
+
     /**
      * {@inheritDoc}
      */

Modified: directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/Messages.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/Messages.java?rev=1805443&r1=1805442&r2=1805443&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/Messages.java (original)
+++ directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/Messages.java Fri Aug 18 16:24:32 2017
@@ -32,17 +32,18 @@ import java.util.ResourceBundle;
 public final class Messages
 {
     /** The resource name */
-    private static final ResourceBundle RESOURCE_BUNDLE = 
-        ResourceBundle.getBundle( Messages.class.getPackage().getName() + ".messages" );
-    
+    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+        .getBundle( Messages.class.getPackage().getName() + ".messages" );
+
+
     /**
      * Make the constructor private to make this class an utility class
      */
     private Messages()
     {
     }
-    
-    
+
+
     /**
      * Get back a message from the resource file given a key
      * 

Modified: directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java?rev=1805443&r1=1805442&r2=1805443&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java (original)
+++ directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java Fri Aug 18 16:24:32 2017
@@ -48,12 +48,8 @@ import org.eclipse.jface.dialogs.Message
 import org.eclipse.jface.preference.PreferenceDialog;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.events.VerifyListener;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Combo;
@@ -67,8 +63,37 @@ import org.eclipse.ui.dialogs.Preference
 
 /**
  * The NetworkParameterPage is used the edit the network parameters of a
- * connection.
- *  
+ * connection. This is a tab in the connection property widget :
+ * 
+ * <pre>
+ * .---------------------------------------------------------------------------.
+ * | Connection                                                                |
+ * +---------------------------------------------------------------------------+
+ * | .---[Network Parameter]|Authentication||Browser Options||Edit Options|--. |
+ * | |                                                                       | | 
+ * | | Connection name : [-------------------------------------]             | |
+ * | |                                                                       | |
+ * | | Network Parameter                                                     | |
+ * | | .-------------------------------------------------------------------. | |
+ * | | |                                                                   | | |
+ * | | |  Hostname :          [----------------------------------------|v] | | |
+ * | | |  Port :              [----------------------------------------|v] | | |
+ * | | |  Timeout :                  [                                   ] | | |
+ * | | |  Encryption method : [-No encryption--------------------------|v] | | |
+ * | | |                      Server certificates for LDAP connections can | | |
+ * | | |                      managed in the '<certificate validation>'    | | |
+ * | | |                      preference page.                             | | |
+ * | | |  Provider :          [ Apache Directory LDAP API              |v] | | |
+ * | | |                                                                   | | |
+ * | | |                                         (Check Network Parameter) | | |
+ * | | +-------------------------------------------------------------------+ | |
+ * | |                                                                       | |
+ * | | [] Read-Only (prevents any add, delete, modify or rename operation)   | |
+ * | |                                                                       | |  
+ * | +-----------------------------------------------------------------------+ |
+ * +---------------------------------------------------------------------------+
+ * </pre>
+ * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class NetworkParameterPage extends AbstractConnectionParameterPage
@@ -107,12 +132,16 @@ public class NetworkParameterPage extend
 
     /** The checkbox to make the connection read-only */
     private Button readOnlyConnectionCheckbox;
-    
+
+    /** A timeout for the connection. Default to 30s */
+    private Text timeoutText;
+
     /**
      * A listener for the Link data widget. It will open the CertificateValidationPreference dialog.
      */
     private SelectionAdapter linkDataWidgetListener = new SelectionAdapter()
     {
+        @Override
         public void widgetSelected( SelectionEvent event )
         {
             String certificateValidationPreferencePageId = "org.apache.directory.studio.connection.preferences.CertificateValidationPreferencePage"; //$NON-NLS-1$
@@ -159,6 +188,26 @@ public class NetworkParameterPage extend
 
 
     /**
+     * Gets the timeout
+     * 
+     * @return The tiemout
+     */
+    private int getTimeout()
+    {
+        String timeoutString = timeoutText.getText();
+
+        if ( Strings.isEmpty( timeoutString ) )
+        {
+            return 30;
+        }
+        else
+        {
+            return Integer.parseInt( timeoutString );
+        }
+    }
+
+
+    /**
      * Gets the encyrption method.
      * 
      * @return the encyrption method
@@ -169,10 +218,10 @@ public class NetworkParameterPage extend
         {
             case 1:
                 return ConnectionParameter.EncryptionMethod.LDAPS;
-                
+
             case 2:
                 return ConnectionParameter.EncryptionMethod.START_TLS;
-                
+
             default:
                 return ConnectionParameter.EncryptionMethod.NONE;
         }
@@ -180,9 +229,9 @@ public class NetworkParameterPage extend
 
 
     /**
-     * Gets the encyrption method.
+     * Gets the network type (JNDI or Apache LDAP API) 
      * 
-     * @return the encyrption method
+     * @return the network type
      */
     private ConnectionParameter.NetworkProvider getNetworkProvider()
     {
@@ -203,11 +252,11 @@ public class NetworkParameterPage extend
      */
     private Connection getTestConnection()
     {
-        ConnectionParameter connectionParameter = new ConnectionParameter( null, getHostName(), getPort(), getEncyrptionMethod(),
-            getNetworkProvider(), ConnectionParameter.AuthenticationMethod.NONE, null, null, null, true, null );
-        Connection conn = new Connection( connectionParameter );
-        
-        return conn;
+        ConnectionParameter connectionParameter = new ConnectionParameter( null, getHostName(), getPort(),
+            getEncyrptionMethod(),
+            getNetworkProvider(), ConnectionParameter.AuthenticationMethod.NONE, null, null, null, true, null, 30 );
+
+        return new Connection( connectionParameter );
     }
 
 
@@ -240,27 +289,39 @@ public class NetworkParameterPage extend
 
         IDialogSettings dialogSettings = ConnectionUIPlugin.getDefault().getDialogSettings();
 
+        // The network hostname
         Composite groupComposite = BaseWidgetUtils.createColumnContainer( group, 3, 1 );
         BaseWidgetUtils.createLabel( groupComposite, Messages.getString( "NetworkParameterPage.HostName" ), 1 ); //$NON-NLS-1$
-        String[] hostHistory = HistoryUtils.load( dialogSettings, ConnectionUIConstants.DIALOGSETTING_KEY_HOST_HISTORY );
+        String[] hostHistory = HistoryUtils.load( dialogSettings,
+            ConnectionUIConstants.DIALOGSETTING_KEY_HOST_HISTORY );
         hostCombo = BaseWidgetUtils.createCombo( groupComposite, hostHistory, -1, 2 );
 
+        // The network port
         BaseWidgetUtils.createLabel( groupComposite, Messages.getString( "NetworkParameterPage.Port" ), 1 ); //$NON-NLS-1$
-        String[] portHistory = HistoryUtils.load( dialogSettings, ConnectionUIConstants.DIALOGSETTING_KEY_PORT_HISTORY );
+        String[] portHistory = HistoryUtils.load( dialogSettings,
+            ConnectionUIConstants.DIALOGSETTING_KEY_PORT_HISTORY );
         portCombo = BaseWidgetUtils.createCombo( groupComposite, portHistory, -1, 2 );
         portCombo.setTextLimit( 5 );
         portCombo.setText( "389" ); //$NON-NLS-1$
 
+        // The timeout
+        BaseWidgetUtils.createLabel( groupComposite, Messages.getString( "NetworkParameterPage.Timeout" ), 2 ); //$NON-NLS-1$
+        timeoutText = BaseWidgetUtils.createText( groupComposite, "30", 1 ); //$NON-NLS-1$
+        timeoutText.setTextLimit( 7 );
+
         String[] encMethods = new String[]
-            { Messages.getString( "NetworkParameterPage.NoEncryption" ), //$NON-NLS-1$
+            {
+                Messages.getString( "NetworkParameterPage.NoEncryption" ), //$NON-NLS-1$
                 Messages.getString( "NetworkParameterPage.UseSSLEncryption" ), //$NON-NLS-1$
-                Messages.getString( "NetworkParameterPage.UseStartTLS" ) }; //$NON-NLS-1$
+                Messages.getString( "NetworkParameterPage.UseStartTLS" ) //$NON-NLS-1$
+            };
+
         BaseWidgetUtils.createLabel( groupComposite, Messages.getString( "NetworkParameterPage.EncryptionMethod" ), 1 ); //$NON-NLS-1$
         encryptionMethodCombo = BaseWidgetUtils.createReadonlyCombo( groupComposite, encMethods, 0, 2 );
 
         boolean validateCertificates = ConnectionCorePlugin.getDefault().getPluginPreferences().getBoolean(
             ConnectionCoreConstants.PREFERENCE_VALIDATE_CERTIFICATES );
-        
+
         if ( validateCertificates )
         {
             BaseWidgetUtils.createSpacer( groupComposite, 1 );
@@ -281,16 +342,17 @@ public class NetworkParameterPage extend
         }
 
         String[] networkProviders = new String[]
-        { 
-            "Apache Directory LDAP Client API", 
-            "JNDI (Java Naming and Directory Interface)" 
-        }; //$NON-NLS-1$ //$NON-NLS-2$
-        
+            {
+                "Apache Directory LDAP Client API",
+                "JNDI (Java Naming and Directory Interface)"
+            }; //$NON-NLS-1$ //$NON-NLS-2$
+
         BaseWidgetUtils.createLabel( groupComposite, Messages.getString( "NetworkParameterPage.Provider" ), 1 ); //$NON-NLS-1$
         networkProviderCombo = BaseWidgetUtils.createReadonlyCombo( groupComposite, networkProviders, 0, 2 );
         networkProviderCombo
-            .select( ConnectionCorePlugin.getDefault().getDefaultNetworkProvider() == NetworkProvider.APACHE_DIRECTORY_LDAP_API ? 0
-                : 1 );
+            .select( ConnectionCorePlugin.getDefault()
+                .getDefaultNetworkProvider() == NetworkProvider.APACHE_DIRECTORY_LDAP_API ? 0
+                    : 1 );
 
         BaseWidgetUtils.createSpacer( groupComposite, 2 );
         checkConnectionButton = new Button( groupComposite, SWT.PUSH );
@@ -303,6 +365,7 @@ public class NetworkParameterPage extend
         readOnlyConnectionCheckbox = BaseWidgetUtils.createCheckbox( composite,
             Messages.getString( "NetworkParameterPage.ReadOnly" ), 1 ); //$NON-NLS-1$
 
+        BaseWidgetUtils.createSpacer( composite, 1 );
         nameText.setFocus();
     }
 
@@ -313,34 +376,40 @@ public class NetworkParameterPage extend
     protected void validate()
     {
         // set enabled/disabled state of check connection button
-        checkConnectionButton.setEnabled( !hostCombo.getText().equals( StringUtils.EMPTY ) && 
-                                          !portCombo.getText().equals( StringUtils.EMPTY ) ); //$NON-NLS-1$ //$NON-NLS-2$
+        checkConnectionButton.setEnabled( !hostCombo.getText().equals( StringUtils.EMPTY ) &&
+            !portCombo.getText().equals( StringUtils.EMPTY ) ); //$NON-NLS-1$ //$NON-NLS-2$
 
         // validate input fields
         message = null;
         infoMessage = null;
         errorMessage = null;
-        
+
         if ( Strings.isEmpty( portCombo.getText() ) ) //$NON-NLS-1$
         {
             message = Messages.getString( "NetworkParameterPage.PleaseEnterPort" ); //$NON-NLS-1$
         }
-        
+
         if ( Strings.isEmpty( hostCombo.getText() ) ) //$NON-NLS-1$
         {
             message = Messages.getString( "NetworkParameterPage.PleaseEnterHostname" ); //$NON-NLS-1$
         }
-        
+
         if ( Strings.isEmpty( nameText.getText() ) ) //$NON-NLS-1$
         {
             message = Messages.getString( "NetworkParameterPage.PleaseEnterConnectionName" ); //$NON-NLS-1$
         }
-        
+
+        if ( Strings.isEmpty( timeoutText.getText() ) ) //$NON-NLS-1$
+        {
+            timeoutText.setText( "30" );
+        }
+
         if ( ConnectionCorePlugin.getDefault().getConnectionManager().getConnectionByName( nameText.getText() ) != null
             && ( ( connectionParameter == null ) || !nameText.getText().equals( connectionParameter.getName() ) ) )
         {
             errorMessage = NLS.bind(
-                Messages.getString( "NetworkParameterPage.ConnectionExists" ), new String[] { nameText.getText() } ); //$NON-NLS-1$
+                Messages.getString( "NetworkParameterPage.ConnectionExists" ), new String[] //$NON-NLS-1$
+                { nameText.getText() } );
         }
     }
 
@@ -356,7 +425,7 @@ public class NetworkParameterPage extend
         hostCombo.setText( CommonUIUtils.getTextValue( parameter.getHost() ) );
         portCombo.setText( Integer.toString( parameter.getPort() ) );
         int encryptionMethodIndex = 0;
-        
+
         if ( parameter.getEncryptionMethod() == EncryptionMethod.LDAPS )
         {
             encryptionMethodIndex = 1;
@@ -365,11 +434,13 @@ public class NetworkParameterPage extend
         {
             encryptionMethodIndex = 2;
         }
-        
+
         encryptionMethodCombo.select( encryptionMethodIndex );
         networkProviderCombo.select( parameter.getNetworkProvider() == NetworkProvider.APACHE_DIRECTORY_LDAP_API ? 0
             : 1 );
         readOnlyConnectionCheckbox.setSelection( parameter.isReadOnly() );
+        timeoutText.setText( Long.toString( parameter.getTimeout() / 1000L ) );
+
     }
 
 
@@ -378,58 +449,25 @@ public class NetworkParameterPage extend
      */
     protected void initListeners()
     {
-        nameText.addModifyListener( new ModifyListener()
-        {
-            /**
-             * {@inheritDoc}
-             */
-            public void modifyText( ModifyEvent event )
-            {
-                connectionPageModified();
-            }
-        } );
+        nameText.addModifyListener( event -> connectionPageModified() );
 
-        hostCombo.addModifyListener( new ModifyListener()
-        {
-            /**
-             * {@inheritDoc}
-             */
-            public void modifyText( ModifyEvent event )
-            {
-                connectionPageModified();
-            }
-        } );
+        hostCombo.addModifyListener( event -> connectionPageModified() );
 
-        portCombo.addVerifyListener( new VerifyListener()
-        {
-            /**
-             * {@inheritDoc}
-             */
-            public void verifyText( VerifyEvent event )
-            {
-                if ( !event.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
-                {
-                    event.doit = false;
-                }
-            }
-        } );
-        
-        portCombo.addModifyListener( new ModifyListener()
-        {
-            /**
-             * {@inheritDoc}
-             */
-            public void modifyText( ModifyEvent event )
+        portCombo.addVerifyListener( event -> {
+            if ( !event.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
             {
-                connectionPageModified();
+                event.doit = false;
             }
         } );
 
+        portCombo.addModifyListener( event -> connectionPageModified() );
+
         encryptionMethodCombo.addSelectionListener( new SelectionAdapter()
         {
             /**
              * {@inheritDoc}
              */
+            @Override
             public void widgetSelected( SelectionEvent event )
             {
                 connectionPageModified();
@@ -441,6 +479,7 @@ public class NetworkParameterPage extend
             /**
              * {@inheritDoc}
              */
+            @Override
             public void widgetSelected( SelectionEvent event )
             {
                 connectionPageModified();
@@ -452,17 +491,19 @@ public class NetworkParameterPage extend
             /**
              * {@inheritDoc}
              */
+            @Override
             public void widgetSelected( SelectionEvent event )
             {
                 Connection connection = getTestConnection();
                 CheckNetworkParameterRunnable runnable = new CheckNetworkParameterRunnable( connection );
                 IStatus status = RunnableContextRunner.execute( runnable, runnableContext, true );
-                
+
                 if ( status.isOK() )
                 {
                     MessageDialog.openInformation( Display.getDefault().getActiveShell(), Messages
-                        .getString( "NetworkParameterPage.CheckNetworkParameter" ), Messages //$NON-NLS-1$
-                        .getString( "NetworkParameterPage.ConnectionEstablished" ) ); //$NON-NLS-1$
+                        .getString( "NetworkParameterPage.CheckNetworkParameter" ), //$NON-NLS-1$
+                        Messages
+                            .getString( "NetworkParameterPage.ConnectionEstablished" ) ); //$NON-NLS-1$
                 }
             }
         } );
@@ -472,11 +513,22 @@ public class NetworkParameterPage extend
             /**
              * {@inheritDoc}
              */
+            @Override
             public void widgetSelected( SelectionEvent event )
             {
                 connectionPageModified();
             }
         } );
+
+        // The timeout events
+        timeoutText.addModifyListener( event -> connectionPageModified() );
+
+        timeoutText.addVerifyListener( event -> {
+            if ( !event.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
+            {
+                event.doit = false;
+            }
+        } );
     }
 
 
@@ -491,6 +543,7 @@ public class NetworkParameterPage extend
         parameter.setEncryptionMethod( getEncyrptionMethod() );
         parameter.setNetworkProvider( getNetworkProvider() );
         parameter.setReadOnly( isReadOnly() );
+        parameter.setTimeout( getTimeout() * 1000L );
     }
 
 
@@ -533,7 +586,8 @@ public class NetworkParameterPage extend
             || ( connectionParameter.getPort() != getPort() )
             || ( connectionParameter.getEncryptionMethod() != getEncyrptionMethod() )
             || ( connectionParameter.getNetworkProvider() != getNetworkProvider() )
-            || ( connectionParameter.isReadOnly() != isReadOnly() );
+            || ( connectionParameter.isReadOnly() != isReadOnly() )
+            || ( connectionParameter.getTimeout() != getTimeout() );
     }
 
 
@@ -551,26 +605,24 @@ public class NetworkParameterPage extend
             case NONE:
                 // default
                 break;
-                
+
             case LDAPS:
                 ldapUrl.getExtensions().add( new Extension( false, X_ENCRYPTION, X_ENCRYPTION_LDAPS ) );
                 break;
-                
+
             case START_TLS:
                 ldapUrl.getExtensions().add( new Extension( false, X_ENCRYPTION, X_ENCRYPTION_START_TLS ) );
                 break;
         }
 
-        switch ( parameter.getNetworkProvider() )
+        if ( parameter.getNetworkProvider() == NetworkProvider.JNDI )
         {
-            case JNDI:
-                ldapUrl.getExtensions().add( new Extension( false, X_NETWORK_PROVIDER, X_NETWORK_PROVIDER_JNDI ) );
-                break;
-            
-            case APACHE_DIRECTORY_LDAP_API:
-                ldapUrl.getExtensions().add(
-                    new Extension( false, X_NETWORK_PROVIDER, X_NETWORK_PROVIDER_APACHE_DIRECTORY_LDAP_API ) );
-                break;
+            ldapUrl.getExtensions().add( new Extension( false, X_NETWORK_PROVIDER, X_NETWORK_PROVIDER_JNDI ) );
+        }
+        else
+        {
+            ldapUrl.getExtensions().add(
+                new Extension( false, X_NETWORK_PROVIDER, X_NETWORK_PROVIDER_APACHE_DIRECTORY_LDAP_API ) );
         }
     }
 
@@ -582,12 +634,12 @@ public class NetworkParameterPage extend
     {
         // connection name, current date if absent
         String name = ldapUrl.getExtensionValue( X_CONNECTION_NAME );
-        
+
         if ( StringUtils.isEmpty( name ) )
         {
             name = new SimpleDateFormat( "yyyy-MM-dd HH-mm-ss" ).format( new Date() ); //$NON-NLS-1$
         }
-        
+
         parameter.setName( name );
 
         // host
@@ -598,7 +650,7 @@ public class NetworkParameterPage extend
 
         // encryption method, none if unknown or absent 
         String encryption = ldapUrl.getExtensionValue( X_ENCRYPTION );
-        
+
         if ( StringUtils.isNotEmpty( encryption ) && X_ENCRYPTION_LDAPS.equalsIgnoreCase( encryption ) )
         {
             parameter.setEncryptionMethod( ConnectionParameter.EncryptionMethod.LDAPS );
@@ -614,7 +666,7 @@ public class NetworkParameterPage extend
 
         // encryption method, none if unknown or absent 
         String networkProvider = ldapUrl.getExtensionValue( X_NETWORK_PROVIDER );
-        
+
         if ( StringUtils.isNotEmpty( networkProvider )
             && X_NETWORK_PROVIDER_APACHE_DIRECTORY_LDAP_API.equalsIgnoreCase( networkProvider ) )
         {

Modified: directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages.properties?rev=1805443&r1=1805442&r2=1805443&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages.properties (original)
+++ directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages.properties Fri Aug 18 16:24:32 2017
@@ -20,6 +20,7 @@ AuthenticationParameterPage.AnonymousAut
 AuthenticationParameterPage.AuthenticationMethod      = Authentication Method
 AuthenticationParameterPage.AuthenticationParameter   = Authentication Parameter
 AuthenticationParameterPage.AuthenticationSuccessfull = The authentication was successful.
+AuthenticationParameterPage.Authzid                   = Authorization ID (SASL):
 AuthenticationParameterPage.BindDNOrUser              = Bind DN or user:
 AuthenticationParameterPage.BindPassword              = Bind password:
 AuthenticationParameterPage.CheckAuthentication       = Check Authentication
@@ -33,34 +34,34 @@ AuthenticationParameterPage.SaslRealm
 AuthenticationParameterPage.SavePassword              = Save password
 AuthenticationParameterPage.SimpleAuthentication      = Simple Authentication
 
-AuthenticationParameterPage.SaslOptions=SASL Settings
-AuthenticationParameterPage.SaslQop=Quality of Protection:
-AuthenticationParameterPage.SaslQopAuth=Authentication only
-AuthenticationParameterPage.SaslQopAuthInt=Authentication with integrity protection
-AuthenticationParameterPage.SaslQopAuthIntPriv=Authentication with integrity and privacy protection 
-AuthenticationParameterPage.SaslSecurityStrength=Protection Strength:
-AuthenticationParameterPage.SaslSecurityStrengthLow=Low
-AuthenticationParameterPage.SaslSecurityStrengthMedium=Medium
-AuthenticationParameterPage.SaslSecurityStrengthHigh=High
-AuthenticationParameterPage.SaslMutualAuthentication=Mutual Authentication
+AuthenticationParameterPage.SaslOptions                = SASL Settings
+AuthenticationParameterPage.SaslQop                    = Quality of Protection:
+AuthenticationParameterPage.SaslQopAuth                = Authentication only
+AuthenticationParameterPage.SaslQopAuthInt             = Authentication with integrity protection
+AuthenticationParameterPage.SaslQopAuthIntPriv         = Authentication with integrity and privacy protection 
+AuthenticationParameterPage.SaslSecurityStrength       = Protection Strength:
+AuthenticationParameterPage.SaslSecurityStrengthLow    = Low
+AuthenticationParameterPage.SaslSecurityStrengthMedium = Medium
+AuthenticationParameterPage.SaslSecurityStrengthHigh   = High
+AuthenticationParameterPage.SaslMutualAuthentication   = Mutual Authentication
 
-AuthenticationParameterPage.Krb5Options=Kerberos Settings
-AuthenticationParameterPage.Krb5Config=Kerberos Configuration
-AuthenticationParameterPage.Krb5ConfigDefault=Use native system configuration
-AuthenticationParameterPage.Krb5ConfigFile=Use configuration file:
-AuthenticationParameterPage.Krb5ConfigManual=Use following configuration:
-AuthenticationParameterPage.Krb5KdcHost=KDC Host:
-AuthenticationParameterPage.Krb5KdcPort=KDC Port:
-AuthenticationParameterPage.Krb5Realm=Kerberos Realm:
-AuthenticationParameterPage.Krb5CredentialConf=Kerberos Credential Configuration
-AuthenticationParameterPage.Krb5CredentialConfUseNative=Use native TGT
-AuthenticationParameterPage.Krb5CredentialConfUseNativeTooltip=The native credentials cache is used. On Windows systems a key must be added to the registry!
-AuthenticationParameterPage.Krb5CredentialConfObtainTgt=Obtain TGT from KDC (provide username and password)
-AuthenticationParameterPage.Krb5CredentialConfObtainTgtTooltip=A new TGT is obtained from KDC, therefore you need to specify your Kerberos principal and password.
-AuthenticationParameterPage.PleaseEnterKrb5ConfigFile = Please enter the path to Kerberos configuration file (krb5.conf)
-AuthenticationParameterPage.PleaseEnterKrb5Port=Please enter the KDC Port
-AuthenticationParameterPage.PleaseEnterKrb5Host=Please enter the KDC Hostname
-AuthenticationParameterPage.PleaseEnterKrb5Realm=Please enter the Kerberos Realm (Domain)
+AuthenticationParameterPage.Krb5Options                        = Kerberos Settings
+AuthenticationParameterPage.Krb5Config                         = Kerberos Configuration
+AuthenticationParameterPage.Krb5ConfigDefault                  = Use native system configuration
+AuthenticationParameterPage.Krb5ConfigFile                     = Use configuration file:
+AuthenticationParameterPage.Krb5ConfigManual                   = Use following configuration:
+AuthenticationParameterPage.Krb5KdcHost                        = KDC Host:
+AuthenticationParameterPage.Krb5KdcPort                        = KDC Port:
+AuthenticationParameterPage.Krb5Realm                          = Kerberos Realm:
+AuthenticationParameterPage.Krb5CredentialConf                 = Kerberos Credential Configuration
+AuthenticationParameterPage.Krb5CredentialConfUseNative        = Use native TGT
+AuthenticationParameterPage.Krb5CredentialConfUseNativeTooltip = The native credentials cache is used. On Windows systems a key must be added to the registry!
+AuthenticationParameterPage.Krb5CredentialConfObtainTgt        = Obtain TGT from KDC (provide username and password)
+AuthenticationParameterPage.Krb5CredentialConfObtainTgtTooltip = A new TGT is obtained from KDC, therefore you need to specify your Kerberos principal and password.
+AuthenticationParameterPage.PleaseEnterKrb5ConfigFile          = Please enter the path to Kerberos configuration file (krb5.conf)
+AuthenticationParameterPage.PleaseEnterKrb5Port                = Please enter the KDC Port
+AuthenticationParameterPage.PleaseEnterKrb5Host                = Please enter the KDC Hostname
+AuthenticationParameterPage.PleaseEnterKrb5Realm               = Please enter the Kerberos Realm (Domain)
 
 CertificateInfoComposite.Certificate               = Certificate
 CertificateInfoComposite.CertificateFieldsLabel    = Certificate Fields
@@ -100,14 +101,14 @@ CertificateInfoComposite.Validity
 CertificateInfoComposite.ValidityLabel             = Validity
 CertificateInfoComposite.Version                   = Version
 
-CertificateListComposite.AddButton    			= Add...
-CertificateListComposite.RemoveButton 			= Remove
-CertificateListComposite.ViewButton   			= View...
-CertificateListComposite.UntitledCertificate	= <Untitled>
-CertificateListComposite.LoadCertificate        = Load Certificate
-CertificateListComposite.ErrorDialogTitle       = Error
-CertificateListComposite.ErrorDialogMessage     = An error occurred while adding the certificate: {0}
-CertificateListComposite.ExportButton 			= Export...
+CertificateListComposite.AddButton           = Add...
+CertificateListComposite.RemoveButton        = Remove
+CertificateListComposite.ViewButton          = View...
+CertificateListComposite.UntitledCertificate = <Untitled>
+CertificateListComposite.LoadCertificate     = Load Certificate
+CertificateListComposite.ErrorDialogTitle    = Error
+CertificateListComposite.ErrorDialogMessage  = An error occurred while adding the certificate: {0}
+CertificateListComposite.ExportButton        = Export...
 
 NetworkParameterPage.CheckNetworkParameter        = Check Network Parameter
 NetworkParameterPage.ConnectionEstablished        = The connection was established successfully.
@@ -127,3 +128,4 @@ NetworkParameterPage.UseSSLEncryption
 NetworkParameterPage.UseStartTLS                  = Use StartTLS extension
 NetworkParameterPage.WarningCertificateValidation = Warning: Certificate validation is disabled, \nbe aware of invalid certificates or man-in-the-middle attacks!
 NetworkParameterPage.CertificateValidationLink    = Server certificates for LDAP connections can be managed in the '<a>Certificate Validation</a>' preference page.
+NetworkParameterPage.Timeout                      = Connection timeout (s):

Modified: directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_de.properties?rev=1805443&r1=1805442&r2=1805443&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_de.properties (original)
+++ directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_de.properties Fri Aug 18 16:24:32 2017
@@ -20,6 +20,7 @@ AuthenticationParameterPage.AnonymousAut
 AuthenticationParameterPage.AuthenticationMethod      = Authentifizierungs-Methode
 AuthenticationParameterPage.AuthenticationParameter   = Authentifizierungs-Parameter
 AuthenticationParameterPage.AuthenticationSuccessfull = Die Authentifizierung war erfolgreich.
+AuthenticationParameterPage.Authzid                   = Authentifizierung ID (SASL):
 AuthenticationParameterPage.BindDNOrUser              = Bind DN oder Benutzer:
 AuthenticationParameterPage.BindPassword              = Bind Passwort:
 AuthenticationParameterPage.CheckAuthentication       = Authentifizierung \u00FCberpr\u00FCfen
@@ -32,34 +33,34 @@ AuthenticationParameterPage.SavePassword
 AuthenticationParameterPage.SimpleAuthentication      = Einfache Authentifizierung
 
 
-AuthenticationParameterPage.SaslOptions=SASL Einstellungen
-AuthenticationParameterPage.SaslQop=Datenschutz (Quality of Protection):
-AuthenticationParameterPage.SaslQopAuth=Nur Authentifizierung
-AuthenticationParameterPage.SaslQopAuthInt=Authentifizierung plus Integrit\u00E4tssicherung
-AuthenticationParameterPage.SaslQopAuthIntPriv=Authentifizierung plus Integrit\u00E4tssicherung und Verschl\u00FCsselung
-AuthenticationParameterPage.SaslSecurityStrength=Schutzst\u00E4rke (Protection Strength):
-AuthenticationParameterPage.SaslSecurityStrengthLow=Niedrig
-AuthenticationParameterPage.SaslSecurityStrengthMedium=Mittel
-AuthenticationParameterPage.SaslSecurityStrengthHigh=Hoch
-AuthenticationParameterPage.SaslMutualAuthentication=Gegenseitige Authentifizierung
-
-AuthenticationParameterPage.Krb5Options=Kerberos Einstellungen
-AuthenticationParameterPage.Krb5Config=Kerberos Konfiguration
-AuthenticationParameterPage.Krb5ConfigDefault=Benutze native System Konfiguration
-AuthenticationParameterPage.Krb5ConfigFile=Benutze folgende Konfigurationsdatei:
-AuthenticationParameterPage.Krb5ConfigManual=Benutze folgende Einstellungen:
-AuthenticationParameterPage.Krb5KdcHost=KDC Host:
-AuthenticationParameterPage.Krb5KdcPort=KDC Port:
-AuthenticationParameterPage.Krb5Realm=Kerberos Realm:
-AuthenticationParameterPage.Krb5CredentialConf=Kerberos Ticket Einstellungen
-AuthenticationParameterPage.Krb5CredentialConfUseNative=Benutze natives TGT
-AuthenticationParameterPage.Krb5CredentialConfUseNativeTooltip=Der native Ticket Cache wird benutzt. Auf Windows System muss hierf\u00FCr die Registry angepasst werden!
-AuthenticationParameterPage.Krb5CredentialConfObtainTgt=TGT vom KDC anfordern (Benutzername und Passwort eingeben)
-AuthenticationParameterPage.Krb5CredentialConfObtainTgtTooltip=Ein neues TGT wird vom KDC angefordert, hierf\u00FCr muss der Kerberos Benutzer und das Passwort angegeben werden)
-AuthenticationParameterPage.PleaseEnterKrb5ConfigFile=Bitte Pfad zur Kerberos Konfigurationsdatei angeben (krb5.conf).
-AuthenticationParameterPage.PleaseEnterKrb5Port=Bitte KDC Port eingeben.
-AuthenticationParameterPage.PleaseEnterKrb5Host=Bitte KDC Hostname eingeben.
-AuthenticationParameterPage.PleaseEnterKrb5Realm=Bitte die Kerberos Realm (Dom\u00E4ne) eingeben.
+AuthenticationParameterPage.SaslOptions                = SASL Einstellungen
+AuthenticationParameterPage.SaslQop                    = Datenschutz (Quality of Protection):
+AuthenticationParameterPage.SaslQopAuth                = Nur Authentifizierung
+AuthenticationParameterPage.SaslQopAuthInt             = Authentifizierung plus Integrit\u00E4tssicherung
+AuthenticationParameterPage.SaslQopAuthIntPriv         = Authentifizierung plus Integrit\u00E4tssicherung und Verschl\u00FCsselung
+AuthenticationParameterPage.SaslSecurityStrength       = Schutzst\u00E4rke (Protection Strength):
+AuthenticationParameterPage.SaslSecurityStrengthLow    = Niedrig
+AuthenticationParameterPage.SaslSecurityStrengthMedium = Mittel
+AuthenticationParameterPage.SaslSecurityStrengthHigh   = Hoch
+AuthenticationParameterPage.SaslMutualAuthentication   = Gegenseitige Authentifizierung
+
+AuthenticationParameterPage.Krb5Options                        = Kerberos Einstellungen
+AuthenticationParameterPage.Krb5Config                         = Kerberos Konfiguration
+AuthenticationParameterPage.Krb5ConfigDefault                  = Benutze native System Konfiguration
+AuthenticationParameterPage.Krb5ConfigFile                     = Benutze folgende Konfigurationsdatei:
+AuthenticationParameterPage.Krb5ConfigManual                   = Benutze folgende Einstellungen:
+AuthenticationParameterPage.Krb5KdcHost                        = KDC Host:
+AuthenticationParameterPage.Krb5KdcPort                        = KDC Port:
+AuthenticationParameterPage.Krb5Realm                          = Kerberos Realm:
+AuthenticationParameterPage.Krb5CredentialConf                 = Kerberos Ticket Einstellungen
+AuthenticationParameterPage.Krb5CredentialConfUseNative        = Benutze natives TGT
+AuthenticationParameterPage.Krb5CredentialConfUseNativeTooltip = Der native Ticket Cache wird benutzt. Auf Windows System muss hierf\u00FCr die Registry angepasst werden!
+AuthenticationParameterPage.Krb5CredentialConfObtainTgt        = TGT vom KDC anfordern (Benutzername und Passwort eingeben)
+AuthenticationParameterPage.Krb5CredentialConfObtainTgtTooltip = Ein neues TGT wird vom KDC angefordert, hierf\u00FCr muss der Kerberos Benutzer und das Passwort angegeben werden)
+AuthenticationParameterPage.PleaseEnterKrb5ConfigFile          = Bitte Pfad zur Kerberos Konfigurationsdatei angeben (krb5.conf).
+AuthenticationParameterPage.PleaseEnterKrb5Port                = Bitte KDC Port eingeben.
+AuthenticationParameterPage.PleaseEnterKrb5Host                = Bitte KDC Hostname eingeben.
+AuthenticationParameterPage.PleaseEnterKrb5Realm               = Bitte die Kerberos Realm (Dom\u00E4ne) eingeben.
 
 CertificateInfoComposite.Certificate               = Zertifikat
 CertificateInfoComposite.CertificateFieldsLabel    = Zertifikatsfelder
@@ -99,14 +100,14 @@ CertificateInfoComposite.Validity
 CertificateInfoComposite.ValidityLabel             = G\u00FCltigkeit
 CertificateInfoComposite.Version                   = Version
 
-CertificateListComposite.AddButton    			= Hinzuf\u00FCgen...
-CertificateListComposite.RemoveButton 			= Entfernen
-CertificateListComposite.ViewButton   			= Anzeigen...
-CertificateListComposite.UntitledCertificate	= <Unbetitelt>
-CertificateInfoComposite.LoadCertificate        = Zertifikat laden
-CertificateInfoComposite.ErrorDialogTitle       = Fehler
-CertificateInfoComposite.ErrorDialogMessage     = Ein Fehler ist beim Hinzuf\u00FCgen des Zertifikates aufgetregen: {0}
-CertificateListComposite.ExportButton 			= Exportieren...
+CertificateListComposite.AddButton           = Hinzuf\u00FCgen...
+CertificateListComposite.RemoveButton        = Entfernen
+CertificateListComposite.ViewButton          = Anzeigen...
+CertificateListComposite.UntitledCertificate = <Unbetitelt>
+CertificateInfoComposite.LoadCertificate     = Zertifikat laden
+CertificateInfoComposite.ErrorDialogTitle    = Fehler
+CertificateInfoComposite.ErrorDialogMessage  = Ein Fehler ist beim Hinzuf\u00FCgen des Zertifikates aufgetregen: {0}
+CertificateListComposite.ExportButton        = Exportieren...
 
 NetworkParameterPage.CheckNetworkParameter        = Netzwerkparameter \u00FCberpr\u00FCfen
 NetworkParameterPage.ConnectionEstablished        = Die Verbindung wurde erfolgreich aufgebaut.
@@ -123,3 +124,4 @@ NetworkParameterPage.UseSSLEncryption
 NetworkParameterPage.UseStartTLS                  = StartTLS Erweiterung
 NetworkParameterPage.WarningCertificateValidation = Warnung: Zertifikat Validierung ist deaktiviert,\nsind Sie sich der Gefahr von ung\u00FCltigen Zertifikaten\noder 'man-in-the-middle' Angriffen bewusst!
 NetworkParameterPage.CertificateValidationLink    = Server-Zertifikate f\u00FCr LDAP-Verbindungen k\u00F6nnen in der '<a>Zertifikatsvalidierung</a>' Pr\u00E4ferenz Seite verwaltet werden.
+NetworkParameterPage.Timeout                      = Abfallzeit (s) :

Modified: directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_fr.properties?rev=1805443&r1=1805442&r2=1805443&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_fr.properties (original)
+++ directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/messages_fr.properties Fri Aug 18 16:24:32 2017
@@ -20,6 +20,7 @@ AuthenticationParameterPage.AnonymousAut
 AuthenticationParameterPage.AuthenticationMethod      = M\u00E9thode d''authentification
 AuthenticationParameterPage.AuthenticationParameter   = Param\u00E8tres d''authentification
 AuthenticationParameterPage.AuthenticationSuccessfull = L''authentification a r\u00E9ussie
+AuthenticationParameterPage.Authzid                   = Identifiant d'authorisation (SASL):
 AuthenticationParameterPage.BindDNOrUser              = Bind DN ou nom d''utilisateur (SASL):
 AuthenticationParameterPage.BindPassword              = Mot de passe:
 AuthenticationParameterPage.CheckAuthentication       = V\u00E9rifier l''authentification
@@ -98,14 +99,14 @@ CertificateInfoComposite.Validity
 CertificateInfoComposite.ValidityLabel             = Validit\u00E9
 CertificateInfoComposite.Version                   = Version
 
-CertificateListComposite.AddButton    			= Ajouter...
-CertificateListComposite.RemoveButton 			= Supprimer
-CertificateListComposite.ViewButton   			= Afficher...
+CertificateListComposite.AddButton           = Ajouter...
+CertificateListComposite.RemoveButton        = Supprimer
+CertificateListComposite.ViewButton          = Afficher...
 CertificateListComposite.UntitledCertificate	= <Sans titre>
-CertificateListComposite.LoadCertificate        = Charger un certificat
-CertificateListComposite.ErrorDialogTitle       = Erreur
-CertificateListComposite.ErrorDialogMessage     = Une erreur est survenue lors de l''ajout du certificat : {0}
-CertificateListComposite.ExportButton 			= Exporter...
+CertificateListComposite.LoadCertificate     = Charger un certificat
+CertificateListComposite.ErrorDialogTitle    = Erreur
+CertificateListComposite.ErrorDialogMessage  = Une erreur est survenue lors de l''ajout du certificat : {0}
+CertificateListComposite.ExportButton        = Exporter...
 
 NetworkParameterPage.CheckNetworkParameter        = V\u00E9rifier les param\u00E8tres r\u00E9seau
 NetworkParameterPage.ConnectionEstablished        = La connexion a \u00E9t\u00E9 \u00E9tablie avec succ\u00E8s
@@ -124,3 +125,4 @@ NetworkParameterPage.UseSSLEncryption
 NetworkParameterPage.UseStartTLS                  = Utilise l''extension StartTLS
 NetworkParameterPage.WarningCertificateValidation = Attention : La validation des certificats est d\u00E9sactiv\u00E9e, \nm\u00E9fiez-vous des certificats invalides ou des attaques par interposition (man-in-the-middle)\!
 NetworkParameterPage.CertificateValidationLink    = Les certificats serveur pour les connexions LDAP sont administrables dans la page de pr\u00E9f\u00E9rence '<a>Validation de certificat</a>'.
+NetworkParameterPage.Timeout                      = Expiration de la connection (s):

Modified: directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/ExportCertificateWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/ExportCertificateWizard.java?rev=1805443&r1=1805442&r2=1805443&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/ExportCertificateWizard.java (original)
+++ directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/ExportCertificateWizard.java Fri Aug 18 16:24:32 2017
@@ -79,6 +79,7 @@ public class ExportCertificateWizard ext
     /**
      * {@inheritDoc}
      */
+    @Override
     public void addPages()
     {
         page = new ExportCertificateWizardPage();
@@ -148,14 +149,17 @@ public class ExportCertificateWizard ext
         File exportFile = page.getExportFile();
 
         // Exporting the certificate
-        FileOutputStream fos = new FileOutputStream( exportFile );
-        OutputStreamWriter osw = new OutputStreamWriter( fos, Charset.forName( "UTF-8" ) ); //$NON-NLS-1$
-        osw.write( "-----BEGIN CERTIFICATE-----\n" ); //$NON-NLS-1$
-        osw.write( stripLineToNChars( new String( Base64.encodeBase64( certificate.getEncoded() ),
-            Charset.forName( "UTF-8" ) ), 64 ) ); //$NON-NLS-1$
-        osw.write( "\n-----END CERTIFICATE-----\n" ); //$NON-NLS-1$
-        osw.flush();
-        fos.close();
+        try ( FileOutputStream fos = new FileOutputStream( exportFile ) )
+        {
+            try ( OutputStreamWriter osw = new OutputStreamWriter( fos, Charset.forName( "UTF-8" ) ) ) //$NON-NLS-1$
+            {
+                osw.write( "-----BEGIN CERTIFICATE-----\n" ); //$NON-NLS-1$
+                osw.write( stripLineToNChars( new String( Base64.encodeBase64( certificate.getEncoded() ),
+                    Charset.forName( "UTF-8" ) ), 64 ) ); //$NON-NLS-1$
+                osw.write( "\n-----END CERTIFICATE-----\n" ); //$NON-NLS-1$
+                osw.flush();
+            }
+        }
 
         return true;
     }

Modified: directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/ExportCertificateWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/ExportCertificateWizardPage.java?rev=1805443&r1=1805442&r2=1805443&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/ExportCertificateWizardPage.java (original)
+++ directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/ExportCertificateWizardPage.java Fri Aug 18 16:24:32 2017
@@ -36,8 +36,6 @@ import org.eclipse.jface.viewers.LabelPr
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.layout.GridData;
@@ -102,16 +100,7 @@ public class ExportCertificateWizardPage
         // Creating the file's text widget
         fileText = BaseWidgetUtils.createText( fileComposite, StringUtils.EMPTY, 1 ); //$NON-NLS-1$
         fileText.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
-        fileText.addModifyListener( new ModifyListener()
-        {
-            /**
-             * {@InheritDoc}
-             */
-            public void modifyText( ModifyEvent event )
-            {
-                validate();
-            }
-        } );
+        fileText.addModifyListener( event -> validate() );
 
         // Creating the file's 'Browse' button widget
         Button browseButton = BaseWidgetUtils.createButton( fileComposite,
@@ -121,6 +110,7 @@ public class ExportCertificateWizardPage
             /**
              * {@inheritDoc}
              */
+            @Override
             public void widgetSelected( SelectionEvent event )
             {
                 chooseExportFile();
@@ -136,6 +126,7 @@ public class ExportCertificateWizardPage
             /**
              * {@InheritDoc}
              */
+            @Override
             public void widgetSelected( SelectionEvent event )
             {
                 validate();
@@ -155,6 +146,7 @@ public class ExportCertificateWizardPage
             /**
              * {@InheritDoc}
              */
+            @Override
             public String getText( Object element )
             {
                 if ( element instanceof CertificateExportFormat )

Modified: directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/utils/ActionUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/utils/ActionUtils.java?rev=1805443&r1=1805442&r2=1805443&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/utils/ActionUtils.java (original)
+++ directory/studio/branches/studio-value/plugins/connection.ui/src/main/java/org/apache/directory/studio/utils/ActionUtils.java Fri Aug 18 16:24:32 2017
@@ -52,7 +52,7 @@ public final class ActionUtils
      */
     public static void deactivateActionHandler( IAction action )
     {
-        ICommandService commandService = ( ICommandService ) PlatformUI.getWorkbench().getAdapter(
+        ICommandService commandService = PlatformUI.getWorkbench().getAdapter(
             ICommandService.class );
         
         if ( commandService != null )
@@ -64,7 +64,7 @@ public final class ActionUtils
             {
                 ActionHandler actionHandler = ( ActionHandler ) handler;
                 
-                if ( ( actionHandler != null ) && ( actionHandler.getAction() == action ) )
+                if ( actionHandler.getAction() == action )
                 {
                     command.setHandler( null );
                 }
@@ -84,7 +84,7 @@ public final class ActionUtils
      */
     public static void activateActionHandler( IAction action )
     {
-        ICommandService commandService = ( ICommandService ) PlatformUI.getWorkbench().getAdapter(
+        ICommandService commandService = PlatformUI.getWorkbench().getAdapter(
             ICommandService.class );
         
         if ( commandService != null )



Mime
View raw message