當前位置: 首頁>>代碼示例>>Java>>正文


Java IContributionManager.add方法代碼示例

本文整理匯總了Java中org.eclipse.jface.action.IContributionManager.add方法的典型用法代碼示例。如果您正苦於以下問題:Java IContributionManager.add方法的具體用法?Java IContributionManager.add怎麽用?Java IContributionManager.add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.jface.action.IContributionManager的用法示例。


在下文中一共展示了IContributionManager.add方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: populateManager

import org.eclipse.jface.action.IContributionManager; //導入方法依賴的package包/類
/**
 * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection,
 * by inserting them before the specified contribution item <code>contributionID</code>.
 * If <code>contributionID</code> is <code>null</code>, they are simply added.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void populateManager ( IContributionManager manager, Collection<? extends IAction> actions, String contributionID )
{
    if ( actions != null )
    {
        for ( IAction action : actions )
        {
            if ( contributionID != null )
            {
                manager.insertBefore ( contributionID, action );
            }
            else
            {
                manager.add ( action );
            }
        }
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:27,代碼來源:GlobalizeActionBarContributor.java

示例2: populateManager

import org.eclipse.jface.action.IContributionManager; //導入方法依賴的package包/類
/**
 * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s based on the {@link org.eclipse.jface.action.IAction}s contained in the
 * <code>actions</code> collection, by inserting them before the specified contribution item <code>contributionID</code>. If <code>contributionID</code> is <code>null</code>, they are simply
 * added. <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated
 */
protected void populateManager ( final IContributionManager manager, final Collection<? extends IAction> actions, final String contributionID )
{
    if ( actions != null )
    {
        for ( final IAction action : actions )
        {
            if ( contributionID != null )
            {
                manager.insertBefore ( contributionID, action );
            }
            else
            {
                manager.add ( action );
            }
        }
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:25,代碼來源:ChartActionBarContributor.java

示例3: fillToolbar

import org.eclipse.jface.action.IContributionManager; //導入方法依賴的package包/類
private void fillToolbar ( final IContributionManager contributionManager )
{
    contributionManager.add ( new SetTimespanAction ( 1, TimeUnit.MINUTES, "<1m>", "Scale to one minute" ) );
    contributionManager.add ( new SetTimespanAction ( 1, TimeUnit.HOURS, "<1h>", "Scale to one hour" ) );
    contributionManager.add ( new SetTimespanAction ( 1, TimeUnit.DAYS, "<1d>", "Scale to one day" ) );

    contributionManager.add ( new CenterNowAction () );

    contributionManager.add ( new Separator () );

    contributionManager.add ( new PageTimespanAction ( -1, TimeUnit.DAYS, "<1d", "Move back 1 day" ) );
    contributionManager.add ( new PageTimespanAction ( -1, TimeUnit.HOURS, "<1h", "Move back 1 hour" ) );
    contributionManager.add ( new PageTimespanAction ( -1, TimeUnit.MINUTES, "<1m", "Move back 1 minute" ) );

    contributionManager.add ( new Separator () );

    contributionManager.add ( new PageTimespanAction ( 1, TimeUnit.MINUTES, "1m>", "Move forward 1 minute" ) );
    contributionManager.add ( new PageTimespanAction ( 1, TimeUnit.HOURS, "1h>", "Move forward 1 hour" ) );
    contributionManager.add ( new PageTimespanAction ( 1, TimeUnit.DAYS, "1d>", "Move forward 1 day" ) );

    contributionManager.add ( new Separator () );

    contributionManager.add ( new HelpAction () );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:25,代碼來源:AbstractChartView.java

示例4: populateManager

import org.eclipse.jface.action.IContributionManager; //導入方法依賴的package包/類
/**
 * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.MenuManager}s containing
 * {@link org.eclipse.jface.action.ActionContributionItem}s based on the {@link org.eclipse.jface.action.IAction}s
 * contained in the <code>submenuActions</code> collection, by inserting them before the specified contribution
 * item <code>contributionID</code>.
 * If <code>contributionID</code> is <code>null</code>, they are simply added.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void populateManager ( IContributionManager manager, Map<String, Collection<IAction>> submenuActions, String contributionID )
{
    if ( submenuActions != null )
    {
        for ( Map.Entry<String, Collection<IAction>> entry : submenuActions.entrySet () )
        {
            MenuManager submenuManager = new MenuManager ( entry.getKey () );
            if ( contributionID != null )
            {
                manager.insertBefore ( contributionID, submenuManager );
            }
            else
            {
                manager.add ( submenuManager );
            }
            populateManager ( submenuManager, entry.getValue (), null );
        }
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:30,代碼來源:OsgiActionBarContributor.java

示例5: populateManager

import org.eclipse.jface.action.IContributionManager; //導入方法依賴的package包/類
/**
 * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection,
 * by inserting them before the specified contribution item <code>contributionID</code>.
 * If <code>contributionID</code> is <code>null</code>, they are simply added.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) {
	if (actions != null) {
		for (IAction action : actions) {
			if (contributionID != null) {
				manager.insertBefore(contributionID, action);
			}
			else {
				manager.add(action);
			}
		}
	}
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:22,代碼來源:AnalysisActionBarContributor.java

示例6: addGroup

import org.eclipse.jface.action.IContributionManager; //導入方法依賴的package包/類
private void addGroup(String id, IContributionManager manager, IAction... actions) {
	manager.add(new Separator(id));
	for (IAction action : actions) {
		manager.add(action);
	}
}
 
開發者ID:eclipse,項目名稱:scanning,代碼行數:7,代碼來源:ScanRegionView.java


注:本文中的org.eclipse.jface.action.IContributionManager.add方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。