AnActionEvent (@NotNull PsiElement element) { DataContext dataContext = SimpleDataContext.builder() .add(CommonDataKeys.PROJECT, element.getProject()) .add(CommonDataKeys.PSI_ELEMENT, element) .build(); AnActionEvent event = AnActionEvent.createFromDataContext(ActionPlaces.UNKNOWN, null, dataContext); Utils.initUpdateSession(event); return event; }