cmbKeys.setEnabled(cbExternalize.getSelection()); if (cmbKeys.getItemCount() > 0) { sResult = buildString(); txtValue.setText(getDisplayValue()); txtCurrent.setText(getCurrentPropertyValue()); }
if ( cbExternalize.getSelection( ) ) { cmbKeys.setEnabled( true ); if ( cmbKeys.getItemCount( ) > 0 ) { sResult = buildString( ); txtValue.setText( getDisplayValue( ) ); txtCurrent.setText( getCurrentPropertyValue( ) ); } } else { cmbKeys.setEnabled( false ); txtValue.setText( sInputValue ); txtCurrent.setText( "" ); }
    public void widgetSelected(SelectionEvent e)    {        if (e.getSource().equals(btnAccept))        {            bWasCancelled = false;            sResult = buildString();            shell.dispose();        }        else if (e.getSource().equals(btnCancel))        {            sResult = null;            shell.dispose();        }        else if (e.getSource().equals(cbExternalize))        {            cmbKeys.setEnabled(cbExternalize.getSelection());            if (cmbKeys.getItemCount() > 0)            {                sResult = buildString();                txtValue.setText(getDisplayValue());                txtCurrent.setText(getCurrentPropertyValue());            }        }        else if (e.getSource().equals(cmbKeys))        {            sResult = buildString();            txtValue.setText(getDisplayValue());            txtCurrent.setText(getCurrentPropertyValue());        }    }