Page 1 of 1

Associate a Custom View with Document Types

Posted: Thu Feb 02, 2017 10:59 pm
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

Re: Associate a Custom View with Document Types

Posted: Fri Feb 03, 2017 9:37 am
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