Skip to content

Commit ac21b55

Browse files
committed
Notify client about class path updates
1 parent aa3df44 commit ac21b55

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

server/src/main/kotlin/org/javacs/kt/KotlinLanguageServer.kt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,30 @@ class KotlinLanguageServer : LanguageServer, LanguageClientAware, Closeable {
8888

8989
params.workDoneToken?.let {
9090
client.notifyProgress(ProgressParams(it, WorkDoneProgressReport().apply {
91-
message = "$progressPrefix: Updating source and class path"
91+
message = "$progressPrefix: Updating source path"
9292
percentage = progressPercent
9393
}))
9494
}
9595

9696
val root = Paths.get(parseURI(folder.uri))
9797
sourceFiles.addWorkspaceRoot(root)
9898

99+
params.workDoneToken?.let {
100+
client.notifyProgress(ProgressParams(it, WorkDoneProgressReport().apply {
101+
message = "$progressPrefix: Updating class path"
102+
percentage = progressPercent
103+
}))
104+
}
105+
99106
val refreshed = classPath.addWorkspaceRoot(root)
100107
if (refreshed) {
108+
params.workDoneToken?.let {
109+
client.notifyProgress(ProgressParams(it, WorkDoneProgressReport().apply {
110+
message = "$progressPrefix: Refreshing source path"
111+
percentage = progressPercent
112+
}))
113+
}
114+
101115
sourcePath.refresh()
102116
}
103117
}

0 commit comments

Comments
 (0)