Skip to content

Is it possible to access preference values in the backend? #15349

Answered by sdirix
rannp-toro-cloud asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @rannp-toro-cloud,

Generally speaking, preferences are a frontend concept in Theia, so there is no built-in support to access them via the backend.

Usually user actions are triggered from the frontend, so the typical pattern is that you retrieve the relevant preference values and hand them over to your backend calls as parameters.

There are some alternatives if you really need them:

  • We have the concept of connection containers. If you bind a backend service within such a container, then it will be instantiated per connection (i.e. per frontend). In it you can directly access frontend services. If this is a pattern which fits your use case, then this would be a way to directly access t…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@msujew
Comment options

Answer selected by rannp-toro-cloud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants