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

Refactorings regarding source model loading and saving #154

Merged
merged 2 commits into from
Mar 25, 2022

Conversation

planger
Copy link
Member

@planger planger commented Mar 25, 2022

With this change, I'd like to consistently use the term source model and
avoid the term model source. This is to avoid the overlap with Sprotty's
concept of ModelSource and its unclear relation to a source model and
GModel.

I suggest to avoid Model Source altogether and instead introduce and
consistently use "source model" to refer to the underlying model that we
read and write. Thus we have in GLSP two types of models:

  • Source Model
  • Graph Model (GModel)

Thus, I did the following refactorings:

  • Rename ModelSourceLoader to SourceModelPersistence
  • Add saving to the SourceModelPersistence interface
  • Delegate from the SaveModelActionHandler to that implementation
  • Rename ModelSourceWatcher into SourceModelWatcher
  • Update javadoc and variable names where fit

Fixes eclipse-glsp/glsp#582

Copy link
Contributor

@tortmayr tortmayr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! In general the code looks good to me I have a few minor netpicks
and suggestions.
(Also I only did a code review because I haven't had time yet to test the changes)

@tortmayr
Copy link
Contributor

This is the first breaking change since the 0.9.0 so maybe it's also a good idea to update the changelog

With this change, I'd like to consistently use the term source model and
avoid the term model source. This is to avoid the overlap with Sprotty's
concept of ModelSource and its unclear relation to a source model and
GModel.

I suggest to avoid Model Source altogether and instead introduce and
consistently use "source model" to refer to the underlying model that we
read and write. Thus we have in GLSP two types of models:
  * Source Model
  * Graph Model (GModel)

Thus, I did the following refactorings:
  * Rename ModelSourceLoader to SourceModelPersistence
  * Add saving to the SourceModelPersistence interface
  * Delegate from the SaveModelActionHandler to that implementation
  * Rename ModelSourceWatcher into SourceModelWatcher
  * Update javadoc and variable names where fit
Copy link
Contributor

@tortmayr tortmayr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@planger planger merged commit c5391dc into master Mar 25, 2022
@planger planger deleted the planger/issues/582 branch March 25, 2022 15:44
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.

Combine loading and saving in ModelSourceLoader
2 participants