AnActionEvent (AnAction action, final VirtualFile[] files, final Project project) { return AnActionEvent.createFromAnAction(action, null, "", dataId -> { if (CommonDataKeys.VIRTUAL_FILE_ARRAY.is(dataId)) return files; if (CommonDataKeys.PROJECT.is(dataId)) return project; return null; }); }