Plugin acces to (Custom) Editor Variables
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 2
- Joined: Fri Oct 24, 2014 12:09 pm
Plugin acces to (Custom) Editor Variables
Post by geurtlagemaat »
Hi,
Is there a way to access Custom Editor Variables and or Editor Variables from a Oxygen Plugin? Or is there a way to read a custom plugin.xml property?
Regards,
Geurt Lagemaat
Is there a way to access Custom Editor Variables and or Editor Variables from a Oxygen Plugin? Or is there a way to read a custom plugin.xml property?
Regards,
Geurt Lagemaat
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Plugin acces to (Custom) Editor Variables
Hi Geurt,
Both of these should be possible.
1) From a plugin you can call API like:
which should expand both Oxygen defined editor variables and custom editor variables which have been defined in the Oxygen Preferences->Custom Editor Variables list.
2) In the plugin.xml you can define a system property like:
and then from the plugin's Java code you will find this property in the global system properties list java.lang.System.getProperties()
Also in Oxygen 16.1 we added Java API to add a custom editor variable resolver to Oxygen ro.sync.exml.workspace.api.util.UtilAccess.addCustomEditorVariablesResolver(EditorVariablesResolver) so for example if in some places in Oxygen you use an editor variable like ${customName} you can add a resolver via the Java API which solves it to some special value.
Regards,
Radu
Both of these should be possible.
1) From a plugin you can call API like:
Code: Select all
PluginWorkspaceProvider.getPluginWorkspace().getUtilAccess().expandEditorVariables("${pd}", null);
2) In the plugin.xml you can define a system property like:
Code: Select all
<property name="propName" value="propValue"/>
Also in Oxygen 16.1 we added Java API to add a custom editor variable resolver to Oxygen ro.sync.exml.workspace.api.util.UtilAccess.addCustomEditorVariablesResolver(EditorVariablesResolver) so for example if in some places in Oxygen you use an editor variable like ${customName} you can add a resolver via the Java API which solves it to some special value.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 2
- Joined: Fri Oct 24, 2014 12:09 pm
Re: Plugin acces to (Custom) Editor Variables
Post by geurtlagemaat »
Many thanks for the prompt reply! The PluginWorkspaceProvider.getPluginWorkspace().getUtilAccess().expandEditorVariables("${pd}", null); is working, many thanks.
Just curious: using the <property name="propName" value="propValue"/> approach in plugin.xml, how to code the property elem in plugin.xml? I can not get this approach working, property is not a element in the plugin.dtd, maybe my old Oxygen version (12.10) is the problem?
Thanks & Regards, Geurt
Just curious: using the <property name="propName" value="propValue"/> approach in plugin.xml, how to code the property elem in plugin.xml? I can not get this approach working, property is not a element in the plugin.dtd, maybe my old Oxygen version (12.10) is the problem?
Thanks & Regards, Geurt
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Plugin acces to (Custom) Editor Variables
Hi Geurt,
Yes, you have an older Oxygen. The possibility to provide a system property in a plugin.xml was added in Oxygen 15.0.
Regards,
Radu
Yes, you have an older Oxygen. The possibility to provide a system property in a plugin.xml was added in Oxygen 15.0.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service