is my add-on running in XML Author or XL Editor?
Post here questions and problems related to oXygen frameworks/document types.
is my add-on running in XML Author or XL Editor?
Hi,
how can my add-on find out whether it's running in XML Author or XML Editor? The reason I need to know is that their preference files seem to be independent, either "oxyOptionsSa18.1.xml" or "oxyAuthorOptionsSa18.1.xml" is used. I need to find the setting for the spell checker language, and as API read access to the configuration doesn't seem to be possible (post29252.html), I need to load the file directly.
Regards
Daniel
how can my add-on find out whether it's running in XML Author or XML Editor? The reason I need to know is that their preference files seem to be independent, either "oxyOptionsSa18.1.xml" or "oxyAuthorOptionsSa18.1.xml" is used. I need to find the setting for the spell checker language, and as API read access to the configuration doesn't seem to be possible (post29252.html), I need to load the file directly.
Regards
Daniel
Re: is my add-on running in XML Author or XL Editor?
Hi Daniel,
Right now there is an API method called PluginWorkspaceProvider.getPluginWorkspace().getApplicationName(). It should return <oXygen/> XML Editor in one case and <oXygen/> XML Author in the other.
In Oxygen 19 you will have more specific API for this.
We also added an API interface containing API keys for which values can be obtained from a plugin ro.sync.exml.options.APIAccessibleOptionTags.
I can try for Oxygen 19 (April-May this year) to make accessible in this APIAccessibleOptionTags also the spell checker options key.
Regards,
Radu
Right now there is an API method called PluginWorkspaceProvider.getPluginWorkspace().getApplicationName(). It should return <oXygen/> XML Editor in one case and <oXygen/> XML Author in the other.
In Oxygen 19 you will have more specific API for this.
We also added an API interface containing API keys for which values can be obtained from a plugin ro.sync.exml.options.APIAccessibleOptionTags.
I can try for Oxygen 19 (April-May this year) to make accessible in this APIAccessibleOptionTags also the spell checker options key.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: is my add-on running in XML Author or XL Editor?
getApplicationName() isn't found here when I use this dependency in Maven, am I missing something?Radu wrote:PluginWorkspaceProvider.getPluginWorkspace().getApplicationName()
Code: Select all
<dependency>
<groupId>com.oxygenxml</groupId>
<artifactId>oxygen</artifactId>
<version>18.1.0.2</version>
<scope>provided</scope>
</dependency>
Re: is my add-on running in XML Author or XL Editor?
Hi Daniel,
Oops, sorry, I double checked and even that application name API is scheduled for 19, so it was not available in 18.1.
As possible workarounds:
1) ro.sync.exml.workspace.api.WorkspaceUtilities.getParentFrame(), cast it to java.awt.Frame and get its title. It should contain the application name at the end.
2) ro.sync.exml.workspace.api.WorkspaceUtilities.getLicenseInformationProvider().getComponents() shows for what application the license key was generated. This might not work if end user has license for XML Editor but is running XML Author (which can be run with XML Editor license).
Regards,
Radu
Oops, sorry, I double checked and even that application name API is scheduled for 19, so it was not available in 18.1.
As possible workarounds:
1) ro.sync.exml.workspace.api.WorkspaceUtilities.getParentFrame(), cast it to java.awt.Frame and get its title. It should contain the application name at the end.
2) ro.sync.exml.workspace.api.WorkspaceUtilities.getLicenseInformationProvider().getComponents() shows for what application the license key was generated. This might not work if end user has license for XML Editor but is running XML Author (which can be run with XML Editor license).
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: is my add-on running in XML Author or XL Editor?
Thanks, this workaround seems to work nicely.Radu wrote: 1) ro.sync.exml.workspace.api.WorkspaceUtilities.getParentFrame(), cast it to java.awt.Frame and get its title.
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