-
Notifications
You must be signed in to change notification settings - Fork 3
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
Use YAML-based grammar for our models #28
Conversation
- Downgrade from 10.5.0 to 10.4.2 as it does not work for our YAML lang -- Chevrotain/chevrotain@v10.4.2...v10.5.0 -- Main extension: Chevrotain/chevrotain#1917
- Ensure edges (relationships) are created between nodes (entities) -- Ensure node entity matches expected relationship entity - Improve stability of cross-updates -- Ensure 'save' does an implicit 'update' of the internal structure -- Ensure update only updates text editor when it was opened -- Only do full textual updates to avoid merging issues -- Let UI react to updates, not only on save -- Debounce model update for form editor - Minors -- Adapt grammar to better reflect semantic element (instead of 'for') -- Always serialize properties in same order
b326a20
to
f895231
Compare
examples/yaml-example/entities/voorbeeld_taal_entity_customer.cm
Outdated
Show resolved
Hide resolved
extensions/crossmodel-lang/src/language-server/cross-model-serializer.ts
Show resolved
Hide resolved
@harmen-xb Thank you for the review, I pushed an update that should address your concerns. |
@martin-fleck-at When opening the yaml-example/entities/voorbeeld_taal_entity_customer.cm first in the text editor and afterwards in the form editor I get the following error in the console (it does have work ok, it's just strange I get this error I think):
|
@martin-fleck-at From text perspective it works fine. I do notice the text editor is now auto-saved. Maybe this is causing the issue? Since the text editor will fire an updated event and indrectly update the form? |
@martin-fleck-at |
@harmen-xb I pushed another update which extends the protocol with more arguments and provides a open/close lifecycle for clients. Using a unique client id, clients should now be able to ignore updates that were sent by them. From my tests, this seems to work well now, could you please have another look? |
- Use open/close as lifecycle methods for clients - Let extension startup early to handle non-textual editors
b8804c6
to
15457f9
Compare
@martin-fleck-at When I now do a yarn clean; yarn; yarn start:browser I get the following output (on Windows). See the ERROR on the last line (this is before opening a browser on localhost:3000):
|
@martin-fleck-at After the above error, when I then open a browser at localhost:3000 I get the following console output (with a list of ERRORs) before opening any document in Theia yet:
|
@martin-fleck-at After the above errors, when I then try to open a form editor in the "examples/yaml-example/entities/voorbeeld_taal_entity_customer.cm" file I get the following console output, with an ERROR at the end:
|
…build only (for now).
…ants. Updated/added some comments. Updated model-service-impl so have more specific console/promise messages and added some comments.
@martin-fleck-at I played some more in the GitPod and Windows environment in web and electron version. I did get the ModelServer port problem once or twice, but after a reboot it worked worked. I also don't think it's an issue which is introduced in this PR, so I will investigate it in a separate branch to understand and debug it. For now I will approve the PR and let's continue. |
New language based on indentation
-- Update grammar
-- Rewrite serializer
-- Update GLSP and editors
Ensure edges (relationships) are created between nodes (entities)
-- Ensure node entity matches expected relationship entity
Improve stability of cross-updates
-- Ensure 'save' does an implicit 'update' of the internal structure
-- Ensure update only updates text editor when it was opened
-- Only do full textual updates to avoid merging issues
-- Let UI react to updates, not only on save
-- Debounce model update for form editor
Minors
-- Adapt grammar to better reflect semantic element (instead of 'for')
-- Always serialize properties in same order