XsltTemplate () { final PsiReference[] references = getReferences(); for (PsiReference reference : references) { final PsiElement t = reference.resolve(); if (t instanceof XsltTemplate) { return (XsltTemplate)t; } } return null; }