void (final @NotNull Template template, boolean brokenOff) { final int offset = editor.getCaretModel().getOffset(); if (chooseAttributeName && offset > 0) { char c = editor.getDocument().getCharsSequence().charAt(offset - 1); if (c == '/' || (c == ' ' && brokenOff)) { WriteCommandAction.writeCommandAction(project).run(() -> editor.getDocument().replaceString(offset, offset + 3, ">")); } } }