void (final @NotNull AnActionEvent e) { Presentation p = e.getPresentation(); p.setVisible(SystemInfo.isMac); if (SystemInfo.isMac) { Project project = e.getProject(); if (project != null) { JFrame frame = WindowManager.getInstance().getFrame(project); if (frame != null) { JRootPane pane = frame.getRootPane(); p.setEnabled(pane != null && pane.getClientProperty(MacMainFrameDecorator.FULL_SCREEN) == null); } } } else { p.setEnabled(false); } }