PatternModel (@NotNull PsiClass record, @NotNull PsiElement context) { JavaCodeStyleManager manager = JavaCodeStyleManager.getInstance(record.getProject()); List<String> names = ContainerUtil.map(record.getRecordComponents(), cmp -> manager.suggestUniqueVariableName(cmp.getName(), context, true)); return new PatternModel(record, names); }