File tree 3 files changed +6
-11
lines changed
intellij-client/src/main/kotlin/dev/robotcode/robotcode4ij
3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import kotlinx.coroutines.flow.onEach
15
15
class RobotCodePostStartupActivity : ProjectActivity {
16
16
override suspend fun execute (project : Project ) {
17
17
project.langServerManager.start()
18
- project.testManger.refresh ()
18
+ project.testManger.refreshDebounced ()
19
19
20
20
VirtualFileManager .getInstance().addAsyncFileListener(RobotCodeVirtualFileListener (project), project.testManger)
21
21
@@ -24,7 +24,7 @@ class RobotCodePostStartupActivity : ProjectActivity {
24
24
if (moduleChanges.filterIsInstance<EntityChange .Replaced <ModuleEntity >>().isNotEmpty()) {
25
25
project.checkPythonAndRobotVersion(true )
26
26
project.langServerManager.restart()
27
- project.testManger.refresh ()
27
+ project.testManger.refreshDebounced ()
28
28
}
29
29
}.collect()
30
30
}
Original file line number Diff line number Diff line change @@ -47,11 +47,6 @@ class RobotCodeProjectSettingsConfigurable(private val project: Project) : Bound
47
47
}.rowComment(" Specifies robot execution mode. Corresponds to the `--rpa` or `--norpa` option of __robot__." )
48
48
}
49
49
group(" Editing" ) { // TODO: not supported in IntelliJ
50
- // group("Editor") {
51
- // row {
52
- // checkBox("4 Spaces Tab").bindSelected(settings::editor4SpacesTab)
53
- // }.rowComment("If actived insert 4 spaces if TAB is pressed.")
54
- // }
55
50
group(" Completion" ) {
56
51
row {
57
52
checkBox(" Filter Default Language" ).bindSelected(settings::completionFilterDefaultLanguage)
@@ -101,14 +96,12 @@ class RobotCodeProjectConfiguration :
101
96
}
102
97
103
98
class ProjectState : BaseState () {
104
- // TODO var editor4SpacesTab by property(defaultValue = true)
105
99
var completionFilterDefaultLanguage by property(defaultValue = false )
106
100
var completionHeaderStyle by string()
107
101
var inlayHintsParameterNames by property(defaultValue = false )
108
102
var inlayHintsNamespaces by property(defaultValue = false )
109
103
}
110
104
111
- // TODO var editor4SpacesTab by delegate(ProjectState::editor4SpacesTab)
112
105
var completionFilterDefaultLanguage by delegate(ProjectState ::completionFilterDefaultLanguage)
113
106
var completionHeaderStyle by stringDelegate(ProjectState ::completionHeaderStyle)
114
107
var inlayHintsParameterNames by delegate(ProjectState ::inlayHintsParameterNames)
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ import dev.robotcode.robotcode4ij.psi.RobotSuiteFile
32
32
import dev.robotcode.robotcode4ij.utils.escapeRobotGlob
33
33
import kotlinx.coroutines.CoroutineScope
34
34
import kotlinx.coroutines.Dispatchers
35
+ import kotlinx.coroutines.ExperimentalCoroutinesApi
35
36
import kotlinx.coroutines.Job
36
37
import kotlinx.coroutines.delay
37
38
import kotlinx.coroutines.launch
@@ -114,7 +115,8 @@ import java.util.*
114
115
}
115
116
}
116
117
117
- private val refreshScope = CoroutineScope (Dispatchers .Default )
118
+ @OptIn(ExperimentalCoroutinesApi ::class )
119
+ private val refreshScope = CoroutineScope (Dispatchers .IO .limitedParallelism(1 ))
118
120
119
121
fun refreshDebounced (file : VirtualFile ) {
120
122
if (! project.isOpen || project.isDisposed) {
@@ -129,7 +131,7 @@ import java.util.*
129
131
}
130
132
if (refreshJob != null ) {
131
133
thisLogger().info(" Cancelling previous refresh job" )
132
- runBlocking { refreshJob?.join() }
134
+ // runBlocking { refreshJob?.join() }
133
135
}
134
136
refreshJobs[file] = refreshScope.launch {
135
137
delay(DEBOUNCE_DELAY )
You can’t perform that action at this time.
0 commit comments