We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da46ca9 commit 9fcc3a7Copy full SHA for 9fcc3a7
server/src/main/kotlin/org/javacs/kt/SourcePath.kt
@@ -68,6 +68,12 @@ class SourcePath(
68
69
fun compile() = parse().apply { doCompile() }
70
71
+ fun compileIfInitialized() {
72
+ if (parsed != null) {
73
+ compile()
74
+ }
75
76
+
77
private fun doCompile() {
78
LOG.debug("Compiling {}", path?.fileName)
79
@@ -196,11 +202,11 @@ class SourcePath(
196
202
}
197
203
198
204
/**
199
- * Recompiles ALL files.
205
+ * Recompiles all source files that are initialized.
200
206
*/
201
207
fun refresh() {
208
LOG.info("Refreshing source path")
- files.values.forEach { it.compile() }
209
+ files.values.forEach { it.compileIfInitialized() }
210
211
212
0 commit comments