Page 1 of 1

Constants use in Oxygen Plugin

Posted: Fri Jan 08, 2021 11:15 am
by kondalamca
Hi All,

I would like to create Constants file for all hard coded values and those values i need to use in Oxygen Plugin support code,so can any one please let me know how to use it and if any sample example please let me know.

Regards,
Kondala Nelluri.

Re: Constants use in Oxygen Plugin

Posted: Fri Jan 08, 2021 11:31 am
by Radu
Hi Kondala,

I do not understand what you want us to help you with. Can you elaborate?

Regards,
Radu

Re: Constants use in Oxygen Plugin

Posted: Fri Jan 08, 2021 12:34 pm
by kondalamca
Hi Radu,

Thanks for responding for my concerns and below is the detailed explanation,

for suppose Oxygen plugin need to read XML files in many places and those are in some common folder so i am trying to create one Constants file and it contain Root directory of XML file path ,
whenever Root Path is required i need to read it from Constants file instead of hard coded.
here my concern is where is need to write these constants ?

Regards,
Kondala Nelluri

Re: Constants use in Oxygen Plugin

Posted: Fri Jan 08, 2021 1:39 pm
by Radu
Hi Kondala,

I'm afraid I still do not understand. Oxygen plugins are Java based and you can create your own classes and interfaces there and use our API to interact with the main Oxygen application. You are in charge of the way in which you organize your plugin's Java code.

Regards,
Radu

Re: Constants use in Oxygen Plugin

Posted: Fri Jan 08, 2021 1:49 pm
by kondalamca
Hi Radu,

Sorry for confusion,Actually my requirement is,
DB PWD etc write in constant file and future any modification occurred,
i need to recompile the code and need to rebuild it but here my requirement is with out recompile and rebuild i need to write it in some where oxygen Tool it self or any plugin related files so could you please suggest me where should i have write it and i need to use same in plugin code.

Regards,
Kondala Nelluri.

Re: Constants use in Oxygen Plugin

Posted: Fri Jan 08, 2021 1:55 pm
by Radu
Hi,

We have API ro.sync.exml.workspace.api.PluginWorkspace.getOptionsStorage() which allows you to persistently store key:value pairs in Oxygen's global settings and to retrieve them. Would that be useful for your needs?

https://www.oxygenxml.com/InstData/Edit ... sStorage--

Regards,
Radu

Re: Constants use in Oxygen Plugin

Posted: Mon Jan 11, 2021 8:37 am
by kondalamca
Hi Radu,

Thanks for quick solution,it seems this is helpful for my requirement.

Regards,
Kondala Nelluri.