コード例 #1
0
  /**
   * 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);
  }
コード例 #2
0
 @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);
 }