void (final CommanderPanel panel, final Element element) { /*TODO[anton,vova]: it's a patch!!!*/ final AbstractListBuilder builder = panel.getBuilder(); if (builder == null) return; final AbstractTreeNode parentNode = builder.getParentNode(); final Object parentElement = parentNode != null? parentNode.getValue() : null; if (parentElement instanceof PsiDirectory directory) { element.setAttribute(ATTRIBUTE_URL, directory.getVirtualFile().getUrl()); } else if (parentElement instanceof PsiClass) { for (PsiElement e = (PsiElement) parentElement; e != null && e.isValid(); e = e.getParent()) { if (e instanceof PsiClass) { final String qualifiedName = ((PsiClass) e).getQualifiedName(); if (qualifiedName != null) { element.setAttribute(ATTRIBUTE_CLASS, qualifiedName); break; } } } } }