Java 类org.eclipse.jface.action.IToolBarManager 实例源码

项目:n4js    文件:N4JSActionBarContributionProvider.java   
@Override
public void topLevelElementChanged(final boolean workingSetTopLevel) {
    if (actionBars != null) {
        final IToolBarManager toolBarManager = actionBars.getToolBarManager();
        toolBarManager.remove(selectWorkingSetDelegate);
        toolBarManager.remove(showHiddenWorkingSetsDelegate);
        if (workingSetManagerBroker.isWorkingSetTopLevel()) {
            toolBarManager.add(selectWorkingSetDelegate);
            final WorkingSetManager manager = workingSetManagerBroker.getActiveManager();
            if (manager != null) {
                WorkingSet[] allItems = manager.getAllWorkingSets();
                WorkingSet[] items = manager.getWorkingSets();
                updateShowHiddenAction(allItems, items);
            }
        }
        selectTopLevelElementAction.fillActionBars(actionBars);
        actionBars.updateActionBars();
    }
}
项目:n4js    文件:N4JSActionBarContributionProvider.java   
private void updateShowHiddenAction(final WorkingSet[] allItems, final WorkingSet[] items) {
    final IToolBarManager toolBarManager = actionBars.getToolBarManager();
    toolBarManager.remove(showHiddenWorkingSetsDelegate);
    if (allItems.length > items.length) {
        toolBarManager.add(showHiddenWorkingSetsDelegate);
    }
}
项目:gemoc-studio-modeldebugging    文件:EnginesStatusView.java   
private void addActionToToolbar(Action action)
    {
        IActionBars actionBars = getViewSite().getActionBars();
//      IMenuManager dropDownMenu = actionBars.getMenuManager();
        IToolBarManager toolBar = actionBars.getToolBarManager();
//      dropDownMenu.add(action);
        toolBar.add(action);    
    }
项目:eclipse-batch-editor    文件:BatchEditorContentOutlinePage.java   
public void createControl(Composite parent) {
    super.createControl(parent);

    labelProvider = new BatchEditorOutlineLabelProvider();

    TreeViewer viewer = getTreeViewer();
    viewer.setContentProvider(contentProvider);
    viewer.addDoubleClickListener(this);
    viewer.setLabelProvider(new DelegatingStyledCellLabelProvider(labelProvider));
    viewer.addSelectionChangedListener(this);

    /* it can happen that input is already updated before control created */
    if (input != null) {
        viewer.setInput(input);
    }
    toggleLinkingAction = new ToggleLinkingAction();
    toggleLinkingAction.setActionDefinitionId(IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR);

    IActionBars actionBars = getSite().getActionBars();

    IToolBarManager toolBarManager = actionBars.getToolBarManager();
    toolBarManager.add(toggleLinkingAction);

    IMenuManager viewMenuManager = actionBars.getMenuManager();
    viewMenuManager.add(new Separator("EndFilterGroup")); //$NON-NLS-1$

    viewMenuManager.add(new Separator("treeGroup")); //$NON-NLS-1$
    viewMenuManager.add(toggleLinkingAction);


    /*
     * when no input is set on init state - let the editor rebuild outline
     * (async)
     */
    if (input == null && editor != null) {
        editor.rebuildOutline();
    }

}
项目:eZooKeeper    文件:DataModelFormEditor.java   
protected void contributeToToolBar(final IManagedForm headerForm, final IToolBarManager toolBarManager) {

        RefreshAction refreshAction = getRefreshAction();

        if (refreshAction != null) {
            toolBarManager.add(refreshAction);
        }

        DataModel<?, ?, ?> parentModel = getParentModel();
        DataModelElementType parentModelElementType = getParentModelElementType();
        if (parentModel != null && parentModelElementType != null) {
            final BaseControlContribution parentImageHyperlinkToolBarContribution = createImageHyperlinkToolBarContribution(
                    "Parent Link", parentModel, parentModelElementType);

            if (parentImageHyperlinkToolBarContribution != null) {
                addImageHyperlinkToolBarContribution(headerForm, toolBarManager,
                        parentImageHyperlinkToolBarContribution, parentModel);
            }
        }

        DataModel<?, ?, ?> ownerModel = getOwnerModel();
        DataModelElementType ownerModelElementType = getOwnerModelElementType();
        if (ownerModel != null && ownerModelElementType != null && ownerModel != parentModel) {
            final BaseControlContribution ownerImageHyperlinkToolBarContribution = createImageHyperlinkToolBarContribution(
                    "Owner Link", ownerModel, ownerModelElementType);

            if (ownerImageHyperlinkToolBarContribution != null) {
                addImageHyperlinkToolBarContribution(headerForm, toolBarManager,
                        ownerImageHyperlinkToolBarContribution, ownerModel);
            }
        }
    }
