IDEA-141164 Ability to generate code inferred annotations

abort when the file is non-writable
This commit is contained in:
peter
2015-07-29 11:08:38 +02:00
parent fb7cae9614
commit fb98ebd7c8
@@ -84,7 +84,7 @@ public class MakeInferredAnnotationExplicit extends BaseIntentionAction {
final Module module = ModuleUtilCore.findModuleForPsiElement(file);
assert module != null;
FileModificationService.getInstance().preparePsiElementForWrite(owner);
if (!FileModificationService.getInstance().preparePsiElementForWrite(owner)) return;
final JavaPsiFacade facade = JavaPsiFacade.getInstance(project);