use of com.intellij.ide.projectView.SelectableTreeStructureProvider in project intellij-community by JetBrains.
the class ProjectViewSelectInTarget method select.
@Override
public void select(PsiElement element, final boolean requestFocus) {
PsiElement toSelect = null;
for (TreeStructureProvider provider : getProvidersDumbAware()) {
if (provider instanceof SelectableTreeStructureProvider) {
toSelect = ((SelectableTreeStructureProvider) provider).getTopLevelElement(element);
}
if (toSelect != null)
break;
}
toSelect = findElementToSelect(element, toSelect);
if (toSelect != null) {
VirtualFile virtualFile = PsiUtilCore.getVirtualFile(toSelect);
select(toSelect, virtualFile, requestFocus);
}
}
Aggregations