getContainingFile() and getProject() have to be executed under read lock