}
} );
entryAbbreviateMaxLengthText = BaseWidgetUtils.createText( entryAbbreviateComposite, getPreferenceStore()
.getString( BrowserCommonConstants.PREFERENCE_BROWSER_ENTRY_ABBREVIATE_MAX_LENGTH ), 3, 1 );
entryAbbreviateMaxLengthText.setEnabled( entryAbbreviateButton.getSelection() );
entryAbbreviateMaxLengthText.addVerifyListener( new VerifyListener()
{
public void verifyText( VerifyEvent e )
{
if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
{
e.doit = false;
}
if ( "".equals( entryAbbreviateMaxLengthText.getText() ) && e.text.matches( "[0]" ) ) //$NON-NLS-1$ //$NON-NLS-2$
{
e.doit = false;
}
}
} );
BaseWidgetUtils.createLabel( entryAbbreviateComposite, Messages
.getString( "BrowserPreferencePage.LimitLabelLength2" ), 1 ); //$NON-NLS-1$
BaseWidgetUtils.createSpacer( composite, 1 );
BaseWidgetUtils.createSpacer( composite, 1 );
Group searchResultLabelGroup = BaseWidgetUtils.createGroup( BaseWidgetUtils.createColumnContainer( composite,
1, 1 ), Messages.getString( "BrowserPreferencePage.SearchResultLabel" ), 1 ); //$NON-NLS-1$
Composite searchResultLabelComposite = BaseWidgetUtils.createColumnContainer( searchResultLabelGroup, 3, 1 );
BaseWidgetUtils.createLabel( searchResultLabelComposite, Messages
.getString( "BrowserPreferencePage.UseAsSearchResultLabel1" ), 1 ); //$NON-NLS-1$
searchResultLabelCombo = BaseWidgetUtils.createCombo( searchResultLabelComposite, new String[]
{ DN, RDN, RDN_VALUE }, 0, 1 );
searchResultLabelCombo.setLayoutData( new GridData() );
searchResultLabelCombo
.select( getPreferenceStore().getInt( BrowserCommonConstants.PREFERENCE_BROWSER_SEARCH_RESULT_LABEL ) == BrowserCommonConstants.SHOW_RDN_VALUE ? 2
: getPreferenceStore().getInt( BrowserCommonConstants.PREFERENCE_BROWSER_SEARCH_RESULT_LABEL ) == BrowserCommonConstants.SHOW_RDN ? 1
: 0 );
BaseWidgetUtils.createLabel( searchResultLabelComposite, Messages
.getString( "BrowserPreferencePage.UseAsSearchResultLabel2" ), 1 ); //$NON-NLS-1$
Composite searchResultAbbreviateComposite = BaseWidgetUtils
.createColumnContainer( searchResultLabelGroup, 3, 1 );
searchResultAbbreviateButton = BaseWidgetUtils.createCheckbox( searchResultAbbreviateComposite, Messages
.getString( "BrowserPreferencePage.LimitLabelLength1" ), 1 ); //$NON-NLS-1$
searchResultAbbreviateButton.setSelection( getPreferenceStore().getBoolean(
BrowserCommonConstants.PREFERENCE_BROWSER_SEARCH_RESULT_ABBREVIATE ) );
searchResultAbbreviateButton.addSelectionListener( new SelectionAdapter()
{
public void widgetSelected( SelectionEvent e )
{
updateEnabled();
}
} );
searchResultAbbreviateMaxLengthText = BaseWidgetUtils.createText( searchResultAbbreviateComposite,
getPreferenceStore().getString(
BrowserCommonConstants.PREFERENCE_BROWSER_SEARCH_RESULT_ABBREVIATE_MAX_LENGTH ), 3, 1 );
searchResultAbbreviateMaxLengthText.setEnabled( searchResultAbbreviateButton.getSelection() );
searchResultAbbreviateMaxLengthText.addVerifyListener( new VerifyListener()
{
public void verifyText( VerifyEvent e )
{
if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
{
e.doit = false;
}
if ( "".equals( searchResultAbbreviateMaxLengthText.getText() ) && e.text.matches( "[0]" ) ) //$NON-NLS-1$ //$NON-NLS-2$
{
e.doit = false;
}
}
} );
BaseWidgetUtils.createLabel( searchResultAbbreviateComposite, Messages
.getString( "BrowserPreferencePage.LimitLabelLength2" ), 1 ); //$NON-NLS-1$
BaseWidgetUtils.createSpacer( composite, 1 );
BaseWidgetUtils.createSpacer( composite, 1 );
Group foldingGroup = BaseWidgetUtils.createGroup( BaseWidgetUtils.createColumnContainer( composite, 1, 1 ),
Messages.getString( "BrowserPreferencePage.Folding" ), 1 ); //$NON-NLS-1$
Composite pagingGroupComposite = BaseWidgetUtils.createColumnContainer( foldingGroup, 2, 1 );
enableFoldingButton = BaseWidgetUtils.createCheckbox( pagingGroupComposite, Messages
.getString( "BrowserPreferencePage.EnableFolding" ), 2 ); //$NON-NLS-1$
enableFoldingButton.setSelection( getPreferenceStore().getBoolean(
BrowserCommonConstants.PREFERENCE_BROWSER_ENABLE_FOLDING ) );
enableFoldingButton.addSelectionListener( new SelectionAdapter()
{
public void widgetSelected( SelectionEvent e )
{
updateEnabled();
}
} );
foldingSizeLabel = BaseWidgetUtils.createLabel( pagingGroupComposite, Messages
.getString( "BrowserPreferencePage.FoldingSize" ), 1 ); //$NON-NLS-1$
foldingSizeLabel.setEnabled( enableFoldingButton.getSelection() );
foldingSizeText = BaseWidgetUtils.createText( pagingGroupComposite, getPreferenceStore().getString(
BrowserCommonConstants.PREFERENCE_BROWSER_FOLDING_SIZE ), 4, 1 );
foldingSizeText.setEnabled( enableFoldingButton.getSelection() );
foldingSizeText.addVerifyListener( new VerifyListener()
{
public void verifyText( VerifyEvent e )
{
if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
{