RefactoringEventData (UsageInfo @NotNull [] usages) { final List<PsiElement> elements = new ArrayList<>(); for (UsageInfo usage : usages) { elements.add(usage.getElement()); } RefactoringEventData data = new RefactoringEventData(); data.addElements(elements); return data; }