quick solution of "incorrect before run list is set on template RC modification"

This commit is contained in:
Vladimir Krivosheev
2018-04-13 18:12:14 +02:00
parent be6a9822e3
commit 2c0dc32939
@@ -924,14 +924,20 @@ open class RunManagerImpl(internal val project: Project) : RunManagerEx(), Persi
}
else {
val templateConfiguration = getConfigurationTemplate(configuration.factory).configuration
val templateTasks = if (templateConfiguration === configuration) {
val isTemplate = templateConfiguration === configuration
val templateTasks = if (isTemplate) {
getHardcodedBeforeRunTasks(configuration)
}
else {
getTemplateBeforeRunTasks(templateConfiguration)
}
if (templateConfiguration === configuration) {
if (isTemplate) {
if (tasks == templateTasks) {
// nothing is changed
return
}
// we must update all existing configuration tasks to ensure that effective tasks (own + template) are the same as before template configuration change
// see testTemplates test
lock.read {