Skip to content

clion plugin: fix: connection settings change in one project enables plugin for another project #515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ class ManagedClient(val project: Project) : Disposable {
})
subscribe(ConnectionSettingsListener.TOPIC, object : ConnectionSettingsListener {
override fun connectionSettingsChanged(newPort: Int, newServerName: String) {
// Connection settings are global for all projects, so when they are changed in one project
// we should not start the client
if (!project.settings.storedSettings.isPluginEnabled)
return
if (newPort != client?.port || newServerName != client?.serverName) {
project.logger.trace { "Connection settings changed. Setting up new client." }
client?.dispose()
Expand Down