@Override
    public boolean isAvailableImpl(@NotNull Project project, Editor editor, PsiFile file) {
        if (!XsltSupport.isXsltFile(file)) return false;

        final int offset = editor.getCaretModel().getOffset();
        final PsiElement element = file.findElementAt(offset);
        if (element == null) return false;
        final XmlTag tag = PsiTreeUtil.getParentOfType(element, XmlTag.class);
        if (tag == null) return false;
        if (!XsltSupport.isTemplateCall(tag)) return false;

        final XsltCallTemplate call = XsltElementFactory.getInstance().wrapElement(tag, XsltCallTemplate.class);
        if (call == null) return false;

        final XsltTemplate template = call.getTemplate();
        if (template == null) return false;

        final Set<String> params = new HashSet<>();
        final XsltParameter[] parameters = template.getParameters();
        for (XsltParameter parameter : parameters) {
            if (parameter.hasDefault()) params.add(parameter.getName());
        }
        final XsltWithParam[] arguments = call.getArguments();
        for (XsltWithParam argument : arguments) {
            params.remove(argument.getParamName());
        }

        myTag = tag;
        return params.size() > 0 && isAvailableAt(element, tag, offset);
    }
@Override
    public boolean isAvailableImpl(@NotNull Project project, Editor editor, PsiFile file)