Skip to content

Commit eec8792

Browse files
committed
listen to settings changes
1 parent 3f85061 commit eec8792

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/settings/CodeWhispererSettings.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ class CodeWhispererSettings : PersistentStateComponent<CodeWhispererConfiguratio
9393

9494
fun toggleWorkspaceContextEnabled(value: Boolean, passive: Boolean = false) {
9595
state.value[CodeWhispererConfigurationType.IsWorkspaceContextEnabled] = value
96+
ProjectManager.getInstance().openProjects.forEach {
97+
if (it.isDisposed) {
98+
return@forEach
99+
}
100+
AmazonQLspService.didChangeConfiguration(it)
101+
}
96102
}
97103

98104
fun isWorkspaceContextEnabled() = state.value.getOrDefault(CodeWhispererConfigurationType.IsWorkspaceContextEnabled, true)

0 commit comments

Comments
 (0)