void (@NotNull AnActionEvent e) { MyLoadingChangesPanel changesPanel = e.getData(MyLoadingChangesPanel.DATA_KEY); if (changesPanel == null) { e.getPresentation().setEnabledAndVisible(false); return; } MyChangesBrowser browser = ObjectUtils.tryCast(changesPanel.getChangesBrowser(), MyChangesBrowser.class); e.getPresentation().setEnabledAndVisible(browser != null && browser.myLocalContent != LocalContent.NONE); }