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

Combine loading and saving in ModelSourceLoader #582

Closed
3 tasks done
planger opened this issue Mar 11, 2022 · 0 comments · Fixed by eclipse-glsp/glsp-server#154
Closed
3 tasks done

Combine loading and saving in ModelSourceLoader #582

planger opened this issue Mar 11, 2022 · 0 comments · Fixed by eclipse-glsp/glsp-server#154
Assignees
Labels
Milestone

Comments

@planger
Copy link
Member

planger commented Mar 11, 2022

Users provide a dedicated ModelSourceLoader implementation to specify how to load the source model.
Usually this is strongly related to how changes are saved back to the model, which however needs to be implemented in the provided SaveModelActionHandler.

I propose to extend the ModelSourceLoader interface with a save method and delegate by default from the SaveModelActionHandler to the ModelSourceLoader. This way the persistence is combined in one implementation.

Probably we should then rename the ModelSourceLoader into something like SourceModelPersistence with loadSourceModel(RequestModelAction) and saveSourceModel(SaveModelAction) methods.

  • Java Server
  • Node server
  • Documentation
@planger planger added this to the 1.0.0 Release milestone Mar 11, 2022
@planger planger self-assigned this Mar 24, 2022
planger added a commit to eclipse-glsp/glsp-server that referenced this issue Mar 25, 2022
planger added a commit to eclipse-glsp/glsp-server-node that referenced this issue Mar 25, 2022
  - Rename ModelSourceLoader to SourceModelPersistence
  - Add saving to the SourceModelPersistence interface
  - Delegate from the SaveModelActionHandler to that implementation
  - Update javadoc and variable names where fit

eclipse-glsp/glsp#582
planger added a commit to eclipse-glsp/glsp-server-node that referenced this issue Mar 25, 2022
  - Rename ModelSourceLoader to SourceModelPersistence
  - Add saving to the SourceModelPersistence interface
  - Delegate from the SaveModelActionHandler to that implementation
  - Update javadoc and variable names where fit

eclipse-glsp/glsp#582
planger added a commit to eclipse-glsp/glsp-server-node that referenced this issue Mar 25, 2022
  - Rename ModelSourceLoader to SourceModelPersistence
  - Add saving to the SourceModelPersistence interface
  - Delegate from the SaveModelActionHandler to that implementation
  - Update javadoc and variable names where fit

eclipse-glsp/glsp#582
planger added a commit to eclipse-glsp/glsp-website-source that referenced this issue Mar 25, 2022
planger added a commit to eclipse-glsp/glsp-website-source that referenced this issue Mar 25, 2022
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