Accessing ${system(var.name)} variable via framework
Posted: Tue Jan 21, 2025 2:26 pm
Good morning,
We are unregistering some default actions in our framework depending on the context. If the environment is production, we will remove actions like "Author/ShowXML." In the development environment, we will keep all actions.
We used the editor.listen(sync.api.Editor.EventTypes.ACTIONS_LOADED) method along with .unregisterAction(), and it worked perfectly.
However, to detect the production environment, we would like to use a Java system variable that we created. We saw in the documentation that it is possible to access an environment variable using ${system(var.name)}. We need help capturing this variable using the framework directly, without relying on a plugin. We found a way to do this via a plugin that uses the Workspace, but we couldn't achieve the same through the framework.
Could you provide an example of how to access ${system(var.name)} using only the framework?
Thank you for your help.
We are unregistering some default actions in our framework depending on the context. If the environment is production, we will remove actions like "Author/ShowXML." In the development environment, we will keep all actions.
We used the editor.listen(sync.api.Editor.EventTypes.ACTIONS_LOADED) method along with .unregisterAction(), and it worked perfectly.
However, to detect the production environment, we would like to use a Java system variable that we created. We saw in the documentation that it is possible to access an environment variable using ${system(var.name)}. We need help capturing this variable using the framework directly, without relying on a plugin. We found a way to do this via a plugin that uses the Workspace, but we couldn't achieve the same through the framework.
Could you provide an example of how to access ${system(var.name)} using only the framework?
Thank you for your help.