public boolean delete()

in src/com/intellij/vssSupport/VssLocalFileOperationsHandler.java [31:63]


  public boolean delete( VirtualFile file ) {
    //  In the case of multi-vcs project configurations, we need to skip all
    //  notifications on non-owned files
    if( !VcsUtil.isFileForVcs( file, project, host ))
      return false;

    if( file.isDirectory() )
    {
      boolean needToAsk = false;
      ChangeListManager mgr = ChangeListManager.getInstance( project );
      for( Change change : mgr.getChangesIn( file ) )
      {
        if( change.getAfterRevision() != null )
        {
          //  Exclude folder itself from the iteration.
          if( !isFolderItself( change, file ) && isStatusSuitable( change ) )
          {
            needToAsk = true;
            break;
          }
        }
      }

      if( needToAsk )
      {
        int result = Messages.showOkCancelDialog( project, VssBundle.message("dialog.text.folder.contains.unversioned"),
                                                  VssBundle.message("dialog.title.folder.contains.unversioned"),
                                                  Messages.getQuestionIcon() );
        return ( result != Messages.OK );
      }
    }
    return false;
  }