protected void addProgramBrowseAction(@NotNull final TextFieldWithBrowseButton programField) {
    programField.addBrowseFolderListener(
      new TextBrowseFolderListener(FileChooserDescriptorFactory.createSingleFileOrExecutableAppDescriptor(), myProject) {
        @Override
        protected void onFileChosen(@NotNull VirtualFile file) {
          super.onFileChosen(file);

          String workingDirectory = content.workingDirField.getText();
          if (workingDirectory.isEmpty()) {
            VirtualFile parent = file.getParent();
            if (parent != null && parent.isDirectory()) {
              content.workingDirField.setText(parent.getPresentableUrl());
            }
          }
        }
      });
  }
protected void addProgramBrowseAction(@NotNull final TextFieldWithBrowseButton programField)