Constants use in Oxygen Plugin

kondalamca
Posts: 4
Joined: Fri Jan 08, 2021 10:40 am

Constants use in Oxygen Plugin

Post by kondalamca » Fri Jan 08, 2021 11:15 am

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.

Radu
Posts: 7529
Joined: Fri Jul 09, 2004 5:18 pm

Re: Constants use in Oxygen Plugin

Post by Radu » Fri Jan 08, 2021 11:31 am

Hi Kondala,

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

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

kondalamca
Posts: 4
Joined: Fri Jan 08, 2021 10:40 am

Re: Constants use in Oxygen Plugin

Post by kondalamca » Fri Jan 08, 2021 12:34 pm

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

Radu
Posts: 7529
Joined: Fri Jul 09, 2004 5:18 pm

Re: Constants use in Oxygen Plugin

Post by Radu » Fri Jan 08, 2021 1:39 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

kondalamca
Posts: 4
Joined: Fri Jan 08, 2021 10:40 am

Re: Constants use in Oxygen Plugin

Post by kondalamca » Fri Jan 08, 2021 1:49 pm

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.

Radu
Posts: 7529
Joined: Fri Jul 09, 2004 5:18 pm

Re: Constants use in Oxygen Plugin

Post by Radu » Fri Jan 08, 2021 1:55 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

kondalamca
Posts: 4
Joined: Fri Jan 08, 2021 10:40 am

Re: Constants use in Oxygen Plugin

Post by kondalamca » Mon Jan 11, 2021 8:37 am

Hi Radu,

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

Regards,
Kondala Nelluri.

Post Reply