void () { super.addNotify(); long startedTime = IdeEventQueue.getInstance().getPopupTriggerTime(); long time = (startedTime > 0) ? System.currentTimeMillis() - startedTime : -1; PsiFile psiFile = (PsiFile)Utils.getRawDataIfCached(myContext, CommonDataKeys.PSI_FILE.getName()); Language language = psiFile == null ? null : psiFile.getLanguage(); boolean coldStart = SEEN_ACTION_GROUPS.add(Objects.hash(myGroup, language)); UILatencyLogger.ACTION_POPUP_LATENCY.log(EventFields.DurationMs.with(time), EventFields.ActionPlace.with(myPlace), UILatencyLogger.COLD_START.with(coldStart), EventFields.Language.with(language)); if (Registry.is("ide.diagnostics.show.context.menu.invocation.time")) { //noinspection HardCodedStringLiteral new Notification(Notifications.SYSTEM_MESSAGES_GROUP_ID, "Context menu invocation took " + time + "ms", NotificationType.INFORMATION).notify(null); } }