[java-analysis] InferNullityAnnotationsAction: better behavior when nothing was found

GitOrigin-RevId: 974ee800b075c09118a2f87551da45d41cdf33fa
This commit is contained in:
Tagir Valeev
2023-11-28 13:27:32 +01:00
committed by intellij-monorepo-bot
parent 8c478f8da1
commit 55fb552005

View File

@@ -271,9 +271,13 @@ public class InferNullityAnnotationsAction extends BaseAnalysisAction {
};
CommandProcessor.getInstance()
.executeCommand(project, command, JavaBundle.message("action.title.infer.nullity.annotations"), null);
NOTIFICATION_GROUP.createNotification(JavaBundle.message("notification.content.added.annotations", command.myCount),
NotificationType.INFORMATION)
.notify(project);
if (command.myCount == 0) {
NullityInferrer.nothingFoundMessage(project);
} else {
NOTIFICATION_GROUP.createNotification(JavaBundle.message("notification.content.added.annotations", command.myCount),
NotificationType.INFORMATION)
.notify(project);
}
}
else {
NullityInferrer.nothingFoundMessage(project);