Identifying the Version Running

Post here questions and problems related to oXygen frameworks/document types.
ArbitraryName
Posts: 16
Joined: Tue Aug 05, 2014 8:36 pm

Identifying the Version Running

Post 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
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: Identifying the Version Running

Post 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
ArbitraryName
Posts: 16
Joined: Tue Aug 05, 2014 8:36 pm

Re: Identifying the Version Running

Post 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?
ArbitraryName
Posts: 16
Joined: Tue Aug 05, 2014 8:36 pm

Re: Identifying the Version Running

Post by ArbitraryName »

Correction, it is not working in oxygen editor* but is in author and descriptor.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Identifying the Version Running

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply