void (@NotNull AnActionEvent event) { HierarchyBrowserBaseEx browser = event.getData(HIERARCHY_BROWSER); if (browser == null) return; PsiElement selectedElement = browser.getSelectedElement(event.getDataContext()); if (selectedElement == null || !browser.isApplicableElementForBaseOn(selectedElement)) return; @Nls String currentViewType = browser.getCurrentViewType(); Disposer.dispose(browser); HierarchyProvider provider = BrowseHierarchyActionBase.findProvider( myProviderLanguageExtension, selectedElement, selectedElement.getContainingFile(), event.getDataContext()); if (provider != null) { HierarchyBrowserBaseEx newBrowser = (HierarchyBrowserBaseEx)BrowseHierarchyActionBase.createAndAddToPanel( selectedElement.getProject(), provider, selectedElement); ApplicationManager.getApplication().invokeLater(() -> newBrowser.changeView(correctViewType(browser, currentViewType)), __ -> newBrowser.isDisposed()); } }