void (final Collection<? extends VirtualFile> files, String changelist) { ApplicationManager.getApplication().runWriteAction(() -> { List<VirtualFile> toRefresh = new ArrayList<>(files.size()); for (VirtualFile file : files) { try { ReadOnlyAttributeUtil.setReadOnlyAttribute(file, false); toRefresh.add(file); } catch (IOException ignored) { } } if (!toRefresh.isEmpty()) { RefreshQueue.getInstance().refresh(false, false, null, toRefresh); } }); }