void (Component comp, int x, int y) { if (ApplicationManager.getApplication() == null) return; PsiFile file = PsiDocumentManager.getInstance(myProject).getPsiFile(myEditor.getDocument()); if (file == null) return; ActionManager actionManager = ActionManager.getInstance(); DefaultActionGroup actionGroup = new DefaultActionGroup(); DefaultActionGroup gotoGroup = createGotoGroup(); actionGroup.add(gotoGroup); actionGroup.addSeparator(); actionGroup.add(new DumbAwareAction(EditorBundle.messagePointer("customize.highlighting.level.menu.item")) { @Override public void actionPerformed(@NotNull AnActionEvent e) { JBPopup popup = getConfigureHighlightingLevelPopup(e.getDataContext()); if (popup != null) popup.show(new RelativePoint(comp, new Point(x, y))); } }); if (!UIUtil.uiParents(myEditor.getComponent(), false).filter(EditorWindowHolder.class).isEmpty()) { actionGroup.addSeparator(); actionGroup.add(new ToggleAction(IdeBundle.message("checkbox.show.editor.preview.popup")) { @Override public boolean isSelected(@NotNull AnActionEvent e) { return UISettings.getInstance().getShowEditorToolTip(); } @Override public @NotNull ActionUpdateThread getActionUpdateThread() { return ActionUpdateThread.BGT; } @Override public void setSelected(@NotNull AnActionEvent e, boolean state) { UISettings.getInstance().setShowEditorToolTip(state); UISettings.getInstance().fireUISettingsChanged(); } }); } ActionPopupMenu editorPopup = actionManager.createActionPopupMenu(ActionPlaces.RIGHT_EDITOR_GUTTER_POPUP, actionGroup); if (DaemonCodeAnalyzer.getInstance(myProject).isHighlightingAvailable(file)) { UIEventLogger.DaemonEditorPopupInvoked.log(myProject); editorPopup.getComponent().show(comp, x, y); } }