Page 1 of 1
get filename of open document
Posted: Mon Dec 12, 2011 11:41 pm
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
Re: get filename of open document
Posted: Tue Dec 13, 2011 11:49 am
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
Re: get filename of open document
Posted: Wed Dec 14, 2011 7:22 pm
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.
Re: get filename of open document
Posted: Thu Dec 15, 2011 10:23 am
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