typeCombo.setItems( allAtNames );
typeCombo.setText( initialType );
// content proposal adapter
typeCPA = new ContentProposalAdapter( typeCombo, new ComboContentAdapter(),
new ListContentProposalProvider( typeCombo.getItems() ), null, null );
typeCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
typeCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
BaseWidgetUtils.createLabel( composite, SEP_VALUESIN, 1 );
valuesInComboField = new DecoratedField( composite, SWT.NONE, new IControlCreator()
{
public Control createControl( Composite parent, int style )
{
Combo combo = BaseWidgetUtils.createCombo( parent, new String[0], -1, 1 );
combo.setVisibleItemCount( 20 );
return combo;
}
} );
valuesInComboField.addFieldDecoration( fieldDecoration, SWT.TOP | SWT.LEFT, true );
valuesInComboField.getLayoutControl().setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
valuesInCombo = ( Combo ) valuesInComboField.getControl();
valuesInCombo.setItems( allAtNames );
valuesInCombo.setText( initialValuesIn );
// content proposal adapter
valuesInCPA = new ContentProposalAdapter( valuesInCombo, new ComboContentAdapter(),
new ListContentProposalProvider( valuesInCombo.getItems() ), null, null );
valuesInCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
valuesInCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
BaseWidgetUtils.createLabel( composite, R_CURLY, 1 );