/**
   * Display build source info (url, reference and context dir).
   *
   * @param buildSource
   */
  private void setBuildSource(BuildSource buildSource) {
    view.setSourceUrl(buildSource.getGit().getUri());
    view.setSourceReference(buildSource.getGit().getRef());
    view.setSourceContextDir(buildSource.getContextDir());

    view.enableSaveButton(false);
    view.enableRestoreButton(false);
  }
 @Override
 public void onSourceDataChanged() {
   BuildSource buildSource = buildConfig.getSpec().getSource();
   boolean changed =
       !(buildSource.getContextDir().equals(view.getSourceContextDir())
           && buildSource.getGit().getRef().equals(view.getSourceReference())
           && buildSource.getGit().getUri().equals(view.getSourceUrl()));
   view.enableSaveButton(changed);
   view.enableRestoreButton(changed);
 }