private String getEditComment()

in src/net/sourceforge/transparent/CCaseEditFileProvider.java [85:114]


  private String getEditComment(final VirtualFile[] files, CurrentStatusHelper statusHelper) {
    CCaseViewsManager mgr = CCaseViewsManager.getInstance( host.getProject() );

    boolean askComment = host.getCheckoutOptions().getValue();
    if (! askComment && CCaseSharedConfig.getInstance(host.getProject()).isUseUcmModel()) {
      for (VirtualFile file : files) {
        if (statusHelper.shouldHijack(file)) continue;
        boolean isUcmView = mgr.isUcmViewForFile( file );
        boolean hasActivity = (mgr.getActivityOfViewOfFile( file ) != null);
        askComment = (isUcmView && ! hasActivity);
        if (askComment) break;
      }
    }

    String comment = "";
    if(askComment) {
      CheckoutDialog dialog = ( files.length == 1 ) ?
                              new CheckoutDialog( host.getProject(), files[ 0 ] ) :
                              new CheckoutDialog( host.getProject(), files );
      dialog.show();
      if( dialog.getExitCode() == CheckoutDialog.CANCEL_EXIT_CODE )
        return null;

      comment = dialog.getComment();
    }
    if (! StringUtil.isEmptyOrSpaces(comment)) {
      VcsConfiguration.getInstance(host.getProject()).saveCommitMessage(comment);
    }
    return comment;
  }