PsiElement () { final PsiClass scriptClass = getScriptClass(); if (scriptClass != null) { final PsiElement originalElement = scriptClass.getOriginalElement(); if (originalElement != scriptClass) { return originalElement.getContainingFile(); } } return this; }