PsiElement () { PsiElement parent = myElement.getParent(); if (!(parent instanceof ShIncludeCommandImpl includeCommand)) return null; List<ShSimpleCommandElement> commandList = includeCommand.getSimpleCommandElementList(); if (commandList.size() <= 0 || commandList.get(0) != myElement) return null; return ((ShIncludeCommandImpl)parent).getReferencingFile(myElement); }