PsiAnnotation (Project project) { if (myAnnotation == null) return null; return CachedValuesManager.getManager(project).getCachedValue(project, myKey, () -> { PsiAnnotation annotation = JavaPsiFacade.getElementFactory(project).createAnnotationFromText("@" + myAnnotation, null); ((LightVirtualFile)annotation.getContainingFile().getViewProvider().getVirtualFile()).setWritable(false); return CachedValueProvider.Result.create(annotation, ModificationTracker.NEVER_CHANGED); }, false); }