Page 1 of 1

Finding ditamap integrated in main file

Posted: Thu Mar 07, 2024 2:18 pm
by tmakita
I'm developing custom element insertion extension Java program via Oxygen frame work. The extension works only for topics that have customized public identifiers.
In this extension, I want to access ditamap file integrated in project's main file. Is it possible in the AuthorAccess interface described in the following URL?
https://www.oxygenxml.com/InstData/Edit ... ccess.html
Thanks for your help!

Re: Finding ditamap integrated in main file

Posted: Thu Mar 07, 2024 2:33 pm
by Radu
Hi,

In the DITA Maps Manager view there is a "Context" combo box which points to a root DITA Map.
You can use the API "ro.sync.ecss.dita.DITAAccess.getRootMapURL()" to access the root map listed there.
We also have the API:
((StandalonePluginWorkspace)PluginWorkspaceProvider.getPluginWorkspace()).getProjectManager().getMainFileResourcesIterator()
if you want to iterate through all "Main Files" referenced in the "Main Files" folder.

Regards,
Radu

Re: Finding ditamap integrated in main file

Posted: Thu Mar 07, 2024 2:48 pm
by tmakita
Thank you for your quick reply!
> You can use the API "ro.sync.ecss.dita.DITAAccess.getRootMapURL()" to access the root map listed there.
I got it.
I also found the source code written by my colleague that use this API.
Much appreciated.