Identifying the Version Running

Post here questions and problems related to oXygen frameworks/document types.
ArbitraryName
Posts: 16

Identifying the Version Running

Thu Feb 19, 2015 3:23 am

Hello All,

I am wondering if there is some static property I can access from the plugin workspace which will tell me if the user is in oxygen Author, developer etc.

Thanks!

AN
alex_jitianu
Posts: 625

Re: Identifying the Version Running

Thu Feb 19, 2015 11:29 am

Hello,

You can look at a system property: System.getProperty("com.oxygenxml.app.descriptor"). Possible values are:
- ro.sync.exml.AuthorFrameDescriptor
- ro.sync.exml.DeveloperFrameDescriptor
- ro.sync.exml.EditorFrameDescriptor

Other than expecting a specific value, all these values are class names that extend ro.sync.ui.application.ApplicationMainFrameDescriptor. So you could instantiate an object using reflection and then use the ApplicationMainFrameDescriptor API to detect the distribution.

Another possible API is the ro.sync.exml.workspace.api.WorkspaceUtilities.getLicenseInformationProvider(). Use ro.sync.exml.workspace.api.license.LicenseInformationProvider.getComponents() to see which components are licensed.

Best regards,
Alex
ArbitraryName
Posts: 16

Re: Identifying the Version Running

Thu Feb 19, 2015 11:21 pm

Thanks that is great!

However it appears to not be set for me in developer... Although in author it has the value I expected (from your options) I am not seeing anything in Oxygen Developer.

Do you know why that would be?
ArbitraryName
Posts: 16

Re: Identifying the Version Running

Thu Feb 19, 2015 11:35 pm

Correction, it is not working in oxygen editor* but is in author and descriptor.
adrian
Posts: 2391

Re: Identifying the Version Running

Thu Feb 19, 2015 11:56 pm

Hi,

That's right. For Editor the property has not been set in some of the launchers because it is considered default.
So if you find the property set, check it against the known values for Author, Developer and Editor. If it's not set, then it's the Editor (default).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 2 guests