Set<VirtualFile> () { Set<Usage> usages = getReadOnlyUsages(); Set<VirtualFile> result = new HashSet<>(); for (Usage usage : usages) { if (usage instanceof UsageInFile usageInFile) { VirtualFile file = usageInFile.getFile(); if (file != null && file.isValid()) result.add(file); } if (usage instanceof UsageInFiles usageInFiles) { ContainerUtil.addAll(result, usageInFiles.getFiles()); } } for (UsageTarget target : myTargets) { VirtualFile[] files = target.getFiles(); if (files == null) continue; ContainerUtil.addAll(result, files); } return result; }