protected void pickFileVFS() {

    FileDialog dialog = new FileDialog(shell, SWT.OPEN);
    dialog.setFilterExtensions(Const.STRING_TRANS_FILTER_EXT);
    dialog.setFilterNames(Const.getTransformationFilterNames());
    String prevName = jobMeta.environmentSubstitute(wPath.getText());
    String parentFolder = null;
    try {
      parentFolder =
          KettleVFS.getFilename(
              KettleVFS.getFileObject(jobMeta.environmentSubstitute(jobMeta.getFilename()))
                  .getParent());
    } catch (Exception e) {
      // not that important
    }
    if (!Utils.isEmpty(prevName)) {
      try {
        if (KettleVFS.fileExists(prevName)) {
          dialog.setFilterPath(
              KettleVFS.getFilename(KettleVFS.getFileObject(prevName).getParent()));
        } else {

          if (!prevName.endsWith(".ktr")) {
            prevName = getEntryName(Const.trim(wPath.getText()) + ".ktr");
          }
          if (KettleVFS.fileExists(prevName)) {
            specificationMethod = ObjectLocationSpecificationMethod.FILENAME;
            wPath.setText(prevName);
            return;
          } else {
            // File specified doesn't exist. Ask if we should create the file...
            //
            MessageBox mb = new MessageBox(shell, SWT.YES | SWT.NO | SWT.ICON_QUESTION);
            mb.setMessage(
                BaseMessages.getString(
                    PKG, "JobTrans.Dialog.CreateTransformationQuestion.Message"));
            mb.setText(
                BaseMessages.getString(
                    PKG, "JobTrans.Dialog.CreateTransformationQuestion.Title")); // Sorry!
            int answer = mb.open();
            if (answer == SWT.YES) {

              Spoon spoon = Spoon.getInstance();
              spoon.newTransFile();
              TransMeta transMeta = spoon.getActiveTransformation();
              transMeta.initializeVariablesFrom(jobEntry);
              transMeta.setFilename(jobMeta.environmentSubstitute(prevName));
              wPath.setText(prevName);
              specificationMethod = ObjectLocationSpecificationMethod.FILENAME;
              spoon.saveFile();
              return;
            }
          }
        }
      } catch (Exception e) {
        dialog.setFilterPath(parentFolder);
      }
    } else if (!Utils.isEmpty(parentFolder)) {
      dialog.setFilterPath(parentFolder);
    }

    String fname = dialog.open();
    if (fname != null) {
      File file = new File(fname);
      String name = file.getName();
      String parentFolderSelection = file.getParentFile().toString();

      if (!Utils.isEmpty(parentFolder) && parentFolder.equals(parentFolderSelection)) {
        wPath.setText(getEntryName(name));
      } else {
        wPath.setText(fname);
      }
    }
  }