Skip to content

Refactor onDidChangeConfiguration handler in favor of listener pattern - #212

Merged
Vigilans (Vigilans) merged 3 commits into
masterfrom
vigilans/settings-listener
Nov 26, 2019
Merged

Vigilans (Vigilans) merged 3 commits into
masterfrom
vigilans/settings-listener

Conversation

@Vigilans

Copy link
Copy Markdown
Member

This PR

  • Refactor the onDidChangeConfiguration hanlder in favor oflistener(updatedConfig, oldConfig) pattern.
  • move the old logic into separate listeners
  • makes sure that when a listener gets called, it will receive the latest configuration from Settings.getSomeSetting.

Comment thread src/settings.ts Outdated
return;
}
const oldConfig = this._dependencyConfig;
const updatedConfig = workspace.getConfiguration("java.dependency");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updatedConfig variable is not necessary.

@Vigilans
Vigilans (Vigilans) merged commit 5c4660a into master Nov 26, 2019
@Vigilans
Vigilans (Vigilans) deleted the vigilans/settings-listener branch November 26, 2019 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants