void (@NotNull ActionContext context, @NotNull PsiLiteralExpression literal, @NotNull ModPsiUpdater updater) { final TextRange range = context.selection().shiftLeft(literal.getTextRange().getStartOffset()); final String text = literal.getText(); final int length = text.length(); final int start = range.getStartOffset(); final int end = range.getEndOffset(); if (start >= length || end >= length || !StringUtil.unescapeStringCharacters(text.substring(start, end)).equals("\\")) return; final String newText = text.substring(0, start) + text.substring(end); PsiReplacementUtil.replaceExpression(literal, newText); }