mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] KTIJ-36176 Take auto sync setting into account to sync project
(cherry picked from commit 214a419b18062331768877d66a3b5c7abf09d024) IJ-CR-180848 GitOrigin-RevId: 5a9ef42e6c96f8a02d53122e61707662a5a62846
This commit is contained in:
committed by
intellij-monorepo-bot
parent
37e0fbe6b9
commit
dac22a45c6
+8
@@ -6,6 +6,7 @@ import com.intellij.openapi.application.readAction
|
||||
import com.intellij.openapi.components.Service
|
||||
import com.intellij.openapi.components.service
|
||||
import com.intellij.openapi.externalSystem.autoimport.ExternalSystemProjectTracker
|
||||
import com.intellij.openapi.externalSystem.autoimport.ExternalSystemProjectTrackerSettings
|
||||
import com.intellij.openapi.fileEditor.FileEditorManager
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.project.Project
|
||||
@@ -143,6 +144,13 @@ class KotlinProjectConfigurationService(private val project: Project, private va
|
||||
awaitSyncFinished()
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
fun queueSyncIfPossible() {
|
||||
if (ExternalSystemProjectTrackerSettings.getInstance(project).autoReloadType != ExternalSystemProjectTrackerSettings.AutoReloadType.NONE) {
|
||||
queueSync()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a build tool sync now, provided no sync is currently running.
|
||||
* Otherwise, waits for the current sync to finish and schedules a new sync.
|
||||
|
||||
Reference in New Issue
Block a user