You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What problem did you solve?
Implements the refactoring suggested in #479.
How can I check this pull request?
This PR is not intended to change the behavior of the extension.
I also changed the imports at the top of extension.ts to namespace imports:
Improves the readibility of the code
Makes it easier to keep track of where each function comes from
Makes life easier for developers. E.g.
you can use intellisense to access imported functions (e.g. vscode. + ctrl+space to view all exported variables from vscode)
it's easier to move code around between files (you only need to add/remove the namespace imports sometimes, previously you had to add/remove each function individually)
Fewer (redundant) changes in Git diffs
If you disagree, this can of course be reverted, but I'd strongly suggest using namespace imports here.
Improves the readibility of the code
Makes it easier to keep track of where each function comes from
@ManuelHentschel Great works! Our source code looks more cleaned.
you can use intellisense to access imported functions (e.g. vscode. + ctrl+space to view all exported variables from vscode)
it's easier to move code around between files (you only need to add/remove the namespace imports sometimes, previously you had to add/remove each function individually)
Good, I denied it before, but it may be better to change the way of thinking.
Fewer (redundant) changes in Git diffs
In other words, we can see the files that got the impact of the main changes.
How about using an asterisk for external packages such as vscode and individual imports for vscode -r packages such as session and util?
How about using an asterisk for external packages such as vscode and individual imports for vscode -r packages such as session and util?
That sounds like a good rule of thumb, although I would still prefer to use namespace imports for vscode-r files when the number of imported functions is rather large (as e.g. in extension.ts).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem did you solve?
Implements the refactoring suggested in #479.
How can I check this pull request?
This PR is not intended to change the behavior of the extension.
I also changed the imports at the top of
extension.tsto namespace imports:vscode.+ctrl+spaceto view all exported variables from vscode)If you disagree, this can of course be reverted, but I'd strongly suggest using namespace imports here.