@API(type=EXTENDABLE,
src=PUBLIC)
public abstract class ActionBarContributorCustomizer
extends java.lang.Object
<extension point="oxygen.plugin.id.actionBarContributorCustomizer"> <implementation class="my.package.CustomActionBarContributorCustomizer"/>; </extension>
Constructor and Description |
---|
ActionBarContributorCustomizer() |
Modifier and Type | Method and Description |
---|---|
abstract java.util.List<org.eclipse.jface.action.IAction> |
customizeActionsContributedToDocumentMenu(java.util.List<org.eclipse.jface.action.IAction> actions)
Customize the actions before they are contributed to the main Document menu (XML or XSL, or XSD, etc).
|
abstract java.util.List<org.eclipse.jface.action.IAction> |
customizeActionsContributedToDocumentToolbar(java.util.List<org.eclipse.jface.action.IAction> actions)
Customize the actions before they are contributed to the main Document toolbar.
|
void |
customizeAuthorBreadcrumbPopUpMenu(org.eclipse.jface.action.IMenuManager popUp,
AuthorAccess authorAccess,
AuthorNode currentNode)
Customize a pop-up menu about to be shown in the Author page Breadcrumb (current elements path) toolbar.
|
void |
customizeAuthorOutlinePopUpMenu(org.eclipse.jface.action.IMenuManager popUp,
AuthorAccess authorAccess)
Customize a pop-up menu about to be shown in the Author page Outline view.
|
void |
customizeAuthorPageExtensionMenu(org.eclipse.jface.action.IMenuManager extensionMenu,
AuthorAccess authorAccess)
Customize an extension main menu contributed by the Author page document type configuration.
|
void |
customizeAuthorPageExtensionToolbar(org.eclipse.jface.action.IToolBarManager extensionToolbar,
java.lang.String toolbarID,
AuthorAccess authorAccess)
Customize an extension toolbar contributed by the Author page document type configuration.
|
abstract void |
customizeAuthorPageInternalCoolbar(org.eclipse.swt.widgets.CoolBar coolbar,
WSAuthorEditorPage authorEditorPage)
Customize an internal coolbar for a cetain author page.
|
void |
customizeAuthorPopUpMenu(org.eclipse.jface.action.IMenuManager popUp,
AuthorAccess authorAccess)
Customize a pop-up menu in the Author page before showing it.
|
java.util.List<org.eclipse.jface.action.IAction> |
customizeDITAMapsManagerExtendedToolbar(java.util.List<org.eclipse.jface.action.IAction> toolbarActions)
Customize the DITA Maps Manager extended toolbar.
|
java.util.List<org.eclipse.jface.action.IAction> |
customizeDITAMapsManagerMainToolbar(java.util.List<org.eclipse.jface.action.IAction> toolbarActions)
Customize the DITA Maps Manager main toolbar.
|
void |
customizeTextPopUpMenu(org.eclipse.jface.action.IMenuManager popUp,
WSTextEditorPage textPage)
Customize a pop-up menu in the Text page before showing it.
|
public abstract java.util.List<org.eclipse.jface.action.IAction> customizeActionsContributedToDocumentMenu(java.util.List<org.eclipse.jface.action.IAction> actions)
actions
- The list of original actions.public abstract java.util.List<org.eclipse.jface.action.IAction> customizeActionsContributedToDocumentToolbar(java.util.List<org.eclipse.jface.action.IAction> actions)
actions
- The list of original actions.public void customizeAuthorPageExtensionMenu(org.eclipse.jface.action.IMenuManager extensionMenu, AuthorAccess authorAccess)
extensionMenu
- The extension menu.authorAccess
- Access class to the author functions.public void customizeAuthorPageExtensionToolbar(org.eclipse.jface.action.IToolBarManager extensionToolbar, java.lang.String toolbarID, AuthorAccess authorAccess)
extensionToolbar
- The extension toolbar.toolbarID
- The toolbar ID.authorAccess
- Access class to the author functions.public abstract void customizeAuthorPageInternalCoolbar(org.eclipse.swt.widgets.CoolBar coolbar, WSAuthorEditorPage authorEditorPage)
CoolItem[] items = coolbar.getItems(); for (CoolItem coolItem : items) { Control control = coolItem.getControl(); Object oxygenID = control.getData("OXYGEN_ID"); System.out.println(oxygenID); if (control instanceof ToolBar) { ToolBar toolBar = (ToolBar) control; ToolItem[] tollbarItems = toolBar.getItems(); for (ToolItem toolItem : tollbarItems) { System.out.println(" " + toolItem.getData("OXYGEN_ID")); } } }If you want to remove an item from the coolbar you can use:
CoolItem[] items = coolbar.getItems(); CoolItem coolItem = items[1]; coolItem.setControl(new Label(coolbar, SWT.NONE)); coolItem.setMinimumSize(0, 0); coolItem.setSize(new Point(0, 0)); coolbar.update();If you want to remove actions from drop-down buttons you can cast them to a special interface "com.oxygenxml.editor.editors.xml.IDropDownToolItem" and add an actions filter to them. For example the following code removes the first two actions from the "Profiling" drop-down button:
CoolItem[] items = coolbar.getItems(); for (CoolItem coolItem : items) { Control control = coolItem.getControl(); if (control instanceof ToolBar) { ToolBar toolBar = (ToolBar) control; ToolItem[] tollbarItems = toolBar.getItems(); for (ToolItem toolItem : tollbarItems) { if("Profiling".equals(toolItem.getData("OXYGEN_ID"))){ //Remove it if(toolItem instanceof IDropDownToolItem){ ((IDropDownToolItem)toolItem).addActionsListFilter(new ActionsListFilter() { public void filterActions(Listactions) { for (int i = actions.size() - 1; i >= 0; i--) { IAction action = actions.get(i); if(action != null){ if("Profiling_Condition_Sets/Apply_profiling_styles".equals(action.getId()) || "Profiling_Condition_Sets/Show_Profiling_Attributes".equals(action.getId())){ actions.remove(i); } } } } }); } } } } }
coolbar
- The internal coolbar after the fixed actions have been added.authorEditorPage
- The current author editor page.public java.util.List<org.eclipse.jface.action.IAction> customizeDITAMapsManagerExtendedToolbar(java.util.List<org.eclipse.jface.action.IAction> toolbarActions)
toolbarActions
- The current list of actions which will be added.public java.util.List<org.eclipse.jface.action.IAction> customizeDITAMapsManagerMainToolbar(java.util.List<org.eclipse.jface.action.IAction> toolbarActions)
toolbarActions
- The current list of actions which will be added.public void customizeAuthorPopUpMenu(org.eclipse.jface.action.IMenuManager popUp, AuthorAccess authorAccess)
popUp
- The pop-up Menu.authorAccess
- Access class to the author functions.public void customizeAuthorOutlinePopUpMenu(org.eclipse.jface.action.IMenuManager popUp, AuthorAccess authorAccess)
popUp
- The pop-up Menu.authorAccess
- Access class to the author functions.Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.
public void customizeAuthorBreadcrumbPopUpMenu(org.eclipse.jface.action.IMenuManager popUp, AuthorAccess authorAccess, AuthorNode currentNode)
popUp
- The pop-up Menu.authorAccess
- Access class to the author functions.currentNode
- The current node on which the popup is shown.Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.
public void customizeTextPopUpMenu(org.eclipse.jface.action.IMenuManager popUp, WSTextEditorPage textPage)
popUp
- The pop-up Menu.textPage
- The page over which the pop-up will be presented.© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.