本文整理汇总了Java中org.eclipse.jface.action.IContributionManager.insertBefore方法的典型用法代码示例。如果您正苦于以下问题:Java IContributionManager.insertBefore方法的具体用法?Java IContributionManager.insertBefore怎么用?Java IContributionManager.insertBefore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.action.IContributionManager
的用法示例。
在下文中一共展示了IContributionManager.insertBefore方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 );
}
}
}
}
示例2: 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 );
}
}
}
示例3: 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 );
}
}
}
}
示例4: 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);
}
}
}
}