当前位置: 首页>>代码示例>>Java>>正文


Java IToolBarManager类代码示例

本文整理汇总了Java中org.eclipse.jface.action.IToolBarManager的典型用法代码示例。如果您正苦于以下问题:Java IToolBarManager类的具体用法?Java IToolBarManager怎么用?Java IToolBarManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IToolBarManager类属于org.eclipse.jface.action包,在下文中一共展示了IToolBarManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: topLevelElementChanged

import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
@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();
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:20,代码来源:N4JSActionBarContributionProvider.java

示例2: updateShowHiddenAction

import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
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);
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:N4JSActionBarContributionProvider.java

示例3: addActionToToolbar

import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
private void addActionToToolbar(Action action)
	{
		IActionBars actionBars = getViewSite().getActionBars();
//		IMenuManager dropDownMenu = actionBars.getMenuManager();
		IToolBarManager toolBar = actionBars.getToolBarManager();
//		dropDownMenu.add(action);
		toolBar.add(action);	
	}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:9,代码来源:EnginesStatusView.java

示例4: createControl

import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
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();
	}

}
 
开发者ID:de-jcup,项目名称:eclipse-batch-editor,代码行数:40,代码来源:BatchEditorContentOutlinePage.java

示例5: contributeToToolBar

import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
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);
            }
        }
    }
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:33,代码来源:DataModelFormEditor.java

示例6: contributeToToolBar

import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
@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);

}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:39,代码来源:BaseZnodeModelFormPage.java

示例7: contributeToToolBar

import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
/**
 * 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$
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:13,代码来源:ProtocolActionBarContributor.java

示例8: fillCoolBar

import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
@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 ) );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:9,代码来源:ApplicationActionBarAdvisor.java

示例9: contributeToToolBar

import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
/**
 * 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" ) );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:12,代码来源:ChartActionBarContributor.java

示例10: contributeToToolBar

import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
/**
 * 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$
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:13,代码来源:DetailViewActionBarContributor.java

示例11: contributeToToolBar

import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
/**
 * 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$
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:13,代码来源:VisualInterfaceActionBarContributor.java

示例12: contributeToToolBar

import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
/**
 * 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$
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:13,代码来源:DeploymentActionBarContributor.java

示例13: contributeToToolBar

import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
/**
 * 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$
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:13,代码来源:SetupActionBarContributor.java

示例14: contributeToToolBar

import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
/**
 * 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$
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:13,代码来源:OsgiActionBarContributor.java

示例15: contributeToToolBar

import org.eclipse.jface.action.IToolBarManager; //导入依赖的package包/类
/**
 * 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$
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:13,代码来源:WorldActionBarContributor.java


注:本文中的org.eclipse.jface.action.IToolBarManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。