innerComposite = BaseWidgetUtils.createColumnContainer( composite, 5, 1 );
String[] attributes = HistoryUtils.load( ATTRIBUTE_HISTORY_DIALOGSETTING_KEY );
quickSearchAttributeCombo = BaseWidgetUtils.createCombo( innerComposite, attributes, -1, 1 );
quickSearchAttributePP = new ListContentProposalProvider( attributes );
new ExtendedContentAssistCommandAdapter( quickSearchAttributeCombo, new ComboContentAdapter(),
quickSearchAttributePP, null, null, true );
quickSearchAttributeCombo.addModifyListener( new ModifyListener()
{
public void modifyText( ModifyEvent e )
{
quickSearchRunButton.setEnabled( !"".equals( quickSearchAttributeCombo.getText() ) );
}
} );
quickSearchAttributeCombo.addSelectionListener( new SelectionAdapter()
{
public void widgetDefaultSelected( SelectionEvent e )
{
performSearch();
}
} );
GridData gd = new GridData( GridData.FILL_HORIZONTAL );
gd.widthHint = 50;
quickSearchAttributeCombo.setLayoutData( gd );
String[] operators = new String[]
{ "=", "!=", "<=", ">=", "~=" };
quickSearchOperatorCombo = BaseWidgetUtils.createReadonlyCombo( innerComposite, operators, 0, 1 );
GridData data = new GridData();
quickSearchOperatorCombo.setLayoutData( data );
String[] values = HistoryUtils.load( VALUE_HISTORY_DIALOGSETTING_KEY );
quickSearchValueCombo = BaseWidgetUtils.createCombo( innerComposite, values, -1, 1 );
quickSearchValuePP = new ListContentProposalProvider( values );
new ExtendedContentAssistCommandAdapter( quickSearchValueCombo, new ComboContentAdapter(), quickSearchValuePP,
null, null, true );
quickSearchValueCombo.addSelectionListener( new SelectionAdapter()
{
public void widgetDefaultSelected( SelectionEvent e )
{