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

GLSP-1116 Revise model loading #287

Merged
merged 3 commits into from
Sep 15, 2023
Merged

GLSP-1116 Revise model loading #287

merged 3 commits into from
Sep 15, 2023

Conversation

tortmayr
Copy link
Contributor

@tortmayr tortmayr commented Sep 12, 2023

GLSP-1116 Revise model loading

  • Refactor diagram loader to properly dispatch the RequestModelAction as request action
    • 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
  • Rework ModelInitializationConstraint
    • Remove coupling with ActionDispatcher the initialization state is now controlled by the diagram loader
    • Provide onInitialized event and a callback function for on-time invocation onceInitialized
    • 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

Requires: eclipse-glsp/glsp-server#211

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.

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
@tortmayr
Copy link
Contributor Author

@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?

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! 👍

@tortmayr tortmayr merged commit 42b06df into master Sep 15, 2023
@tortmayr tortmayr deleted the glsp-1116 branch June 17, 2024 09:24
holkerveen pushed a commit to holkerveen/glsp-client that referenced this pull request Dec 21, 2024
* 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
holkerveen pushed a commit to holkerveen/glsp-client that referenced this pull request Dec 21, 2024
* 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
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.

2 participants