Skip to content
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

Refactor: Remove connection from class members etc #36

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

WilsonZiweiWang
Copy link
Collaborator

@WilsonZiweiWang WilsonZiweiWang commented Oct 25, 2023

1.OutputParser and serverNotificationManager don't need to instantiate with connection. The connection can be set on start up. Plus, some classes only need one instance, I export one from the file where the class is defined to make sure everywhere else can reference the same instance.
2.documentAsTextMap and Analyzer's uriToAnalyzedDocument have some similarities. They can be merged later. For now, they can both be members of the Analyzer
2. Analyzer's uriToAnalyzedDocument already has a TextDocument object, so I use it to replace the documentAsTextMap
3. onDefinitionHandler is put in its own file for better testing

server/src/server.ts Outdated Show resolved Hide resolved
server/src/server.ts Show resolved Hide resolved
server/src/OutputParser.ts Show resolved Hide resolved
server/src/OutputParser.ts Outdated Show resolved Hide resolved
@WilsonZiweiWang WilsonZiweiWang force-pushed the Feature-10098-definition-provider branch 2 times, most recently from aae37f9 to 4b475d5 Compare October 25, 2023 21:48
@WilsonZiweiWang WilsonZiweiWang force-pushed the Feature-10098-definition-provider branch from 4b475d5 to ded6b0a Compare October 26, 2023 19:31
OutputParser and serverNotificationManager don't need to instantiate
with connection. The connection can be set on start up.
Use Analyzer's uriToAnalyzedDocument for returning document texts to replace documentAsTextMap
onDefinitionHandler is in its own file for better testing
@WilsonZiweiWang WilsonZiweiWang force-pushed the Feature-10098-definition-provider branch from ded6b0a to 24d9d28 Compare October 26, 2023 19:32
@WilsonZiweiWang WilsonZiweiWang merged commit 2f9fdd0 into staging Oct 26, 2023
1 check passed
@deribaucourt deribaucourt deleted the Feature-10098-definition-provider branch November 2, 2023 15:51
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.

3 participants