String (@NotNull String text) { final String lineCommentPrefix = myCommenter.getLineCommentPrefix(); if (lineCommentPrefix != null && text.startsWith(lineCommentPrefix)) { return text; } final String prefix = myCommenter.getBlockCommentPrefix(); final String suffix = myCommenter.getBlockCommentSuffix(); if (prefix != null && suffix != null && text.length() >= prefix.length() + suffix.length() && text.startsWith(prefix) && text.endsWith(suffix)) { return text; } return lineCommentPrefix != null ? wrapIntoLineComment(lineCommentPrefix, text) : prefix != null && suffix != null ? wrapIntoBlockComment(prefix, suffix, text) : ""; }