void (@NotNull final AnActionEvent e) { super.update(e); Presentation presentation = e.getPresentation(); Object isSupported = presentation.getClientProperty(IS_LIBRARY_FRAME_FILTER_SUPPORTED); XDebugSession session = e.getData(XDebugSession.DATA_KEY); if (isSupported == null) { if (session == null) { // if session is null and isSupported is null - just return, it means that action created initially not in the xdebugger tab presentation.setVisible(false); return; } isSupported = session.getDebugProcess().isLibraryFrameFilterSupported(); presentation.putClientProperty(IS_LIBRARY_FRAME_FILTER_SUPPORTED, isSupported); } if (Boolean.TRUE.equals(isSupported)) { presentation.setVisible(true); final boolean shouldShow = !Toggleable.isSelected(presentation); presentation.setText(XDebuggerBundle.message(shouldShow ? "hide.library.frames.tooltip" : "show.all.frames.tooltip")); } else { presentation.setVisible(false); } }