Disabling Outline Tab in the Author view

Having trouble installing Oxygen? Got a bug to report? Post it all here.
idak
Posts: 16
Joined: Mon Mar 18, 2013 6:29 pm

Disabling Outline Tab in the Author view

Post by idak »

Hello,

I want to disable the outline tab in the Author view.
If it's possible to implement this functionality, what are the java classes to be used?

Many thanks.
idak
Radu
Posts: 9448
Joined: Fri Jul 09, 2004 5:18 pm

Re: Disabling Outline Tab in the Author view

Post by Radu »

Hi,

Using our Plugins SDK:
http://www.oxygenxml.com/oxygen_sdk.htm ... er_Plugins

you can create a Workspace Access plugin (there is a sample plugin in the SDK for this).

The plugin can add a view component customizer which can replace the Outline with a custom swing component:

Code: Select all

  pluginWorkspaceAccess.addViewComponentCustomizer(new ViewComponentCustomizer() {
/**
* @see ro.sync.exml.workspace.api.standalone.ViewComponentCustomizer#customizeView(ro.sync.exml.workspace.api.standalone.ViewInfo)
*/
@Override
public void customizeView(ViewInfo viewInfo) {
if("Outline".equals(viewInfo.getViewID())) {
viewInfo.setComponent(new javax.swing.JLabel("Outline not available"));
}
}
});
Do you want to disable the Outline only in the Author page (and have it working in the Text page)?
If so, on the customizer you can probably return a JPanel which has a card layout and shows either the Outline if the current selected editor is opened in the Text page or a custom label if not.

You can add a WSEditorListener to be notified when an opened editor gets selected and to each editor you can add a page changed listener.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
idak
Posts: 16
Joined: Mon Mar 18, 2013 6:29 pm

Re: Disabling Outline Tab in the Author view

Post by idak »

Hi Radu,
The user wants to simplify the process : Window>Show View>Outline by adding a custom button to hide/show the Outline View.

Thanks
Radu
Posts: 9448
Joined: Fri Jul 09, 2004 5:18 pm

Re: Disabling Outline Tab in the Author view

Post by Radu »

Hi,

We currently only have API to show a view using:

StandalonePluginWorkspace.showView(String, boolean)

We will consider adding API to hide a view in a future version. I will update this thread when the new API becomes available.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
idak
Posts: 16
Joined: Mon Mar 18, 2013 6:29 pm

Re: Disabling Outline Tab in the Author view

Post by idak »

OK
Thank you Radu
Radu
Posts: 9448
Joined: Fri Jul 09, 2004 5:18 pm

Re: Disabling Outline Tab in the Author view

Post by Radu »

Hi,

We released Oxygen 15.0 a couple of days ago.
In Oxygen 15.0 we added this extra API:

Code: Select all

StandalonePluginWorkspace.hideView(String)
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply