void (PsiElement element, final boolean requestFocus) { if (SelectInProjectViewImplKt.getLOG().isDebugEnabled()) { SelectInProjectViewImplKt.getLOG().debug( "ProjectViewSelectInTarget.selectIn: Select in " + this + ", requestFocus=" + requestFocus + ", element=" + element ); } PsiUtilCore.ensureValid(element); PsiElement toSelect = null; for (TreeStructureProvider provider : getProvidersDumbAware()) { if (provider instanceof SelectableTreeStructureProvider) { toSelect = ((SelectableTreeStructureProvider)provider).getTopLevelElement(element); } if (toSelect != null) { if (!toSelect.isValid()) { throw new PsiInvalidElementAccessException(toSelect, "Returned by " + provider); } break; } } if (SelectInProjectViewImplKt.getLOG().isDebugEnabled()) { SelectInProjectViewImplKt.getLOG().debug("Top level element is " + toSelect); } toSelect = findElementToSelect(element, toSelect); if (toSelect != null) { VirtualFile virtualFile = PsiUtilCore.getVirtualFile(toSelect); virtualFile = virtualFile == null? null : BackedVirtualFile.getOriginFileIfBacked(virtualFile); select(toSelect, virtualFile, requestFocus); } }