private void updateButtonsState(ISelection selection){
  removeButton.setEnabled(!selection.isEmpty());
  duplicateButton.setEnabled(!selection.isEmpty());
}

private void updateButtonsState ( ISelection selection ) { removeButton . setEnabled ( ! selection . isEmpty ( ) ) ; duplicateButton . setEnabled ( ! selection . isEmpty ( ) ) ; }
updates the state of the remove button depending on the current selection .
