}
} );
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]*" ) )
{
e.doit = false;
}
if ( "".equals( entryAbbreviateMaxLengthText.getText() ) && e.text.matches( "[0]" ) )
{
e.doit = false;
}
}
} );
BaseWidgetUtils.createLabel( entryAbbreviateComposite, " characters", 1 );
BaseWidgetUtils.createSpacer( composite, 1 );
BaseWidgetUtils.createSpacer( composite, 1 );
Group searchResultLabelGroup = BaseWidgetUtils.createGroup( BaseWidgetUtils.createColumnContainer( composite,
1, 1 ), "Search result label", 1 );
Composite searchResultLabelComposite = BaseWidgetUtils.createColumnContainer( searchResultLabelGroup, 3, 1 );
BaseWidgetUtils.createLabel( searchResultLabelComposite, "Use ", 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, " as search result label", 1 );
Composite searchResultAbbreviateComposite = BaseWidgetUtils
.createColumnContainer( searchResultLabelGroup, 3, 1 );
searchResultAbbreviateButton = BaseWidgetUtils.createCheckbox( searchResultAbbreviateComposite,
"Limit label length to ", 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]*" ) )
{
e.doit = false;
}
if ( "".equals( searchResultAbbreviateMaxLengthText.getText() ) && e.text.matches( "[0]" ) )
{
e.doit = false;
}
}
} );
BaseWidgetUtils.createLabel( searchResultAbbreviateComposite, " characters", 1 );
BaseWidgetUtils.createSpacer( composite, 1 );
BaseWidgetUtils.createSpacer( composite, 1 );
Group foldingGroup = BaseWidgetUtils.createGroup( BaseWidgetUtils.createColumnContainer( composite, 1, 1 ),
"Folding", 1 );
Composite pagingGroupComposite = BaseWidgetUtils.createColumnContainer( foldingGroup, 2, 1 );
enableFoldingButton = BaseWidgetUtils.createCheckbox( pagingGroupComposite, "Enable folding", 2 );
enableFoldingButton.setSelection( getPreferenceStore().getBoolean(
BrowserCommonConstants.PREFERENCE_BROWSER_ENABLE_FOLDING ) );
enableFoldingButton.addSelectionListener( new SelectionAdapter()
{
public void widgetSelected( SelectionEvent e )
{
updateEnabled();
}
} );
foldingSizeLabel = BaseWidgetUtils.createLabel( pagingGroupComposite, "Folding size: ", 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]*" ) )
{