public SelectConfigDestinationFolderDialog(@Nullable Project project,ConfigFileType fileType){
  super(project);
  setTitle(GctBundle.message("appengine.flex.config.destination.chooser.title"));
  init();
  destinationFolderChooser.addBrowseFolderListener(GctBundle.message("appengine.flex.config.choose.destination.folder.window.title"),null,project,FileChooserDescriptorFactory.createSingleFolderDescriptor());
  if (project != null && project.getBasePath() != null) {
    if (fileType == ConfigFileType.APP_YAML) {
      Path appYamlPath=Paths.get(project.getBasePath() + AppEngineDeploymentRunConfigurationEditor.DEFAULT_APP_YAML_DIR);
      destinationFolderChooser.setText(appYamlPath.toString());
    }
 else     if (fileType == ConfigFileType.DOCKERFILE) {
      Path dockerfilePath=Paths.get(project.getBasePath() + AppEngineDeploymentRunConfigurationEditor.DEFAULT_DOCKERFILE_DIR);
      destinationFolderChooser.setText(dockerfilePath.toString());
    }
 else {
      destinationFolderChooser.setText(project.getBasePath());
    }
  }
}

public SelectConfigDestinationFolderDialog ( @ Nullable Project project , ConfigFileType fileType ) { super ( project ) ; setTitle ( GctBundle . message ( "appengine.flex.config.destination.chooser.title" ) ) ; init ( ) ; destinationFolderChooser . addBrowseFolderListener ( GctBundle . message ( "appengine.flex.config.choose.destination.folder.window.title" ) , null , project , FileChooserDescriptorFactory . createSingleFolderDescriptor ( ) ) ; if ( project != null && project . getBasePath ( ) != null ) { if ( fileType == ConfigFileType . APP_YAML ) { Path appYamlPath = Paths . get ( project . getBasePath ( ) + AppEngineDeploymentRunConfigurationEditor . DEFAULT_APP_YAML_DIR ) ; destinationFolderChooser . setText ( appYamlPath . toString ( ) ) ; } else if ( fileType == ConfigFileType . DOCKERFILE ) { Path dockerfilePath = Paths . get ( project . getBasePath ( ) + AppEngineDeploymentRunConfigurationEditor . DEFAULT_DOCKERFILE_DIR ) ; destinationFolderChooser . setText ( dockerfilePath . toString ( ) ) ; } else { destinationFolderChooser . setText ( project . getBasePath ( ) ) ; } } }
initialize the widget and set the default paths .
