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

#315 Refactor base protocol #123

Merged
merged 1 commit into from
Aug 16, 2021
Merged

#315 Refactor base protocol #123

merged 1 commit into from
Aug 16, 2021

Conversation

tortmayr
Copy link
Contributor

Refactor the base communication protocol to support initializing and disposing a client session for a given language. The method parameters are encapsulated in dedicated parameter objects to provide a stable API. Refactor the existing initialize method to return void instead of a boolean and use a generic args map for custom arguments instead of a dedicated object. In addition, the protocol version that is implemented by the client is now passed as part of the InitializeParameters

Other fixes/improvements:

  • Fixed code template for new files. Used ${year} variable for the copyright header instead of hard coded 2020 string.
  • Refactor ActionRegistry to use Class instead of dedicated action instances.
  • Fixed bug in "Disposable". Previously the 'disposed' flag was not set correctly
  • Refactor ClientOptions util class and extract a generic MapUtil class.

Part of eclipse-glsp/glsp/issues/315

Copy link
Member

@planger planger left a comment

Choose a reason for hiding this comment

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

Thanks, looks good to me! 👍

@planger
Copy link
Member

planger commented Aug 13, 2021

Thanks for the great work! Looks good, local build and tests work fine!

@tortmayr
Copy link
Contributor Author

Thanks for the review Philip, I have made some additional changes to the protocol. Could you please re-review?

@tortmayr tortmayr requested a review from planger August 15, 2021 12:38
Copy link
Member

@planger planger left a comment

Choose a reason for hiding this comment

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

Thanks, looks good to me! 👍

Refactor the base communication protocol to support initializing and disposing a client session for a given language. The method parameters are encapsulated in dedicated parameter objects to provide a stable API. Refactor the existing `initialize` method to return void instead of a boolean and use a generic args map for custom arguments instead of a dedicated object. In addition, the protocol version that is implemented by the client is now passed as part of the `InitializeParameters`

Other fixes/improvements:
- Fixed code template for new files. Used  ${year} variable for the copyright header instead of hard coded 2020 string.
- Refactor `ActionRegistry` to use Class<Action> instead of dedicated action instances.
- Fixed bug in "Disposable". Previously the 'disposed' flag was not set correctly
- Refactor `ClientOptions` util class and extract a generic `MapUtil`  class.
- Merge `GLSPServer` and `GLSPJsonRpcServer` interfaces. There is no need of a dediacted subinterface because the GLSPServer interface is already tailored for JSON-RPC and not generically reuseable.
- Improve documentation for protocol components and related classes.
Part of eclipse-glsp/glsp/issues/315
@tortmayr tortmayr merged commit d2079c2 into master Aug 16, 2021
@tortmayr tortmayr deleted the tortmayr/di-rework branch August 16, 2021 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants