Skip to content

saveSourceModel(final SaveModelAction action) - getFileUri is empty #647

Answered by planger
rsoika asked this question in Q&A
Discussion options

You must be logged in to vote

To make querying the options less clumsy, there is a ClientOptionsUtil util.

The SaveModelAction only contains a fileUri if it is a save-as action, that is the model should be saved into a different file than the one that is currently opened. See also https://github.com/eclipse-glsp/glsp/blob/master/PROTOCOL.md#251-savemodelaction

The ModelState stores all options of the original RequestModelAction in the client options. So if fileUri is not set in the SaveModelAction, you can retrieve the original file URI from the model state.

It might help to look at the rather new org.eclipse.glsp.server.emf package. It contains a module set-up and several default implementations specifically for EMF …

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by rsoika
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
2 participants
Converted from issue

This discussion was converted from issue #645 on May 09, 2022 10:52.