List<VirtualFile> (final Collection<VirtualFile> files) { final List<VirtualFile> writable = new ArrayList<>(); for (VirtualFile vf : files) { if (myVcs.equals(myPlVcsManager.getVcsFor(vf))) { writable.add(vf); } } final ReadonlyStatusHandler.OperationStatus operationStatus = ReadonlyStatusHandler.getInstance(myVcs.getProject()).ensureFilesWritable(writable); writable.removeAll(Arrays.asList(operationStatus.getReadonlyFiles())); return writable; }