项目:eZooKeeper    文件:BaseZnodeModelFormPage.java   
@Override
protected void contributeToToolBar(IToolBarManager toolBarManager) {
    super.contributeToToolBar(toolBarManager);

    ControlContribution toolBarCompositeContribution = new ControlContribution(getToolBarCompositeContributionId()) {

        @Override
        protected Control createControl(Composite parent) {

            FormToolkit toolkit = getManagedForm().getToolkit();
            Composite toolBarComposite = toolkit.createComposite(parent);
            FormLayout toolBarCompositeLayout = new FormLayout();
            toolBarCompositeLayout.marginTop = 0;
            toolBarCompositeLayout.marginBottom = 0;
            toolBarCompositeLayout.marginLeft = 4;
            toolBarCompositeLayout.marginRight = 4;
            toolBarCompositeLayout.spacing = 4;
            toolBarComposite.setLayout(toolBarCompositeLayout);

            _ToolBarLabel = toolkit.createLabel(toolBarComposite, "", SWT.RIGHT);

            FormData toolBarLabelFormData = new FormData();
            toolBarLabelFormData.top = new FormAttachment(0, 0);
            toolBarLabelFormData.left = new FormAttachment(0, 0);
            toolBarLabelFormData.right = new FormAttachment(100, 0);

            // HACK: I really struggled to get this label to show up.
            toolBarLabelFormData.width = 100;

            _ToolBarLabel.setLayoutData(toolBarLabelFormData);

            return toolBarComposite;
        }
    };

    toolBarManager.add(toolBarCompositeContribution);

}
项目:neoscada    文件:ProtocolActionBarContributor.java   
/**
 * This adds Separators for editor additions to the tool bar.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
    toolBarManager.add ( new Separator ( "protocol-settings" ) ); //$NON-NLS-1$
    toolBarManager.add ( new Separator ( "protocol-additions" ) ); //$NON-NLS-1$
}
项目:neoscada    文件:ApplicationActionBarAdvisor.java   
@Override
protected void fillCoolBar ( final ICoolBarManager coolBar )
{
    final IToolBarManager toolbar = new ToolBarManager ( SWT.FLAT | SWT.RIGHT );
    coolBar.add ( new ToolBarContributionItem ( toolbar, "main" ) );
    toolbar.add ( getAction ( ActionFactory.NEW_WIZARD_DROP_DOWN.getId () ) );
    coolBar.add ( new GroupMarker ( IWorkbenchActionConstants.MB_ADDITIONS ) );
}
项目:neoscada    文件:ChartActionBarContributor.java   
/**
 * This adds Separators for editor additions to the tool bar. <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated
 */
