boolean (@NotNull TemplateActionContext templateActionContext) { PsiFile psiFile = templateActionContext.getFile(); if (psiFile instanceof ShFile) { PsiElement element = psiFile.findElementAt(templateActionContext.getStartOffset()); if (element == null) return true; return element.getNode().getElementType() != ShTokenTypes.COMMENT; } return false; }