Page 1 of 1

Static Get Author Access

Posted: Tue Aug 05, 2014 8:53 pm
by ArbitraryName
Hello,

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?

Re: Static Get Author Access

Posted: Wed Aug 06, 2014 9:41 am
by Radu
Hi,

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.

Regards,
Radu