void (Collection<VirtualFile> filesToAllow, Collection<VirtualFile> filesToDeny) { ServiceContainerUtil.registerExtension(getProject(), NonProjectFileWritingAccessExtension.EP_NAME, new NonProjectFileWritingAccessExtension() { @Override public boolean isWritable(@NotNull VirtualFile file) { return filesToAllow.contains(file); } @Override public boolean isNotWritable(@NotNull VirtualFile file) { return filesToDeny.contains(file); } }, getProject()); }