Skip to content

Commit 4eafcad

Browse files
authored
use markDirtyAndRefresh (#371)
1 parent 12470a1 commit 4eafcad

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

clion-plugin/src/main/kotlin/org/utbot/cpp/clion/plugin/ui/wizard/UTBotWizard.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class UTBotWizard(private val project: Project) : AbstractWizard<UTBotBaseWizard
1919

2020
init {
2121
addStep(IntroStep())
22-
addStep(ConnectionStep(project, mySettingsModel, disposable))
22+
addStep(ConnectionStep(project, mySettingsModel))
2323
addStep(BuildOptionsStep(mySettingsModel))
2424
addStep(FinalStep())
2525
super.init()

clion-plugin/src/main/kotlin/org/utbot/cpp/clion/plugin/utils/FileUtils.kt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
package org.utbot.cpp.clion.plugin.utils
22

3-
import com.intellij.openapi.application.ApplicationManager
4-
import com.intellij.openapi.vfs.LocalFileSystem
3+
import com.intellij.openapi.vfs.VfsUtil
54
import com.intellij.util.io.createFile
65
import com.intellij.util.io.exists
76
import kotlin.io.path.writeText
87
import java.nio.file.Path
98

10-
fun refreshAndFindNioFile(file: Path) {
11-
ApplicationManager.getApplication().invokeLater {
12-
LocalFileSystem.getInstance()?.refreshAndFindFileByNioFile(file)
13-
}
9+
fun refreshAndFindNioFile(path: Path, async: Boolean = true, recursive: Boolean = true, reloadChildren: Boolean = true) {
10+
VfsUtil.markDirtyAndRefresh(async, recursive, reloadChildren, path.toFile())
1411
}
1512

1613
fun createFileWithText(filePath: Path, text: String) {

0 commit comments

Comments
 (0)