get filename of open document

Oxygen general issues.
TimWallace
Posts: 10
Joined: Thu Nov 17, 2011 10:49 pm

get filename of open document

Post by TimWallace »

I have looked through the documentation and cannot find the means by which one can determine the name of the document currently opened in the editor. I need to be able to get this data from the client/server app and the browser plug-in. Can someone please point me in the right direction?

Thanks,

Tim
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: get filename of open document

Post by Radu »

Hi Tim,

We have API which can access the URL of the current edited XML document:

Code: Select all

ro.sync.exml.workspace.api.PluginWorkspace.getCurrentEditorAccess(int)
Such API can usually be accessed from a plugin implemented for an Oxygen XML Editor stadalone application (for example a Workspace Access plugin):

http://www.oxygenxml.com/oxygen_sdk.htm ... er_Plugins

Have you implemented a plugin for an Oxygen standalone version or are you working with an Oxygen Eclipse plugin?

Maybe you could give us more details about your situation.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
TimWallace
Posts: 10
Joined: Thu Nov 17, 2011 10:49 pm

Re: get filename of open document

Post by TimWallace »

I was able to get the info I needed using AuthorAccess.getDocumentController().getAuthorDocumentNode().getSystemID().

While I am finding your tool to be powerful, I find your documentation a bit lacking and not the least bit user friendly. Finding what objects are required to perform various functions is no easy task.
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: get filename of open document

Post by Radu »

Hi Tim,

We have a lot of API and it's hard to give code samples for its entire functionality.
In the Author SDK there is a sample project (SDF) which tries to use as much of the Authoring API as possible).
When asking for help on a specific problem please also try to give some context, my example above was for developing plugins for a standalone version of Oxygen. From what I know now you were developing using the API provided in the Author Component Applet which has access to the AuthorAccess interface.
Another way to do the same thing would have been:

AuthorAccess.getEditorAccess().getEditorLocation()

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply