-
Notifications
You must be signed in to change notification settings - Fork 30
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
GLSP-1116 Revise model loading #287
Conversation
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.
This looks great! I just have a general and a naming question inline.
- Refactor diagram loader - Remove dispatching of temporary empty set model action and instead call `actionDispatcher.initialize()` earlier which also dispatches an empty set model action under the hood - Add additional `postModelInitalization` hook for startup services that want execute logic after the model is fully initialized - Rework `ModelInitializationConstraint` - Provide `onInitialized` override that allows sync registration of listener callbacks - Refactor `setCompleted` method and remove the possiblity to set the initialized state to false. Model initialization is a one-time action. Once initialized there should be no way to "uninitialize" the constraint - Provide test cases - Add `dispatchOnceModelInitialized` utility function to action dispatcher - Ensure that type hints are requested after the model has been initialized Part-of: eclipse-glsp/glsp#1116 Part-of: eclipse-glsp/glsp#606
-Extend `initializeClientSession` request to also specific the set of client action kinds. This way the server knows which actions should be sent to the client -Adapt `GLSPModelSource´ to retrieve the client actions before sending the `initializeClientSession` request - Add customized `GLSPActionHandlerRegistry` which provides a query method to retrieve all handled action kinds Part of eclipse-glsp/glsp/issues/1117
@planger I have also added change for GLSP-1117 and GLSP-1071 to this PR. Since these are also changes that require updatse across all integration projects I would rather do this all in one go instead of having to create multiple PRs per repository. Could you please re-review? |
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.
Thanks, looks good to me! 👍
* GLSP-1116 Revise model loading - Refactor diagram loader - Remove dispatching of temporary empty set model action and instead call `actionDispatcher.initialize()` earlier which also dispatches an empty set model action under the hood - Add additional `postModelInitalization` hook for startup services that want execute logic after the model is fully initialized - Rework `ModelInitializationConstraint` - Provide `onInitialized` override that allows sync registration of listener callbacks - Refactor `setCompleted` method and remove the possiblity to set the initialized state to false. Model initialization is a one-time action. Once initialized there should be no way to "uninitialize" the constraint - Provide test cases - Add `dispatchOnceModelInitialized` utility function to action dispatcher - Ensure that type hints are requested after the model has been initialized Part-of: eclipse-glsp/glsp#1116 Part-of: eclipse-glsp/glsp#606 * GLSP-1117: Remove need for explicit definition of client actions -Extend `initializeClientSession` request to also specific the set of client action kinds. This way the server knows which actions should be sent to the client -Adapt `GLSPModelSource´ to retrieve the client actions before sending the `initializeClientSession` request - Add customized `GLSPActionHandlerRegistry` which provides a query method to retrieve all handled action kinds Part of eclipse-glsp/glsp/issues/1117 * GLSP-1071: Rename ServerStatus/ServerMessage action Part of eclipse-glsp/glsp#1071
* GLSP-1116 Revise model loading - Refactor diagram loader - Remove dispatching of temporary empty set model action and instead call `actionDispatcher.initialize()` earlier which also dispatches an empty set model action under the hood - Add additional `postModelInitalization` hook for startup services that want execute logic after the model is fully initialized - Rework `ModelInitializationConstraint` - Provide `onInitialized` override that allows sync registration of listener callbacks - Refactor `setCompleted` method and remove the possiblity to set the initialized state to false. Model initialization is a one-time action. Once initialized there should be no way to "uninitialize" the constraint - Provide test cases - Add `dispatchOnceModelInitialized` utility function to action dispatcher - Ensure that type hints are requested after the model has been initialized Part-of: eclipse-glsp/glsp#1116 Part-of: eclipse-glsp/glsp#606 * GLSP-1117: Remove need for explicit definition of client actions -Extend `initializeClientSession` request to also specific the set of client action kinds. This way the server knows which actions should be sent to the client -Adapt `GLSPModelSource´ to retrieve the client actions before sending the `initializeClientSession` request - Add customized `GLSPActionHandlerRegistry` which provides a query method to retrieve all handled action kinds Part of eclipse-glsp/glsp/issues/1117 * GLSP-1071: Rename ServerStatus/ServerMessage action Part of eclipse-glsp/glsp#1071
GLSP-1116 Revise model loading
RequestModelAction
as request actionactionDispatcher.initialize()
earlier which also dispatches an empty set model action under the hoodModelInitializationConstraint
ActionDispatcher
the initialization state is now controlled by the diagram loaderonInitialized
event and a callback function for on-time invocationonceInitialized
dispatchOnceModelInitialized
utility function to action dispatcherPart-of: eclipse-glsp/glsp#1116
Part-of: eclipse-glsp/glsp#606
GLSP-1117: Remove need for explicit definition of client actions
-Extend
initializeClientSession
request to also specific the set of client action kinds. This way the server knows which actions should be sent to the client-Adapt
GLSPModelSource´ to retrieve the client actions before sending the
initializeClientSession` requestGLSPActionHandlerRegistry
which provides a query method to retrieve all handled action kindsPart of eclipse-glsp/glsp/issues/1117
GLSP-1071: Rename ServerStatus/ServerMessage action
Part of eclipse-glsp/glsp#1071
Requires: eclipse-glsp/glsp-server#211