Page 1 of 1

Setting Environment variables

Posted: Mon Jun 21, 2021 2:11 pm
by Srinarayan
Hi,

I wanted to know if there is any way to set environment variables of our choice so that we can get it wherever we want just like "authorAccess.getReviewController().getReviewerAuthorName()" variable.

Also if there is any way to analyze and custom define a function of a button defined in CSS in a topic prolog? Please let me know how I can proceed?

Regards,
Vivek.

Re: Setting Environment variables

Posted: Tue Jun 22, 2021 9:08 am
by Radu
Hi Vivek,

In the Oxygen Preferences we have a "Custom Editor Variables" page where you can define custom editor variables and their values. Then you can use our APIs in the Java code to expand a string containing editor variables "ro.sync.exml.workspace.api.util.UtilAccess.expandEditorVariables(String, URL)".
We also have an already defined editor variable named "env" which can be expanded to the value of an environmental variable set in the Oxygen process when it starts:

https://www.oxygenxml.com/doc/versions/ ... ables.html

Like for example ${env(JAVA_HOME)}

About the second unrelated problem please start a different discussion thread and give more details about what you want.

Regards,
Radu