Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A0A5017A7B for ; Thu, 4 Jun 2015 14:50:55 +0000 (UTC) Received: (qmail 46003 invoked by uid 500); 4 Jun 2015 14:50:55 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 45963 invoked by uid 500); 4 Jun 2015 14:50:55 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 45954 invoked by uid 99); 4 Jun 2015 14:50:55 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jun 2015 14:50:55 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 6C70CAC026E for ; Thu, 4 Jun 2015 14:50:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1683565 - in /directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor: dialogs/ pages/ Date: Thu, 04 Jun 2015 14:50:55 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150604145055.6C70CAC026E@hades.apache.org> Author: elecharny Date: Thu Jun 4 14:50:54 2015 New Revision: 1683565 URL: http://svn.apache.org/r1683565 Log: o Added the missing dialog initialization for the SizeLimit o Many fixes in the SizeLimitDialog, to correctly handle the prtotal Hard checkbox and the unchecked checkbox o Added a createSectionComposite method in the OpenLDAPServerConfigurationEditorPage class, and reused it in the various pages o Fixed the Tuning Page Text box that were expanding too much Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AbstractLimitDialog.java directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/SizeLimitDialog.java directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/TimeLimitDialog.java directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OpenLDAPServerConfigurationEditorPage.java directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OptionsPage.java directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/TuningPage.java Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AbstractLimitDialog.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AbstractLimitDialog.java?rev=1683565&r1=1683564&r2=1683565&view=diff ============================================================================== --- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AbstractLimitDialog.java (original) +++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/AbstractLimitDialog.java Thu Jun 4 14:50:54 2015 @@ -21,6 +21,7 @@ package org.apache.directory.studio.open import org.apache.directory.api.util.Strings; import org.apache.directory.studio.openldap.config.editor.wrappers.AbstractLimitWrapper; +import org.apache.directory.studio.openldap.config.editor.wrappers.SizeLimitWrapper; import org.apache.directory.studio.openldap.config.editor.wrappers.TimeLimitWrapper; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IDialogConstants; @@ -580,4 +581,82 @@ public abstract class AbstractLimitDialo { return newLimitStr; } + + + /** + * Initializes the UI from the Limit + */ + protected void initFromLimit() + { + if ( limitWrapper != null ) + { + // The SoftLimit + Integer softLimit = limitWrapper.getSoftLimit(); + + if ( softLimit == null ) + { + softLimitText.setText( "" ); + softUnlimitedCheckbox.setSelection( false ); + } + else if ( softLimit.equals( SizeLimitWrapper.UNLIMITED ) ) + { + softLimitText.setText( SizeLimitWrapper.UNLIMITED_STR ); + softUnlimitedCheckbox.setSelection( true ); + } + else + { + softLimitText.setText( softLimit.toString() ); + softUnlimitedCheckbox.setSelection( false ); + } + + // The HardLimit + Integer hardLimit = limitWrapper.getHardLimit(); + + if ( hardLimit == null ) + { + hardLimitText.setText( "" ); + hardUnlimitedCheckbox.setSelection( false ); + hardSoftCheckbox.setSelection( false ); + } + else if ( hardLimit.equals( SizeLimitWrapper.UNLIMITED ) ) + { + hardLimitText.setText( SizeLimitWrapper.UNLIMITED_STR ); + hardUnlimitedCheckbox.setSelection( true ); + hardSoftCheckbox.setSelection( false ); + } + else if ( hardLimit.equals( SizeLimitWrapper.HARD_SOFT ) ) + { + hardLimitText.setText( SizeLimitWrapper.SOFT_STR ); + hardUnlimitedCheckbox.setSelection( false ); + hardSoftCheckbox.setSelection( true ); + } + else + { + hardLimitText.setText( hardLimit.toString() ); + hardUnlimitedCheckbox.setSelection( false ); + hardSoftCheckbox.setSelection( false ); + } + + // The GlobalLimit + Integer globalLimit = limitWrapper.getGlobalLimit(); + + if ( globalLimit == null ) + { + globalLimitText.setText( "" ); + globalUnlimitedCheckbox.setSelection( false ); + } + else if ( globalLimit.equals( SizeLimitWrapper.UNLIMITED ) ) + { + globalLimitText.setText( SizeLimitWrapper.UNLIMITED_STR ); + globalUnlimitedCheckbox.setSelection( true ); + } + else + { + globalLimitText.setText( globalLimit.toString() ); + globalUnlimitedCheckbox.setSelection( false ); + } + + limitText.setText( limitWrapper.toString() ); + } + } } Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/SizeLimitDialog.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/SizeLimitDialog.java?rev=1683565&r1=1683564&r2=1683565&view=diff ============================================================================== --- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/SizeLimitDialog.java (original) +++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/SizeLimitDialog.java Thu Jun 4 14:50:54 2015 @@ -158,7 +158,8 @@ public class SizeLimitDialog extends Abs if ( !Strings.isEmpty( uncheckedlLimitStr ) ) { if ( !SizeLimitWrapper.UNLIMITED_STR.equalsIgnoreCase( uncheckedlLimitStr ) && - !SizeLimitWrapper.NONE_STR.equals( uncheckedlLimitStr ) ) + !SizeLimitWrapper.NONE_STR.equalsIgnoreCase( uncheckedlLimitStr ) && + !SizeLimitWrapper.DISABLED_STR.equalsIgnoreCase( uncheckedlLimitStr ) ) { try { @@ -188,7 +189,7 @@ public class SizeLimitDialog extends Abs if ( !Strings.isEmpty( prLimitStr ) ) { if ( !SizeLimitWrapper.UNLIMITED_STR.equalsIgnoreCase( prLimitStr ) && - !SizeLimitWrapper.NONE_STR.equals( prLimitStr ) ) + !SizeLimitWrapper.NONE_STR.equalsIgnoreCase( prLimitStr ) ) { try { @@ -218,8 +219,9 @@ public class SizeLimitDialog extends Abs if ( !Strings.isEmpty( prTotalLimitStr ) ) { if ( !SizeLimitWrapper.UNLIMITED_STR.equalsIgnoreCase( prTotalLimitStr ) && - !SizeLimitWrapper.NONE_STR.equals( prTotalLimitStr ) && - !SizeLimitWrapper.DISABLED_STR.equals( prTotalLimitStr ) ) + !SizeLimitWrapper.NONE_STR.equalsIgnoreCase( prTotalLimitStr ) && + !SizeLimitWrapper.HARD_STR.equalsIgnoreCase( prTotalLimitStr ) && + !SizeLimitWrapper.DISABLED_STR.equalsIgnoreCase( prTotalLimitStr ) ) { try { @@ -665,10 +667,10 @@ public class SizeLimitDialog extends Abs } else { - prTotalLimitText.setText( hardStr ); + prTotalLimitText.setText( SizeLimitWrapper.HARD_STR ); } - ((SizeLimitWrapper)limitWrapper).setPrTotalLimit( limitWrapper.getHardLimit() ); + ((SizeLimitWrapper)limitWrapper).setPrTotalLimit( SizeLimitWrapper.PR_HARD ); } else { @@ -688,7 +690,7 @@ public class SizeLimitDialog extends Abs } prTotalUnlimitedCheckbox.setSelection( false ); - prTotalHardCheckbox.setSelection( false ); + prTotalDisabledCheckbox.setSelection( false ); limitText.setText( limitWrapper.toString() ); } }; @@ -741,7 +743,7 @@ public class SizeLimitDialog extends Abs createSizeLimitEditGroup( composite ); createSizeLimitShowGroup( composite ); - initFromSizeLimit(); + initFromLimit(); applyDialogFont( composite ); @@ -905,79 +907,105 @@ public class SizeLimitDialog extends Abs /** - * Initializes the UI from the SizeLimit + * Initializes the UI from the Limit */ - private void initFromSizeLimit() + protected void initFromLimit() { + super.initFromLimit(); + + // Deal with specific SizeLimit fields if ( limitWrapper != null ) { - // The SoftLimit - Integer softLimit = limitWrapper.getSoftLimit(); + SizeLimitWrapper sizeLimitWrapper = (SizeLimitWrapper)limitWrapper; - if ( softLimit == null ) + // The UncheckedLimit + Integer uncheckedLimit = sizeLimitWrapper.getUncheckedLimit(); + + if ( uncheckedLimit == null ) { - softLimitText.setText( "" ); - softUnlimitedCheckbox.setSelection( false ); + uncheckedLimitText.setText( "" ); + uncheckedUnlimitedCheckbox.setSelection( false ); + uncheckedDisabledCheckbox.setSelection( false ); } - else if ( softLimit.equals( SizeLimitWrapper.UNLIMITED ) ) + else if ( uncheckedLimit.equals( SizeLimitWrapper.UNLIMITED ) ) { - softLimitText.setText( SizeLimitWrapper.UNLIMITED_STR ); - softUnlimitedCheckbox.setSelection( true ); + uncheckedLimitText.setText( SizeLimitWrapper.UNLIMITED_STR ); + uncheckedUnlimitedCheckbox.setSelection( true ); + uncheckedDisabledCheckbox.setSelection( false ); + } + else if ( uncheckedLimit.equals( SizeLimitWrapper.UC_DISABLED ) ) + { + uncheckedLimitText.setText( SizeLimitWrapper.DISABLED_STR ); + uncheckedUnlimitedCheckbox.setSelection( false ); + uncheckedDisabledCheckbox.setSelection( true ); } else { - softLimitText.setText( softLimit.toString() ); - softUnlimitedCheckbox.setSelection( false ); + uncheckedLimitText.setText( uncheckedLimit.toString() ); + uncheckedUnlimitedCheckbox.setSelection( false ); + uncheckedDisabledCheckbox.setSelection( false ); } - // The HardLimit - Integer hardLimit = limitWrapper.getHardLimit(); + // The pr Limit + Integer prLimit = sizeLimitWrapper.getPrLimit(); - if ( hardLimit == null ) - { - hardLimitText.setText( "" ); - hardUnlimitedCheckbox.setSelection( false ); - hardSoftCheckbox.setSelection( false ); - } - else if ( hardLimit.equals( SizeLimitWrapper.UNLIMITED ) ) + if ( prLimit == null ) { - hardLimitText.setText( SizeLimitWrapper.UNLIMITED_STR ); - hardUnlimitedCheckbox.setSelection( true ); - hardSoftCheckbox.setSelection( false ); + prLimitText.setText( "" ); + prUnlimitedCheckbox.setSelection( false ); } - else if ( hardLimit.equals( SizeLimitWrapper.HARD_SOFT ) ) + else if ( prLimit.equals( SizeLimitWrapper.UNLIMITED ) ) { - hardLimitText.setText( SizeLimitWrapper.SOFT_STR ); - hardUnlimitedCheckbox.setSelection( false ); - hardSoftCheckbox.setSelection( true ); + prLimitText.setText( SizeLimitWrapper.UNLIMITED_STR ); + prUnlimitedCheckbox.setSelection( true ); } else { - hardLimitText.setText( hardLimit.toString() ); - hardUnlimitedCheckbox.setSelection( false ); - hardSoftCheckbox.setSelection( false ); + prLimitText.setText( prLimit.toString() ); + prUnlimitedCheckbox.setSelection( false ); } + + // The NoEstimate flag + prNoEstimateCheckbox.setSelection( sizeLimitWrapper.isNoEstimate() ); - // The GlobalLimit - Integer globalLimit = limitWrapper.getGlobalLimit(); + // The prTotal limit + Integer prTotalLimit = sizeLimitWrapper.getPrTotalLimit(); - if ( globalLimit == null ) + if ( prTotalLimit == null ) { - globalLimitText.setText( "" ); - globalUnlimitedCheckbox.setSelection( false ); + prTotalLimitText.setText( "" ); + prUnlimitedCheckbox.setSelection( false ); + prTotalDisabledCheckbox.setSelection( false ); + prTotalHardCheckbox.setSelection( false ); } - else if ( globalLimit.equals( SizeLimitWrapper.UNLIMITED ) ) + else if ( prTotalLimit.equals( SizeLimitWrapper.UNLIMITED ) ) { - globalLimitText.setText( SizeLimitWrapper.UNLIMITED_STR ); - globalUnlimitedCheckbox.setSelection( true ); + prTotalLimitText.setText( SizeLimitWrapper.UNLIMITED_STR ); + prTotalUnlimitedCheckbox.setSelection( true ); + prTotalDisabledCheckbox.setSelection( false ); + prTotalHardCheckbox.setSelection( false ); + } + else if ( prTotalLimit.equals( SizeLimitWrapper.PR_DISABLED ) ) + { + prTotalLimitText.setText( SizeLimitWrapper.DISABLED_STR ); + prTotalDisabledCheckbox.setSelection( true ); + prTotalUnlimitedCheckbox.setSelection( false ); + prTotalHardCheckbox.setSelection( false ); + } + else if ( prTotalLimit.equals( SizeLimitWrapper.PR_HARD)) + { + prTotalLimitText.setText(SizeLimitWrapper.HARD_STR ); + prTotalUnlimitedCheckbox.setSelection( false ); + prTotalDisabledCheckbox.setSelection( false ); + prTotalHardCheckbox.setSelection( true ); } else { - globalLimitText.setText( globalLimit.toString() ); - globalUnlimitedCheckbox.setSelection( false ); + prTotalLimitText.setText( prTotalLimit.toString() ); + prTotalUnlimitedCheckbox.setSelection( false ); + prTotalDisabledCheckbox.setSelection( false ); + prTotalHardCheckbox.setSelection( false ); } - - limitText.setText( limitWrapper.toString() ); } } } Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/TimeLimitDialog.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/TimeLimitDialog.java?rev=1683565&r1=1683564&r2=1683565&view=diff ============================================================================== --- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/TimeLimitDialog.java (original) +++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/dialogs/TimeLimitDialog.java Thu Jun 4 14:50:54 2015 @@ -142,7 +142,7 @@ public class TimeLimitDialog extends Abs createTimeLimitEditGroup( composite ); createTimeLimitShowGroup( composite ); - initFromTimeLimit(); + initFromLimit(); applyDialogFont( composite ); @@ -239,82 +239,4 @@ public class TimeLimitDialog extends Abs limitText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) ); limitText.setEditable( false ); } - - - /** - * Initializes the UI from the TimeLimit - */ - private void initFromTimeLimit() - { - if ( limitWrapper != null ) - { - // The SoftLimit - Integer softLimit = limitWrapper.getSoftLimit(); - - if ( softLimit == null ) - { - softLimitText.setText( "" ); - softUnlimitedCheckbox.setSelection( false ); - } - else if ( softLimit.equals( TimeLimitWrapper.UNLIMITED ) ) - { - softLimitText.setText( TimeLimitWrapper.UNLIMITED_STR ); - softUnlimitedCheckbox.setSelection( true ); - } - else - { - softLimitText.setText( softLimit.toString() ); - softUnlimitedCheckbox.setSelection( false ); - } - - // The HardLimit - Integer hardLimit = limitWrapper.getHardLimit(); - - if ( hardLimit == null ) - { - hardLimitText.setText( "" ); - hardUnlimitedCheckbox.setSelection( false ); - hardSoftCheckbox.setSelection( false ); - } - else if ( hardLimit.equals( TimeLimitWrapper.UNLIMITED ) ) - { - hardLimitText.setText( TimeLimitWrapper.UNLIMITED_STR ); - hardUnlimitedCheckbox.setSelection( true ); - hardSoftCheckbox.setSelection( false ); - } - else if ( hardLimit.equals( TimeLimitWrapper.HARD_SOFT ) ) - { - hardLimitText.setText( TimeLimitWrapper.SOFT_STR ); - hardUnlimitedCheckbox.setSelection( false ); - hardSoftCheckbox.setSelection( true ); - } - else - { - hardLimitText.setText( hardLimit.toString() ); - hardUnlimitedCheckbox.setSelection( false ); - hardSoftCheckbox.setSelection( false ); - } - - // The GlobalLimit - Integer globalLimit = limitWrapper.getGlobalLimit(); - - if ( globalLimit == null ) - { - globalLimitText.setText( "" ); - globalUnlimitedCheckbox.setSelection( false ); - } - else if ( globalLimit.equals( TimeLimitWrapper.UNLIMITED ) ) - { - globalLimitText.setText( TimeLimitWrapper.UNLIMITED_STR ); - globalUnlimitedCheckbox.setSelection( true ); - } - else - { - globalLimitText.setText( globalLimit.toString() ); - globalUnlimitedCheckbox.setSelection( false ); - } - - limitText.setText( limitWrapper.toString() ); - } - } } Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OpenLDAPServerConfigurationEditorPage.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OpenLDAPServerConfigurationEditorPage.java?rev=1683565&r1=1683564&r2=1683565&view=diff ============================================================================== --- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OpenLDAPServerConfigurationEditorPage.java (original) +++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OpenLDAPServerConfigurationEditorPage.java Thu Jun 4 14:50:54 2015 @@ -456,4 +456,27 @@ public abstract class OpenLDAPServerConf return section; } + + + /** + * Creates a composite for the given section. + * + * @param toolkit the toolkit + * @param section the section + * @param numColumns the number of columns in the grid + * @param makeColumnsEqualWidth whether or not the columns will have equal width + * + * @return a composite for the given section. + */ + protected Composite createSectionComposite( FormToolkit toolkit, Section section, int numColumns, + boolean makeColumnsEqualWidth ) + { + Composite composite = toolkit.createComposite( section ); + toolkit.paintBordersFor( composite ); + GridLayout gridLayout = new GridLayout( numColumns, makeColumnsEqualWidth ); + gridLayout.marginHeight = gridLayout.marginWidth = 0; + composite.setLayout( gridLayout ); + section.setClient( composite ); + return composite; + } } Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OptionsPage.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OptionsPage.java?rev=1683565&r1=1683564&r2=1683565&view=diff ============================================================================== --- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OptionsPage.java (original) +++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OptionsPage.java Thu Jun 4 14:50:54 2015 @@ -274,47 +274,6 @@ public class OptionsPage extends OpenLDA /** - * Creates a section with the given text. - * - * @param toolkit the toolkit - * @param parent the parent composite - * @param text the text - * @return a section with the given text - * - private Section createSection( FormToolkit toolkit, Composite parent, String text ) - { - Section section = toolkit.createSection( parent, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED ); - section.setText( text ); - section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) ); - - return section; - } - - - /** - * Creates a composite for the given section. - * - * @param toolkit the toolkit - * @param section the section - * @param numColumns the number of columns in the grid - * @param makeColumnsEqualWidth whether or not the columns will have equal width - * - * @return a composite for the given section. - */ - private Composite createSectionComposite( FormToolkit toolkit, Section section, int numColumns, - boolean makeColumnsEqualWidth ) - { - Composite composite = toolkit.createComposite( section ); - toolkit.paintBordersFor( composite ); - GridLayout gridLayout = new GridLayout( numColumns, makeColumnsEqualWidth ); - gridLayout.marginHeight = gridLayout.marginWidth = 0; - composite.setLayout( gridLayout ); - section.setClient( composite ); - return composite; - } - - - /** * {@inheritDoc} */ public void refreshUI() Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/TuningPage.java URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/TuningPage.java?rev=1683565&r1=1683564&r2=1683565&view=diff ============================================================================== --- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/TuningPage.java (original) +++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/TuningPage.java Thu Jun 4 14:50:54 2015 @@ -29,6 +29,7 @@ import org.eclipse.swt.events.ModifyList import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; @@ -1029,8 +1030,13 @@ public class TuningPage extends OpenLDAP toolkit.createLabel( ldapLimitSectionComposite, Messages.getString( "OpenLDAPTuningPage.SizeLimit" ) ); //$NON-NLS-1$ sizeLimitText = toolkit.createText( ldapLimitSectionComposite, "" ); - sizeLimitText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, false, false, 2, 1 ) ); + GridData sizeLimitData= new GridData( SWT.FILL, SWT.NONE, false, false, 2, 1 ); + sizeLimitData.horizontalAlignment = SWT.FILL; + Rectangle rect = sizeLimitText.getShell().getMonitor().getClientArea(); + sizeLimitData.widthHint = rect.width/8; + sizeLimitText.setLayoutData(sizeLimitData ); sizeLimitText.setEditable( false ); + // The SizeLimit edit button sizeLimitEditButton = BaseWidgetUtils.createButton( ldapLimitSectionComposite, "Edit...", 1 );