Search in sources :

Example 1 with IActionBarConfigurer2

use of org.eclipse.ui.internal.provisional.application.IActionBarConfigurer2 in project hale by halestudio.

the class ApplicationActionBarAdvisor method fillCoolBar.

/**
 * @see org.eclipse.ui.application.ActionBarAdvisor#fillCoolBar(org.eclipse.jface.action.ICoolBarManager)
 */
@Override
protected void fillCoolBar(ICoolBarManager coolBar) {
    IActionBarConfigurer2 actionBarConfigurer = (IActionBarConfigurer2) getActionBarConfigurer();
    coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_FILE));
    {
        // File Group
        IToolBarManager fileToolBar = actionBarConfigurer.createToolBarManager();
        fileToolBar.add(new Separator(IWorkbenchActionConstants.NEW_GROUP));
        fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT));
        fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.SAVE_GROUP));
        fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.SAVE_EXT));
        fileToolBar.add(new Separator(IWorkbenchActionConstants.BUILD_GROUP));
        fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.BUILD_EXT));
        fileToolBar.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
        // Add to the cool bar manager
        coolBar.add(actionBarConfigurer.createToolBarContributionItem(fileToolBar, IWorkbenchActionConstants.TOOLBAR_FILE));
    }
    // coolBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
    coolBar.add(new GroupMarker("group.nav"));
    {
        // Navigate group
        IToolBarManager navToolBar = actionBarConfigurer.createToolBarManager();
        navToolBar.add(new Separator(IWorkbenchActionConstants.HISTORY_GROUP));
        navToolBar.add(new Separator(IWorkbenchActionConstants.GROUP_APP));
        navToolBar.add(new Separator(IWorkbenchActionConstants.PIN_GROUP));
        // Add to the cool bar manager
        coolBar.add(actionBarConfigurer.createToolBarContributionItem(navToolBar, IWorkbenchActionConstants.TOOLBAR_NAVIGATE));
    }
    coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_EDITOR));
    coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_HELP));
    {
        // Help group
        IToolBarManager helpToolBar = actionBarConfigurer.createToolBarManager();
        helpToolBar.add(new Separator(IWorkbenchActionConstants.GROUP_HELP));
        // Add the group for applications to contribute
        helpToolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_APP));
        // Add to the cool bar manager
        coolBar.add(actionBarConfigurer.createToolBarContributionItem(helpToolBar, IWorkbenchActionConstants.TOOLBAR_HELP));
    }
}
Also used : IToolBarManager(org.eclipse.jface.action.IToolBarManager) GroupMarker(org.eclipse.jface.action.GroupMarker) IActionBarConfigurer2(org.eclipse.ui.internal.provisional.application.IActionBarConfigurer2) Separator(org.eclipse.jface.action.Separator)

Aggregations

GroupMarker (org.eclipse.jface.action.GroupMarker)1 IToolBarManager (org.eclipse.jface.action.IToolBarManager)1 Separator (org.eclipse.jface.action.Separator)1 IActionBarConfigurer2 (org.eclipse.ui.internal.provisional.application.IActionBarConfigurer2)1