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

Reduce boilerplate code for creating a new glsp theia diagram editor #258

Closed
tortmayr opened this issue Jul 11, 2021 · 0 comments · Fixed by eclipse-glsp/glsp-theia-integration#84
Labels

Comments

@tortmayr
Copy link
Contributor

Currently we have to setup a lot of boilerplate configuration classes in order to implement a new GLSP Theia Diagram Editor.
We should have a look at these classes and try to simply the necessary setup.

@tortmayr tortmayr added the theia label Jul 11, 2021
@tortmayr tortmayr added this to the 1.0.0 Graduation Release milestone Jul 11, 2021
tortmayr added a commit to eclipse-glsp/glsp-client that referenced this issue Aug 10, 2021
A client is already uniquely identified via its id, there is no need for an additional name property. In our current implementing projects the name property is always equal to the id and therefore redundant.

Part of eclipse-glsp/glsp/issues/258
tortmayr added a commit to eclipse-glsp/glsp-theia-integration that referenced this issue Aug 10, 2021
Reactor the theia integration code base to reduce boilerplate configuration code and make the setup of a new GLSP theia diagram editor easier

Major changes:
- Rename `GLSPTheiaSprottyConnector` to `TheiaGLSPConnector` and refactor the implementation to enable injecton of connectors (instead of the previous constructor-based approach). The connector is injected into the corresponding diagram container in the diagram configuration.
- Implement  a reusable and easy reconfigurable convenience container module ('GLSPTheiaFrontendModule') that setups the necessary module configuration for a GLSP theia diagram implementation and serves as a documented entry point for users. Similar to how the `GLSPModule` is implemented on server side
- Introduced `GLSPDiagramLanguage` interface to capture configuration constants for a diagram integration. The 'GLSPTheiaFrontendModule' uses this for configuration. This replaces the previous best-practice approach of keeping a namespace with configuration constants in the common-package.
- The 'GLSPDiagramClient' API is no longer needed and for the base use case it's no longer necessary to explicitly bind a diagram manager glsp client contribution or theia-glsp connector. 

Additional changes:
- Remove redundant `name` property in GLSPClient and GLSPServer contribution
- Refactor TheiaJsonrpcClient
- Remove unused `fileExtensions` property form glsp-client-contribution.ts
- Rename files so that the file name is aligned with the name of the central component in the .ts file (Theia Coding Convention)
- Defined lib/browser as main entry point  for `@eclipse-glsp/theia-integration`. 

Requires eclipse-glsp/glsp-client/pull/130
Fixes eclipse-glsp/glsp/issues/258
tortmayr added a commit to eclipse-glsp/glsp-client that referenced this issue Aug 10, 2021
A client is already uniquely identified via its id, there is no need for an additional name property. In our current implementing projects the name property is always equal to the id and therefore redundant.

Part of eclipse-glsp/glsp/issues/258
tortmayr added a commit to eclipse-glsp/glsp-theia-integration that referenced this issue Aug 10, 2021
Reactor the theia integration code base to reduce boilerplate configuration code and make the setup of a new GLSP theia diagram editor easier

Major changes:
- Rename `GLSPTheiaSprottyConnector` to `TheiaGLSPConnector` and refactor the implementation to enable injecton of connectors (instead of the previous constructor-based approach). The connector is injected into the corresponding diagram container in the diagram configuration.
- Implement  a reusable and easy reconfigurable convenience container module ('GLSPTheiaFrontendModule') that setups the necessary module configuration for a GLSP theia diagram implementation and serves as a documented entry point for users. Similar to how the `GLSPModule` is implemented on server side
- Introduced `GLSPDiagramLanguage` interface to capture configuration constants for a diagram integration. The 'GLSPTheiaFrontendModule' uses this for configuration. This replaces the previous best-practice approach of keeping a namespace with configuration constants in the common-package.
- The 'GLSPDiagramClient' API is no longer needed and for the base use case it's no longer necessary to explicitly bind a diagram manager glsp client contribution or theia-glsp connector. 

Additional changes:
- Remove redundant `name` property in GLSPClient and GLSPServer contribution
- Refactor TheiaJsonrpcClient
- Remove unused `fileExtensions` property form glsp-client-contribution.ts
- Rename files so that the file name is aligned with the name of the central component in the .ts file (Theia Coding Convention)
- Defined lib/browser as main entry point  for `@eclipse-glsp/theia-integration`. 

Requires eclipse-glsp/glsp-client/pull/130
Fixes eclipse-glsp/glsp/issues/258
tortmayr added a commit to eclipse-glsp/glsp-theia-integration that referenced this issue Aug 10, 2021
* #258 Refactor theia integration code base

Reactor the theia integration code base to reduce boilerplate configuration code and make the setup of a new GLSP theia diagram editor easier

Major changes:
- Rename `GLSPTheiaSprottyConnector` to `TheiaGLSPConnector` and refactor the implementation to enable injecton of connectors (instead of the previous constructor-based approach). The connector is injected into the corresponding diagram container in the diagram configuration.
- Implement  a reusable and easy reconfigurable convenience container module ('GLSPTheiaFrontendModule') that setups the necessary module configuration for a GLSP theia diagram implementation and serves as a documented entry point for users. Similar to how the `GLSPModule` is implemented on server side
- Introduced `GLSPDiagramLanguage` interface to capture configuration constants for a diagram integration. The 'GLSPTheiaFrontendModule' uses this for configuration. This replaces the previous best-practice approach of keeping a namespace with configuration constants in the common-package.
- The 'GLSPDiagramClient' API is no longer needed and for the base use case it's no longer necessary to explicitly bind a diagram manager glsp client contribution or theia-glsp connector. 

Additional changes:
- Remove redundant `name` property in GLSPClient and GLSPServer contribution
- Refactor TheiaJsonrpcClient
- Remove unused `fileExtensions` property form glsp-client-contribution.ts
- Rename files so that the file name is aligned with the name of the central component in the .ts file (Theia Coding Convention)
- Defined lib/browser as main entry point  for `@eclipse-glsp/theia-integration`. 

Requires eclipse-glsp/glsp-client/pull/130
Fixes eclipse-glsp/glsp/issues/258

* Apply suggestions from code review

Co-authored-by: Philip Langer <planger@users.noreply.github.com>

Co-authored-by: Philip Langer <planger@users.noreply.github.com>
holkerveen pushed a commit to holkerveen/glsp-client that referenced this issue Dec 21, 2024
A client is already uniquely identified via its id, there is no need for an additional name property. In our current implementing projects the name property is always equal to the id and therefore redundant.

Part of eclipse-glsp/glsp/issues/258
holkerveen pushed a commit to holkerveen/glsp-client that referenced this issue Dec 21, 2024
A client is already uniquely identified via its id, there is no need for an additional name property. In our current implementing projects the name property is always equal to the id and therefore redundant.

Part of eclipse-glsp/glsp/issues/258
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant