Associate a Custom View with Document Types

Post here questions and problems related to oXygen frameworks/document types.
strohma
Posts: 4
Joined: Wed May 25, 2016 11:34 pm

Associate a Custom View with Document Types

Post by strohma »

Greetings,

We have implemented a custom view plugin by implementing the ViewComponentCustomizer interface and would like to only have it displayed for certain document types. I'm thinking about the way that the Attributes view is only displayed for certain file types. Is there a way to have Oxygen only display the custom view for certain document types?

Thanks,

Strohm
Radu
Posts: 9470
Joined: Fri Jul 09, 2004 5:18 pm

Re: Associate a Custom View with Document Types

Post by Radu »

Hi Strohm,

You have API to hide ro.sync.exml.workspace.api.standalone.StandalonePluginWorkspace.hideView(String) and show a view ro.sync.exml.workspace.api.standalone.StandalonePluginWorkspace.showView(String, boolean).
And you also have API to listen to editor selection events ro.sync.exml.workspace.api.PluginWorkspace.addEditorChangeListener(WSEditorChangeListener, int).
So when a certain XML document's tab is selected you can choose to show/hide the view (or maybe set another content to it).

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