call delegate on build targets change

This commit is contained in:
Richard Howell
2019-10-04 16:03:43 -07:00
parent ec9681023e
commit 1d7858e023
6 changed files with 24 additions and 4 deletions

View File

@@ -126,9 +126,14 @@ final class BuildServerHandler: LanguageServerEndpoint {
public weak var delegate: BuildSystemDelegate? = nil
override func _registerBuiltinHandlers() {
_register(BuildServerHandler.handleBuildTargetsChanged)
_register(BuildServerHandler.handleFileOptionsChanged)
}
func handleBuildTargetsChanged(_ notification: Notification<BuildTargetsChangedNotification>) {
self.delegate?.buildTargetsChanged(notification.params.changes)
}
func handleFileOptionsChanged(_ notification: Notification<FileOptionsChangedNotification>) {
// TODO: add delegate method to include the changed settings directly
self.delegate?.fileBuildSettingsChanged([notification.params.uri])