void (@NotNull AnActionEvent e) { Project project = e.getData(CommonDataKeys.PROJECT); assert project != null; Editor editor = e.getData(CommonDataKeys.EDITOR_EVEN_IF_INACTIVE); if (Boolean.TRUE.equals(e.getData(PlatformCoreDataKeys.IS_MODAL_CONTEXT))) { GotoLineNumberDialog dialog = new EditorGotoLineNumberDialog(project, editor); dialog.show(); } else { CommandProcessor processor = CommandProcessor.getInstance(); processor.executeCommand( project, () -> { GotoLineNumberDialog dialog = new EditorGotoLineNumberDialog(project, editor); dialog.show(); IdeDocumentHistory.getInstance(project).includeCurrentCommandAsNavigation(); }, IdeBundle.message("command.go.to.line"), null ); } }