void (@NotNull AnActionEvent e) { Editor editor = e.getData(CommonDataKeys.EDITOR); final WebBrowserManager browserManager = WebBrowserManager.getInstance(); PsiFile psiFile = e.getData(CommonDataKeys.PSI_FILE); boolean needShowOnHover = psiFile != null && WebBrowserXmlService.getInstance().isXmlLanguage(psiFile.getViewProvider().getBaseLanguage()) ? browserManager.isShowBrowserHoverXml() : browserManager.isShowBrowserHover(); e.getPresentation().setVisible(needShowOnHover && (!browserManager.getActiveBrowsers().isEmpty() || OpenInBrowserBaseGroupAction.hasLocalBrowser()) && editor != null && !DiffUtil.isDiffEditor(editor)); }