void () { addLibrary("/content/annoMultiRoot/root1", "/content/annoMultiRoot/root2"); myFixture.configureByFiles("content/annoMultiRoot/root1/multiRoot/annotations.xml", "content/annoMultiRoot/root2/multiRoot/annotations.xml"); myFixture.configureByFiles("lib/multiRoot/Test.java"); final ExternalAnnotationsManager manager = ExternalAnnotationsManager.getInstance(myFixture.getProject()); final PsiMethod method = ((PsiJavaFile)myFixture.getFile()).getClasses()[0].getMethods()[0]; final PsiParameter parameter = method.getParameterList().getParameters()[0]; assertMethodAndParameterAnnotationsValues(manager, method, parameter, "\"foo\""); final PsiAnnotation annotationFromText = JavaPsiFacade.getElementFactory(myFixture.getProject()).createAnnotationFromText("@Annotation(value=\"bar\")", null); startListening(method, AnnotationUtil.NULLABLE, true); manager.editExternalAnnotation(method, AnnotationUtil.NULLABLE, annotationFromText.getParameterList().getAttributes()); stopListeningAndCheckEvents(); startListening(parameter, AnnotationUtil.NOT_NULL, true); manager.editExternalAnnotation(parameter, AnnotationUtil.NOT_NULL, annotationFromText.getParameterList().getAttributes()); stopListeningAndCheckEvents(); assertMethodAndParameterAnnotationsValues(manager, method, parameter, "\"bar\""); myFixture.checkResultByFile("content/annoMultiRoot/root1/multiRoot/annotations.xml", "content/annoMultiRoot/root1/multiRoot/annotations_after.xml", false); myFixture.checkResultByFile("content/annoMultiRoot/root2/multiRoot/annotations.xml", "content/annoMultiRoot/root2/multiRoot/annotations_after.xml", false); }