@Override
public void contributeToToolBar ( final IToolBarManager toolBarManager )
{
    toolBarManager.add ( new Separator ( "chart-settings" ) );
    toolBarManager.add ( new Separator ( "chart-additions" ) );
}
项目:neoscada    文件:DetailViewActionBarContributor.java   
/**
 * This adds Separators for editor additions to the tool bar.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
    toolBarManager.add ( new Separator ( "detailview-settings" ) ); //$NON-NLS-1$
    toolBarManager.add ( new Separator ( "detailview-additions" ) ); //$NON-NLS-1$
}
项目:neoscada    文件:VisualInterfaceActionBarContributor.java   
/**
 * This adds Separators for editor additions to the tool bar.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
    toolBarManager.add ( new Separator ( "visualinterface-settings" ) ); //$NON-NLS-1$
    toolBarManager.add ( new Separator ( "visualinterface-additions" ) ); //$NON-NLS-1$
}
项目:neoscada    文件:DeploymentActionBarContributor.java   
/**
 * This adds Separators for editor additions to the tool bar.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
    toolBarManager.add ( new Separator ( "deployment-settings" ) ); //$NON-NLS-1$
    toolBarManager.add ( new Separator ( "deployment-additions" ) ); //$NON-NLS-1$
}
项目:neoscada    文件:SetupActionBarContributor.java   
/**
 * This adds Separators for editor additions to the tool bar.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
    toolBarManager.add ( new Separator ( "setup-settings" ) ); //$NON-NLS-1$
    toolBarManager.add ( new Separator ( "setup-additions" ) ); //$NON-NLS-1$
}
项目:neoscada    文件:OsgiActionBarContributor.java   
/**
 * This adds Separators for editor additions to the tool bar.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
    toolBarManager.add ( new Separator ( "osgi-settings" ) ); //$NON-NLS-1$
    toolBarManager.add ( new Separator ( "osgi-additions" ) ); //$NON-NLS-1$
}
项目:neoscada    文件:WorldActionBarContributor.java   
/**
 * This adds Separators for editor additions to the tool bar.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
    toolBarManager.add ( new Separator ( "world-settings" ) ); //$NON-NLS-1$
    toolBarManager.add ( new Separator ( "world-additions" ) ); //$NON-NLS-1$
}
项目:neoscada    文件:MemoryActionBarContributor.java   
/**
 * This adds Separators for editor additions to the tool bar.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
    toolBarManager.add ( new Separator ( "memory-settings" ) );
    toolBarManager.add ( new Separator ( "memory-additions" ) );
}
项目:neoscada    文件:RecipeActionBarContributor.java   
/**
 * This adds Separators for editor additions to the tool bar.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
    toolBarManager.add ( new Separator ( "recipe-settings" ) ); //$NON-NLS-1$
    toolBarManager.add ( new Separator ( "recipe-additions" ) ); //$NON-NLS-1$
}
项目:neoscada    文件:InfrastructureActionBarContributor.java   
/**
 * This adds Separators for editor additions to the tool bar.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
    toolBarManager.add ( new Separator ( "infrastructure-settings" ) ); //$NON-NLS-1$
    toolBarManager.add ( new Separator ( "infrastructure-additions" ) ); //$NON-NLS-1$
}
项目:RefDiff    文件:TreeView.java   
/**
 * This is a callback that will allow us to create the viewer and initialize
 * it.
 */
