@Nullable
  private Commenter findCommenter(final int line) {
    final FileType fileType = myFile.getFileType();
    if (fileType instanceof AbstractFileType) {
      return ((AbstractFileType) fileType).getCommenter();
    }

    int lineStartOffset = myDocument.getLineStartOffset(line);
    int lineEndOffset = myDocument.getLineEndOffset(line) - 1;
    final CharSequence charSequence = myDocument.getCharsSequence();
    lineStartOffset = CharArrayUtil.shiftForward(charSequence, lineStartOffset, " \t");
    lineEndOffset =
        CharArrayUtil.shiftBackward(charSequence, lineEndOffset < 0 ? 0 : lineEndOffset, " \t");
    final Language lineStartLanguage = PsiUtilBase.getLanguageAtOffset(myFile, lineStartOffset);
    final Language lineEndLanguage = PsiUtilBase.getLanguageAtOffset(myFile, lineEndOffset);
    return CommentByBlockCommentHandler.getCommenter(
        myFile, myEditor, lineStartLanguage, lineEndLanguage);
  }
 private void uncommentRange(int startOffset, int endOffset, @NotNull Commenter commenter) {
   final String commentedSuffix = commenter.getCommentedBlockCommentSuffix();
   final String commentedPrefix = commenter.getCommentedBlockCommentPrefix();
   final String prefix = commenter.getBlockCommentPrefix();
   final String suffix = commenter.getBlockCommentSuffix();
   if (prefix == null || suffix == null) {
     return;
   }
   if (endOffset >= suffix.length()
       && CharArrayUtil.regionMatches(
           myDocument.getCharsSequence(), endOffset - suffix.length(), suffix)) {
     myDocument.deleteString(endOffset - suffix.length(), endOffset);
   }
   if (commentedPrefix != null && commentedSuffix != null) {
     CommentByBlockCommentHandler.commentNestedComments(
         myDocument, new TextRange(startOffset, endOffset), commenter);
   }
   myDocument.deleteString(startOffset, startOffset + prefix.length());
 }