void (@NotNull VirtualFile ignoreFileRoot, @NotNull AbstractVcs vcs, boolean notify) { if (skipGeneration(ignoreFileRoot, notify)) return; IgnoredFileContentProvider ignoredFileContentProvider = VcsImplUtil.findIgnoredFileContentProvider(vcs); if (ignoredFileContentProvider == null) { LOG.debug("Cannot find content provider for vcs " + vcs.getName()); return; } String ignoreFileName = ignoredFileContentProvider.getFileName(); synchronized (myWriteLock) { String ignoreFileContent = ignoredFileContentProvider.buildIgnoreFileContent(ignoreFileRoot, IgnoredFileProvider.IGNORE_FILE.getExtensions()); if (StringUtil.isEmptyOrSpaces(ignoreFileContent)) return; File ignoreFile = getIgnoreFile(ignoreFileRoot, ignoreFileName); if (notify && needAskToManageIgnoreFiles(myProject)) { notifyVcsIgnoreFileManage(myProject, ignoreFileRoot, ignoredFileContentProvider, () -> writeToFile(ignoreFileRoot, ignoreFile, ignoreFileContent, true)); } else { writeToFile(ignoreFileRoot, ignoreFile, ignoreFileContent, false); } } }