customized contextual menu in outline window

Post here questions and problems related to oXygen frameworks/document types.
LBarth
Posts: 26
Joined: Mon Mar 04, 2013 1:42 pm

customized contextual menu in outline window

Post by LBarth »

Hi,

I have developed a plugin in which I have customized the contextual menu of the main editor window.
I would like to customize the contextual menu of the outline window to give my users the same functionalities in both windows.

I have checked the sdk sample in simple.documentation.framework.extensions but I'm a bit lost.
Is the fact I work on a plugin instead of a framework makes a difference ?
Is there a plugin extension customized contextual menu in outline window sample somewhere ?

Best regards,
Lionel
Radu
Posts: 9470
Joined: Fri Jul 09, 2004 5:18 pm

Re: customized contextual menu in outline window

Post by Radu »

Hi Lionel,

Indeed right now an Outline popup menu can only be customized from a framework configuration, by overwriting the method:

Code: Select all

ro.sync.ecss.extensions.api.ExtensionsBundle.createAuthorOutlineCustomizer()
in the custom extensions bundle implementation set for the framework configuration:

http://www.oxygenxml.com/doc/versions/1 ... undle.html

If it is necessary for you to do this from a plugin I could try to add an issue to allow for this in a future version.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9470
Joined: Fri Jul 09, 2004 5:18 pm

Re: customized contextual menu in outline window

Post by Radu »

Hi,

Oxygen 18.1 which we released a couple of weeks ago has special API to customize outline/breadcrumb popup menus from the plugin side:

Code: Select all

    ((StandalonePluginWorkspace)PluginWorkspaceProvider.getPluginWorkspace()).addMenusAndToolbarsContributorCustomizer(
new MenusAndToolbarsContributorCustomizer() {
/**
* @see ro.sync.exml.workspace.api.standalone.actions.MenusAndToolbarsContributorCustomizer#customizeAuthorOutlinePopUpMenu(javax.swing.JPopupMenu, ro.sync.ecss.extensions.api.AuthorAccess)
*/
@Override
public void customizeAuthorOutlinePopUpMenu(JPopupMenu popUp, AuthorAccess authorAccess) {
// TODO
}
/**
* @see ro.sync.exml.workspace.api.standalone.actions.MenusAndToolbarsContributorCustomizer#customizeAuthorBreadcrumbPopUpMenu(javax.swing.JPopupMenu, ro.sync.ecss.extensions.api.AuthorAccess, ro.sync.ecss.extensions.api.node.AuthorNode)
*/
@Override
public void customizeAuthorBreadcrumbPopUpMenu(JPopupMenu popUp,
AuthorAccess authorAccess, AuthorNode currentNode) {
// TODO
}
});
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply