boolean removeEnabled = !myJoinsTableViewer.getSelection().isEmpty() && !myRelationship.isFlattened();
boolean buttonsEnabled = myRelationship.getDestination() != null; boolean removeEnabled = buttonsEnabled && !myJoinsTableViewer.getSelection().isEmpty() && !myRelationship.isFlattened(); boolean addEnabled = buttonsEnabled;
  protected void updateButtons() {    boolean removeEnabled = !myJoinsTableViewer.getSelection().isEmpty() && !myRelationship.isFlattened();    myRemoveButton.setEnabled(removeEnabled);  }