void () { NonProjectFileWritingAccessProvider.enableChecksInTests(true, getProject()); VirtualFile nonProjectFile = createProjectFile(); List<VirtualFile> denied = new ArrayList<>(); registerAccessCheckExtension(Collections.emptyList(), denied); denied.add(nonProjectFile); typeAndCheck(nonProjectFile, false); denied.clear(); typeAndCheck(nonProjectFile, true); denied.add(nonProjectFile); typeAndCheck(nonProjectFile, true); // still can edit since it's a recently edited file }