public FileConfirmationDialog(@Nullable Project project,DialogType dialogType,@NotNull Path targetPath){
  super(project);
  this.dialogType=dialogType;
switch (dialogType) {
case CONFIRM_OVERWRITE:
    setTitle(GctBundle.message("appengine.flex.config.destination.overwrite.title"));
  warningLabel.setText(GctBundle.message("appengine.flex.config.destination.overwrite"));
break;
case CONFIRM_CREATE_DIR:
setTitle(GctBundle.message("appengine.flex.config.destination.create.dir.title"));
warningLabel.setText(GctBundle.message("appengine.flex.config.destination.create.dir"));
break;
case NOT_DIRECTORY_ERROR:
setTitle(GctBundle.message("appengine.flex.config.destination.not.directory.title"));
warningLabel.setText(GctBundle.message("appengine.flex.config.destination.not.directory"));
break;
default :
throw new AssertionError();
}
pathDisplay.setText(targetPath.toString());
init();
}

public FileConfirmationDialog ( @ Nullable Project project , DialogType dialogType , @ NotNull Path targetPath ) { super ( project ) ; this . dialogType = dialogType ; switch ( dialogType ) { case CONFIRM_OVERWRITE : setTitle ( GctBundle . message ( "appengine.flex.config.destination.overwrite.title" ) ) ; warningLabel . setText ( GctBundle . message ( "appengine.flex.config.destination.overwrite" ) ) ; break ; case CONFIRM_CREATE_DIR : setTitle ( GctBundle . message ( "appengine.flex.config.destination.create.dir.title" ) ) ; warningLabel . setText ( GctBundle . message ( "appengine.flex.config.destination.create.dir" ) ) ; break ; case NOT_DIRECTORY_ERROR : setTitle ( GctBundle . message ( "appengine.flex.config.destination.not.directory.title" ) ) ; warningLabel . setText ( GctBundle . message ( "appengine.flex.config.destination.not.directory" ) ) ; break ; default : throw new AssertionError ( ) ; } pathDisplay . setText ( targetPath . toString ( ) ) ; init ( ) ; }
initialize the dialog of the correct type .