public void createPartControl(Composite parent) {
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    parent.setLayout(layout);

    layoutData1 = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
    layoutData1.grabExcessHorizontalSpace = true;
    layoutData1.grabExcessVerticalSpace = true;
    layoutData1.horizontalAlignment = GridData.FILL;
    layoutData1.verticalAlignment = GridData.FILL;
    layoutData1.exclude = false;

    this.parent = parent;
    viewer = new List(this.parent, SWT.SINGLE | SWT.V_SCROLL);
    list = new List(this.parent, SWT.SINGLE | SWT.V_SCROLL);
    viewer.setLayoutData(layoutData1);
    list.setLayoutData(layoutData1);

    parent.layout();

    makeActions();
    hookDoubleClickAction();
    contributeToActionBars();

    IToolBarManager mgr = getViewSite().getActionBars().getToolBarManager();
    mgr.add(selectAction);
}
项目:neoscada    文件:ItemActionBarContributor.java   
/**
 * This adds Separators for editor additions to the tool bar.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
    toolBarManager.add ( new Separator ( "item-settings" ) ); //$NON-NLS-1$
    toolBarManager.add ( new Separator ( "item-additions" ) ); //$NON-NLS-1$
}
项目:neoscada    文件:ConfigurationActionBarContributor.java   
/**
 * This adds Separators for editor additions to the tool bar.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void contributeToToolBar ( IToolBarManager toolBarManager )
{
    toolBarManager.add ( new Separator ( "configuration-settings" ) ); //$NON-NLS-1$
    toolBarManager.add ( new Separator ( "configuration-additions" ) ); //$NON-NLS-1$
}
项目:convertigo-eclipse    文件:EngineLogView.java   
private void createToolbar() {
    IToolBarManager manager = getViewSite().getActionBars().getToolBarManager();
    manager.add(settingsEngine);
    manager.add(optionsAction);
    manager.add(searchAction);
    manager.add(clearLogsAction);
    manager.add(scrollLockAction);
}
项目:eclipse-bash-editor    文件:BashEditorContentOutlinePage.java   
public void createControl(Composite parent) {
    super.createControl(parent);

    labelProvider = new BashEditorOutlineLabelProvider();

    TreeViewer viewer = getTreeViewer();
    viewer.setContentProvider(contentProvider);
    viewer.addDoubleClickListener(this);
    viewer.setLabelProvider(new DelegatingStyledCellLabelProvider(labelProvider));
    viewer.addSelectionChangedListener(this);

    /* it can happen that input is already updated before control created */
    if (input != null) {
        viewer.setInput(input);
    }
    toggleLinkingAction = new ToggleLinkingAction();
    toggleLinkingAction.setActionDefinitionId(IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR);

    IActionBars actionBars = getSite().getActionBars();

    IToolBarManager toolBarManager = actionBars.getToolBarManager();
    toolBarManager.add(toggleLinkingAction);

    IMenuManager viewMenuManager = actionBars.getMenuManager();
    viewMenuManager.add(new Separator("EndFilterGroup")); //$NON-NLS-1$

    viewMenuManager.add(new Separator("treeGroup")); //$NON-NLS-1$
    viewMenuManager.add(toggleLinkingAction);


    /*
     * when no input is set on init state - let the editor rebuild outline
     * (async)
     */
    if (input == null && editor != null) {
        editor.rebuildOutline();
    }

}
项目:Open_Source_ECOA_Toolset_AS5    文件:GraphicalEditorContributor.java   
@Override
public void contributeToToolBar(IToolBarManager toolBarManager) {
    super.contributeToToolBar(toolBarManager);
    toolBarManager.add(getAction(ActionFactory.UNDO.getId()));
    toolBarManager.add(getAction(ActionFactory.REDO.getId()));
    toolBarManager.add(getAction(ActionFactory.DELETE.getId()));
}
项目:gw4e.project    文件:GW4EEditorActionBarContributor.java   
public void contributeToToolBar(IToolBarManager toolBarManager) {
    toolBarManager.add(getAction(ActionFactory.UNDO.getId()));
    toolBarManager.add(getAction(ActionFactory.REDO.getId()));
    toolBarManager.add(getAction(ActionFactory.DELETE.getId()));  
    toolBarManager.add(new Separator());
    toolBarManager.add(getAction(GEFActionConstants.ZOOM_IN));
    toolBarManager.add(getAction(GEFActionConstants.ZOOM_OUT));
    toolBarManager.add(new ZoomComboContributionItem(getPage()));
    toolBarManager.add(getAction(GEFActionConstants.TOGGLE_GRID_VISIBILITY));
    toolBarManager.add(getAction(GEFActionConstants.TOGGLE_SNAP_TO_GEOMETRY)); 
    toolBarManager.add(getAction(ActionFactory.COPY.getId()));
    toolBarManager.add(getAction(ActionFactory.PASTE.getId()));
    toolBarManager.add(new Separator());
    toolBarManager.add(getAction(ClearEdgeBendpointLayoutAction.ID));
}
项目:com.onpositive.prefeditor    文件:PreferenceView.java   
private void fillLocalToolBar(IToolBarManager manager) {
    manager.add(collapseAllAction);
    manager.add(trackAction);
    manager.add(reloadAction);
    if (activePage instanceof FolderViewerPage) {
        manager.add(chooseFolderAction);
    }
    if (activePage instanceof PlatformViewerPage) {
        manager.add(showReadOnlyAction);
    }
    manager.add(viewModeAction);
    manager.add(addAction);
    manager.add(removeAction);
    manager.add(copyAction);
}
项目:bdf2    文件:DbToolGefEditorActionBarContributor.java   
public void contributeToToolBar(IToolBarManager toolBarManager) {
    toolBarManager.add(getAction(ActionFactory.DELETE.getId()));
    toolBarManager.add(getAction(ActionFactory.UNDO.getId()));
    toolBarManager.add(getAction(ActionFactory.REDO.getId()));
    toolBarManager.add(new Separator());
    toolBarManager.add(getAction(GEFActionConstants.TOGGLE_GRID_VISIBILITY));
    toolBarManager.add(new Separator());
    toolBarManager.add(getAction(GEFActionConstants.ZOOM_IN));
    toolBarManager.add(getAction(GEFActionConstants.ZOOM_OUT));
    String[] zoomStrings = new String[] { ZoomManager.FIT_ALL, ZoomManager.FIT_HEIGHT, ZoomManager.FIT_WIDTH };
    toolBarManager.add(new ZoomComboContributionItem(getPage(), zoomStrings));
}
项目:RefDiff    文件:TreeView.java   
private void fillLocalToolBar(IToolBarManager manager) {
}
项目:n4js    文件:TestResultsView.java   
private void fillCustomToolBar(IToolBarManager manager) {
    manager.add(actionShowHistory);
}
项目:smarthome-cep-demonstrator    文件:SmarthomeEditor.java   
/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
 * @generated
 */
   public IContentOutlinePage getContentOutlinePage() {
    if (contentOutlinePage == null) {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage {
            @Override
            public void createControl(Composite parent) {
                super.createControl(parent);
                contentOutlineViewer = getTreeViewer();
                contentOutlineViewer.addSelectionChangedListener(this);

                // Set up the tree viewer.
                //
                contentOutlineViewer.setUseHashlookup(true);
                contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
                contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
                contentOutlineViewer.setInput(editingDomain.getResourceSet());

                // Make sure our popups work.
                //
                createContextMenuFor(contentOutlineViewer);

                if (!editingDomain.getResourceSet().getResources().isEmpty()) {
                  // Select the root object in the view.
                  //
                  contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
                }
            }

            @Override
            public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
                super.makeContributions(menuManager, toolBarManager, statusLineManager);
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars(IActionBars actionBars) {
                super.setActionBars(actionBars);
                getActionBarContributor().shareGlobalActions(this, actionBars);
            }
        }

        contentOutlinePage = new MyContentOutlinePage();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener
            (new ISelectionChangedListener() {
                 // This ensures that we handle selections correctly.
                 //
                 public void selectionChanged(SelectionChangedEvent event) {
                     handleContentOutlineSelection(event.getSelection());
                 }
             });
    }

    return contentOutlinePage;
}
项目:SimQRI    文件:MetamodelEditor.java   
/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage() {
    if (contentOutlinePage == null) {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage {
            @Override
            public void createControl(Composite parent) {
                super.createControl(parent);
                contentOutlineViewer = getTreeViewer();
                contentOutlineViewer.addSelectionChangedListener(this);

                // Set up the tree viewer.
                //
                contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
                contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
                contentOutlineViewer.setInput(editingDomain.getResourceSet());

                // Make sure our popups work.
                //
                createContextMenuFor(contentOutlineViewer);

                if (!editingDomain.getResourceSet().getResources().isEmpty()) {
                  // Select the root object in the view.
                  //
                  contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
                }
            }

            @Override
            public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
                super.makeContributions(menuManager, toolBarManager, statusLineManager);
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars(IActionBars actionBars) {
                super.setActionBars(actionBars);
                getActionBarContributor().shareGlobalActions(this, actionBars);
            }
        }

        contentOutlinePage = new MyContentOutlinePage();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener
            (new ISelectionChangedListener() {
                 // This ensures that we handle selections correctly.
                 //
                 public void selectionChanged(SelectionChangedEvent event) {
                     handleContentOutlineSelection(event.getSelection());
                 }
             });
    }

    return contentOutlinePage;
}
项目:gemoc-studio-modeldebugging    文件:TracingannotationsEditor.java   
/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage() {
    if (contentOutlinePage == null) {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage {
            @Override
            public void createControl(Composite parent) {
                super.createControl(parent);
                contentOutlineViewer = getTreeViewer();
                contentOutlineViewer.addSelectionChangedListener(this);

                // Set up the tree viewer.
                //
                contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
                contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
                contentOutlineViewer.setInput(editingDomain.getResourceSet());

                // Make sure our popups work.
                //
                createContextMenuFor(contentOutlineViewer);

                if (!editingDomain.getResourceSet().getResources().isEmpty()) {
                  // Select the root object in the view.
                  //
                  contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
                }
            }

            @Override
            public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
                super.makeContributions(menuManager, toolBarManager, statusLineManager);
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars(IActionBars actionBars) {
                super.setActionBars(actionBars);
                getActionBarContributor().shareGlobalActions(this, actionBars);
            }
        }

        contentOutlinePage = new MyContentOutlinePage();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener
            (new ISelectionChangedListener() {
                 // This ensures that we handle selections correctly.
                 //
                 public void selectionChanged(SelectionChangedEvent event) {
                     handleContentOutlineSelection(event.getSelection());
                 }
             });
    }

    return contentOutlinePage;
}
项目:gemoc-studio-modeldebugging    文件:StateGraphViewPart.java   
private void addActionToToolbar(Action action) {
    IActionBars actionBars = getViewSite().getActionBars();
    IToolBarManager toolBar = actionBars.getToolBarManager();
    toolBar.add(action);
}
项目:gemoc-studio-modeldebugging    文件:TimelineDiffViewerViewPart.java   
private void addActionToToolbar(Action action) {
    IActionBars actionBars = getViewSite().getActionBars();
    IToolBarManager toolBar = actionBars.getToolBarManager();
    toolBar.add(action);
}
项目:gemoc-studio-modeldebugging    文件:MultidimensionalTimelineViewPart.java   
private void addActionToToolbar(Action action) {
    IActionBars actionBars = getViewSite().getActionBars();
    IToolBarManager toolBar = actionBars.getToolBarManager();
    toolBar.add(action);
}
项目:bdf2    文件:PropEditorContributor.java   
public void contributeToToolBar(IToolBarManager manager) {
}
项目:bdf2    文件:EditorActionBarContributor.java   
private void contributeGraphicalEditorToolBarAction(IToolBarManager toolBarManager) {
    toolBarManager.add(actionMap.get(ActionFactory.UNDO.getId()));
    toolBarManager.add(actionMap.get(ActionFactory.REDO.getId()));
    toolBarManager.add(actionMap.get(ActionFactory.DELETE.getId()));
    toolBarManager.add(actionMap.get(GEFActionConstants.TOGGLE_GRID_VISIBILITY));
}
项目:eZooKeeper    文件:DataModelFormPage.java   
protected void contributeToToolBar(IToolBarManager toolBarManager) {
}
项目:OCCI-Studio    文件:PlatformEditor.java   
/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage() {
    if (contentOutlinePage == null) {
        // The content outline is just a tree.
        //
        class MyContentOutlinePage extends ContentOutlinePage {
            @Override
            public void createControl(Composite parent) {
                super.createControl(parent);
                contentOutlineViewer = getTreeViewer();
                contentOutlineViewer.addSelectionChangedListener(this);

                // Set up the tree viewer.
                //
                contentOutlineViewer.setUseHashlookup(true);
                contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
                contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
                contentOutlineViewer.setInput(editingDomain.getResourceSet());

                // Make sure our popups work.
                //
                createContextMenuFor(contentOutlineViewer);

                if (!editingDomain.getResourceSet().getResources().isEmpty()) {
                  // Select the root object in the view.
                  //
                  contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
                }
            }

            @Override
            public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
                super.makeContributions(menuManager, toolBarManager, statusLineManager);
                contentOutlineStatusLineManager = statusLineManager;
            }

            @Override
            public void setActionBars(IActionBars actionBars) {
                super.setActionBars(actionBars);
                getActionBarContributor().shareGlobalActions(this, actionBars);
            }
        }

        contentOutlinePage = new MyContentOutlinePage();

        // Listen to selection so that we can handle it is a special way.
        //
        contentOutlinePage.addSelectionChangedListener
            (new ISelectionChangedListener() {
                 // This ensures that we handle selections correctly.
                 //
                 public void selectionChanged(SelectionChangedEvent event) {
                     handleContentOutlineSelection(event.getSelection());
                 }
             });
    }

    return contentOutlinePage;
}
项目:bdf2    文件:GraphicalPageActionBarContributor.java   
@Override
public void contributeToToolBar(IToolBarManager toolBarManager) {
    toolBarManager.add(this.getAction(ActionFactory.REDO.getId()));
    toolBarManager.add(this.getAction(ActionFactory.UNDO.getId()));
}