當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。