Page 1 of 1

Identifying the Version Running

Posted: Thu Feb 19, 2015 3:23 am
by ArbitraryName
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

Re: Identifying the Version Running

Posted: Thu Feb 19, 2015 11:29 am
by alex_jitianu
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

Re: Identifying the Version Running

Posted: Thu Feb 19, 2015 11:21 pm
by ArbitraryName
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?

Re: Identifying the Version Running

Posted: Thu Feb 19, 2015 11:35 pm
by ArbitraryName
Correction, it is not working in oxygen editor* but is in author and descriptor.

Re: Identifying the Version Running

Posted: Thu Feb 19, 2015 11:56 pm
by adrian
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