private boolean ensureUsagesWritable(Collection<? extends Usage> selectedUsages) {
    Set<VirtualFile> files = new HashSet<>();
    for (Usage usage : selectedUsages) {
      final VirtualFile file = ((UsageInFile)usage).getFile();
      files.add(file);
    }

    return !ReadonlyStatusHandler.getInstance(myProject).ensureFilesWritable(files).hasReadonlyFiles();
  }
private boolean ensureUsagesWritable(Collection<? extends Usage> selectedUsages)