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

Extended workflow example by injecting non-default #77

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Sakrafux
Copy link
Contributor

@Sakrafux Sakrafux commented Apr 5, 2024

@planger As was discussed, the workflow example on the server was extended with a custom implementation for ModelState, ModelStorage and GModelFactory. However, since the Workflow implementation and its handlers are heavily dependent on the source model already being a GModel. This makes the GModelFactory irrelevant (or even detrimental), and I therefore opted to split the default functionality from GModelStorage to better show how a custom implementation could look like.

This is sufficient imo, since I will most likely need to implement a small custom model anyway for the planned editor examples.

@planger
Copy link
Member

planger commented Apr 5, 2024

Thank you very much for the PR! I think this improves the situation already.

However, I believe it'd be even more useful, if we actually switch to a very simple JSON format as source model, also if this means we'd have to also adapt the operation handlers. In practice, the GModel is rarely used directly as source model, as most people would like to use a custom model format. So the main example should probably do the same.

In case of this Typescript-based GLSP server, adding undo/redo support should also be rather straightforward, as the framework provides dedicated support for JSON-based source models. See #59

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants