-
Notifications
You must be signed in to change notification settings - Fork 12
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
adapt to latest theia 1.24 #57
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello Alex,
thank you very much for your contribution :)
It looks pretty good to me. I'm just wondering whether we could provide a (simple) default implementation for createSnapshot
and revert
either in the BaseTreeEditorWidget
or the ResourceTreeEditorWidget
. Do you have an idea what would be needed for this?
@lucas-koehler thanks for your feedback, i'll try to summarize my observations:
Now
A few remarks:
For now, i have added a default implementation for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the update and the explanations! I guess the separation between data
in the resource editor and instanceData
in the base editor was a mistake or a leftover from past refactorings. Thanks for fixing that.
When using "save as" in the example, the save seems to work but I get an error message in the UI:
Quickly looking for this message in the Theia code, the reason seems to be a missing applySnapshot
method. (see copyAndSave
in workspace-frontend-contribution
)
- provide implementations of createSnapshot and revert where possible - adapt autoSave due to changed type and preference key - typo fixes in documentation Signed-off-by: Alexander Flammer <alex.flammer.dev@outlook.com>
@lucas-koehler thanks for testing, i missed out checking the examples. Now the example should work. I've implemented |
@alxflam Thanks for the update and the contribution in general :). The error message no longer appears :) |
Hi,
with the current Theia 1.24 (and already with 1.23.0) the tree editor cannot be saved anymore.
See changes in Theia#10736 and alxflam/theia@e62fd33.
Monaco now defines different save preferences (the keys as well as the allowed values have changed).
Changes:
I had to add a "eslint-disable-next-line import/no-deprecated" to the import of createTreeContainer as there are now two such functions, whose only difference is the type of an optional parameter (and one of these functions is deprecated). Don't know how i can trick typescript to import the not-deprecated function if they are actually named identically.
I did not implement 'onFocusChange' / 'onWindowChange', instead i kept it simple and always save with a delay (delay from the preferences). We may need to look into this once more.
Greetings,
Alex