Beispiel #1
0
  /** Show copy dialog. */
  public void showCopy() {
    final Project project = appContext.getRootProject();

    Preconditions.checkState(project != null && SvnUtil.isUnderSvn(project));

    final Resource[] resources = appContext.getResources();

    Preconditions.checkState(resources != null && resources.length == 1);

    sourceNode = resources[0];

    if (sourceNode.getResourceType() == Resource.FILE) {
      view.setDialogTitle(constants.copyViewTitleFile());
    } else {
      view.setDialogTitle(constants.copyViewTitleDirectory());
    }

    view.setNewName(sourceNode.getName());
    view.setComment(sourceNode.getName());
    view.setSourcePath(sourceNode.getLocation().toString(), false);

    validate();

    view.show();
    view.setProjectNode(project);
  }
Beispiel #2
0
  /** {@inheritDoc} */
  @Override
  public void onSourceCheckBoxChanged() {
    // url path chosen
    if (view.isSourceCheckBoxSelected()) {
      view.setSourcePath("", true);
      view.setNewName("name");
    } else {
      view.setSourcePath(sourceNode.getLocation().toString(), false);
      view.setNewName(sourceNode.getName());
    }

    validate();
  }