Static Get Author Access

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

Static Get Author Access

Post by ArbitraryName » Tue Aug 05, 2014 8:53 pm


I am pretty new to development in oxygen. Sorry if this question is shockingly naïve.

I have been working with a framework plugin and passing in the author access by implementing the 'AuthorOperation' interface and passing in the active AuthorAccess object. This is working pretty well but corrupting the meaningfulness of my interfaces.

I would prefer to know about some context engine I can tap into to get that AuthorOperation. Basically I am trying to free up my plugin interfaces from 'knowing' too much about oxygen.

Is there anything like that? Where from within a plugin I can call out to find the AuthorAccess I need?

Or does anyone else have a strategy for this they have found to be fruitful?

Posts: 6933
Joined: Fri Jul 09, 2004 5:18 pm

Re: Static Get Author Access

Post by Radu » Wed Aug 06, 2014 9:41 am


The AuthorAccess cannot be obtained by static means.
In an opened Oxygen application there can be multiple XML files opened. Each of them has its own separate AuthorAccess instance. So AuthorAccess is the API access you have to a particular XML document opened in the Author visual editor mode.
We have singleton access to the entire application via ro.sync.exml.workspace.api.PluginWorkspaceProvider.getPluginWorkspace() which can be used to obtain access to each opened editor and for each opened editor get particular access to all the editor modes (Text/Grid/Author).

I do not understand this remark:
This is working pretty well but corrupting the meaningfulness of my interfaces.
What type of plugin are you creating? Is it a Workspace Access plugin? Of course your plugin will depend on Oxygen API.

Radu Coravu
<oXygen/> XML Editor

Post Reply