private void hitCountChanged ( ) { if ( ! fHitValueButton . getSelection ( ) ) { removeErrorMessage ( fgHitCountErrorMessage ) ; return ; } String hitCountText = fHitValueText . getText ( ) ; int hitCount = - 1 ; try { hitCount = Integer . parseInt ( hitCountText ) ; } catch ( NumberFormatException e1 ) { addErrorMessage ( fgHitCountErrorMessage ) ; return ; } if ( hitCount < 1 ) { addErrorMessage ( fgHitCountErrorMessage ) ; } else { removeErrorMessage ( fgHitCountErrorMessage ) ; } }
Validates the current state of the hit count editor . Hit count value must be a positive integer .