Adrian asked me to help you with this.
So if you implement a workspace access plugin for Oxygen:
https://www.oxygenxml.com/doc/versions/ ... lugin.html
You can add a menus and toolbars customizer:
https://www.oxygenxml.com/InstData/Edit ... mizer.html
Code: Select all
which allows you to customize the popup menu for the text page:
customizeTextPopUpMenu(javax.swing.JPopupMenu popUp, WSTextEditorPage textPage)
If the opened document is XML, the "textPage" can actually be cast to ro.sync.exml.workspace.api.editor.page.text.xml.WSXMLTextEditorPage
which gives you access to more API (for example execute XPath expressions).
You also have access to the caret offset WSTextBasedEditorPage.getCaretOffset()
and even to the Swing JTextArea "WSTextEditorPage.getTextComponent()".
So you could try to add a contextual menu action which when pressed could look in the current document and then try to open another document at another location using an API like "ro.sync.exml.workspace.api.Workspace.open(URL)".
If that URL contains a custom anchor inside it like:
then the job of finding the place in the opened XML document is then delegated to the link target element finder for which you already found a resource:
https://www.oxygenxml.com/doc/versions/ ... inder.html