Esempio n. 1
0
  public NewSourceFolderDialog(
      Shell parent,
      String title,
      IProject project,
      List existingFolders,
      BPListElement entryToEdit) {
    super(parent);
    setTitle(title);

    fContainerFieldStatus = new StatusInfo();

    SourceContainerAdapter adapter = new SourceContainerAdapter();

    fUseProjectButton = new SelectionButtonDialogField(SWT.RADIO);
    fUseProjectButton.setLabelText(NewWizardMessages.NewSourceFolderDialog_useproject_button);
    fUseProjectButton.setDialogFieldListener(adapter);

    fUseFolderButton = new SelectionButtonDialogField(SWT.RADIO);
    fUseFolderButton.setLabelText(NewWizardMessages.NewSourceFolderDialog_usefolder_button);
    fUseFolderButton.setDialogFieldListener(adapter);

    fContainerDialogField = new StringDialogField();
    fContainerDialogField.setDialogFieldListener(adapter);
    fContainerDialogField.setLabelText(NewWizardMessages.NewSourceFolderDialog_sourcefolder_label);

    fUseFolderButton.attachDialogField(fContainerDialogField);

    fFolder = null;
    fExistingFolders = existingFolders;
    fCurrProject = project;

    boolean useFolders = true;
    if (entryToEdit == null) {
      fContainerDialogField.setText(""); // $NON-NLS-1$
    } else {
      IPath editPath = entryToEdit.getPath().removeFirstSegments(1);
      fContainerDialogField.setText(editPath.toString());
      useFolders = !editPath.isEmpty();
    }
    fUseFolderButton.setSelection(useFolders);
    fUseProjectButton.setSelection(!useFolders);
  }
Esempio n. 2
0
 public void setMessage(String message) {
   fContainerDialogField.setLabelText(message);
 }