-
Notifications
You must be signed in to change notification settings - Fork 20
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
#258 Refactor theia integration code base #84
Merged
Merged
Conversation
This file contains 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
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
a39f75f
to
02f7c23
Compare
planger
approved these changes
Aug 10, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, thanks a lot!
Much less boilerplate code and much cleaner. Thanks again!
packages/theia-integration/src/browser/diagram/glsp-diagram-manager.ts
Outdated
Show resolved
Hide resolved
packages/theia-integration/src/browser/diagram/glsp-diagram-manager.ts
Outdated
Show resolved
Hide resolved
packages/theia-integration/src/browser/glsp-theia-container-module.ts
Outdated
Show resolved
Hide resolved
packages/theia-integration/src/browser/glsp-theia-container-module.ts
Outdated
Show resolved
Hide resolved
packages/theia-integration/src/browser/glsp-theia-container-module.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Philip Langer <planger@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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:
GLSPTheiaSprottyConnector
toTheiaGLSPConnector
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.GLSPModule
is implemented on server sideGLSPDiagramLanguage
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.Additional changes:
name
property in GLSPClient and GLSPServer contributionfileExtensions
property form glsp-client-contribution.ts@eclipse-glsp/theia-integration
.Requires eclipse-glsp/glsp-client/pull/130
Fixes eclipse-glsp/glsp/issues/258