Object (@NotNull Object element) { if (element instanceof AntBuildTarget) { if (element instanceof MetaTarget) { return ((MetaTarget)element).getBuildFile(); } return ((AntBuildTarget)element).getModel().getBuildFile(); } if (element instanceof AntBuildFile) { return myRoot; } return null; }