void (@NotNull Project project, @NotNull VirtualFile ignoreFileRoot, @NotNull IgnoredFileContentProvider ignoredFileContentProvider, @NotNull Runnable writeToIgnoreFile) { PropertiesComponent propertiesComponent = PropertiesComponent.getInstance(project); VcsApplicationSettings applicationSettings = VcsApplicationSettings.getInstance(); synchronized (myNotificationLock) { if (myNotification != null && myIgnoreFileRootNotificationShowFor != null && !myNotification.isExpired() && myIgnoreFileRootNotificationShowFor.equals(ignoreFileRoot)) { return; } myIgnoreFileRootNotificationShowFor = ignoreFileRoot; myNotification = VcsNotifier.getInstance(project).notifyMinorInfo( MANAGE_IGNORE_FILES, true, "", VcsBundle.message("ignored.file.manage.message", ApplicationNamesInfo.getInstance().getFullProductName(), ignoredFileContentProvider.getFileName()), NotificationAction.create(VcsBundle.messagePointer("ignored.file.manage.this.project"), (event, notification) -> { writeToIgnoreFile.run(); propertiesComponent.setValue(MANAGE_IGNORE_FILES_PROPERTY, true); propertiesComponent.setValue(ASKED_MANAGE_IGNORE_FILES_PROPERTY, true); synchronized (myNotificationLock) { notification.expire(); myIgnoreFileRootNotificationShowFor = null; } }), NotificationAction.create(VcsBundle.messagePointer("ignored.file.manage.all.project"), (event, notification) -> { writeToIgnoreFile.run(); applicationSettings.MANAGE_IGNORE_FILES = true; propertiesComponent.setValue(ASKED_MANAGE_IGNORE_FILES_PROPERTY, true); synchronized (myNotificationLock) { notification.expire(); myIgnoreFileRootNotificationShowFor = null; } }), NotificationAction.create(VcsBundle.messagePointer("ignored.file.manage.notmanage"), (event, notification) -> { propertiesComponent.setValue(ASKED_MANAGE_IGNORE_FILES_PROPERTY, true); synchronized (myNotificationLock) { notification.expire(); myIgnoreFileRootNotificationShowFor = null; } })); } }