mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
vcs-ignore: mute ignored to exclude notification
Mute showing "ignored to exclude" notification. Preserve "mark ignored directories as excluded" setting so it could be turn-on explicitly by the user. GitOrigin-RevId: 8d1b17446218c623df691edbea00b84033608e4a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
185ed338cc
commit
4116a70a23
@@ -77,6 +77,8 @@ class IgnoredToExcludedSynchronizer(project: Project, parentDisposable: Disposab
|
||||
}
|
||||
|
||||
override fun doActionOnChosenFiles(files: Collection<VirtualFile>) {
|
||||
if (files.isEmpty()) return
|
||||
|
||||
markIgnoredAsExcluded(files)
|
||||
}
|
||||
|
||||
@@ -93,7 +95,6 @@ class IgnoredToExcludedSynchronizer(project: Project, parentDisposable: Disposab
|
||||
override fun updateFinished(ignoredPaths: Collection<FilePath>, isFullRescan: Boolean) {
|
||||
ProgressManager.checkCanceled()
|
||||
if (!isFullRescan) return
|
||||
if (!Registry.`is`("vcs.propose.add.ignored.directories.to.exclude", true)) return
|
||||
if (!VcsConfiguration.getInstance(project).MARK_IGNORED_AS_EXCLUDED && wasAskedBefore()) return
|
||||
|
||||
processIgnored(ignoredPaths)
|
||||
@@ -113,7 +114,13 @@ class IgnoredToExcludedSynchronizer(project: Project, parentDisposable: Disposab
|
||||
//do not propose to exclude if there is a source root inside
|
||||
.filterNot { ignored -> sourceRoots.contains(ignored) }
|
||||
.toList()
|
||||
processFiles(ignoredDirs)
|
||||
|
||||
if (allowShowNotification()) {
|
||||
processFiles(ignoredDirs)
|
||||
}
|
||||
else if (needDoForCurrentProject()) {
|
||||
doActionOnChosenFiles(doFilterFiles(ignoredDirs))
|
||||
}
|
||||
}
|
||||
|
||||
private fun markIgnoredAsExcluded(files: Collection<VirtualFile>) {
|
||||
@@ -129,6 +136,8 @@ class IgnoredToExcludedSynchronizer(project: Project, parentDisposable: Disposab
|
||||
}
|
||||
}
|
||||
|
||||
private fun allowShowNotification() = Registry.`is`("vcs.propose.add.ignored.directories.to.exclude", true)
|
||||
|
||||
private fun getProjectSourceRoots() =
|
||||
runReadAction { OrderEnumerator.orderEntries(project).withoutSdk().withoutLibraries().sources().usingCache().roots }
|
||||
|
||||
|
||||
@@ -529,7 +529,7 @@ vcs.code.analysis.before.checkin.show.only.new.threshold.description=Show only n
|
||||
vcs.process.externally.added.files=true
|
||||
vcs.process.externally.added.files.description=Process externally added files. Add such files to VCS automatically or prompt user.
|
||||
|
||||
vcs.propose.add.ignored.directories.to.exclude=true
|
||||
vcs.propose.add.ignored.directories.to.exclude=false
|
||||
vcs.propose.add.ignored.directories.to.exclude.description=Show notification with proposal to add ignored (but not excluded) directories to exclude.
|
||||
|
||||
psi.incremental.reparse.depth.limit=1000
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.intellij.ide.util.PropertiesComponent
|
||||
import com.intellij.openapi.options.BoundConfigurable
|
||||
import com.intellij.openapi.options.SearchableConfigurable
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.registry.Registry
|
||||
import com.intellij.openapi.vcs.VcsApplicationSettings
|
||||
import com.intellij.openapi.vcs.VcsBundle.message
|
||||
import com.intellij.openapi.vcs.VcsConfiguration
|
||||
@@ -56,7 +55,7 @@ internal class IgnoredSettingsPanel(private val project: Project) : BoundConfigu
|
||||
}
|
||||
row {
|
||||
checkBox(message("ignored.file.ignored.to.excluded.label"), projectSettings::MARK_IGNORED_AS_EXCLUDED)
|
||||
}.visible = Registry.`is`("vcs.propose.add.ignored.directories.to.exclude", true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user