void (final @NotNull AnActionEvent e) { Presentation p = e.getPresentation(); IdeFrameEx frame = null; boolean isApplicable = WindowManager.getInstance().isFullScreenSupportedInCurrentOS(); if (isApplicable) { frame = getFrameHelper(e.getProject()); isApplicable = frame != null; } if (!ActionPlaces.MAIN_TOOLBAR.equals(e.getPlace())) { p.setVisible(isApplicable); } p.setEnabled(isApplicable); if (isApplicable) { p.setText(frame.isInFullScreen() ? ActionsBundle.message("action.ToggleFullScreen.text.exit") : ActionsBundle.message("action.ToggleFullScreen.text.enter")); } }