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


Java ActionContributionItem.fill方法代码示例

本文整理汇总了Java中org.eclipse.jface.action.ActionContributionItem.fill方法的典型用法代码示例。如果您正苦于以下问题:Java ActionContributionItem.fill方法的具体用法?Java ActionContributionItem.fill怎么用?Java ActionContributionItem.fill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.action.ActionContributionItem的用法示例。


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

示例1: getSubActionMenu

import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
protected Menu getSubActionMenu(final Control parent) {
    if (subActionMenu != null) {
        return subActionMenu;
    }

    subActionMenu = new Menu(parent);

    for (final Iterator<IAction> it = subActions.iterator(); it.hasNext();) {
        final IAction subAction = it.next();
        final ActionContributionItem aci = new ActionContributionItem(subAction);
        aci.fill(subActionMenu, -1);
        final MenuItem menuItem = subActionMenu.getItem(subActionMenu.getItemCount() - 1);
        menuItem.addSelectionListener(menuItemSelectionListener);
    }

    return subActionMenu;
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:18,代码来源:ToolbarPulldownAction.java

示例2: getMenu

import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
/**
 * Refresh the menu field.
 * 
 * @see IMenuCreator#getMenu(Control)
 */
@Override
public Menu getMenu(Control parent) {

	// Dispose of the old menu
	if (menu != null) {
		menu.dispose();
	}
	// Put all the actions into a new menu
	menu = new Menu(parent);

	for (Action action : addActions) {
		ActionContributionItem item = new ActionContributionItem(action);
		item.fill(menu, -1);
	}

	return menu;
}
 
开发者ID:eclipse,项目名称:eavp,代码行数:23,代码来源:AddFileAction.java

示例3: getMenu

import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
/**
 * <p>
 * Returns the Menu generated by this DropdownAction
 * </p>
 * 
 * @param parent
 *            <p>
 *            The parent Control instance
 *            </p>
 * @return
 *         <p>
 *         The menu generated by this DropdownAction
 *         </p>
 */
@Override
public Menu getMenu(Control parent) {

    // Dispose of the old menu

    if (menu != null) {
        menu.dispose();
    }
    // Put all the actions into a new menu

    menu = new Menu(parent);

    for (Action action : childActions) {
        ActionContributionItem item = new ActionContributionItem(action);
        item.fill(menu, -1);
    }

    return menu;

}
 
开发者ID:eclipse,项目名称:eavp,代码行数:35,代码来源:DropdownAction.java

示例4: getMenu

import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
public Menu getMenu(Control parent) {
    if (menu != null) {
        menu.dispose();
    }
    
    menu = new Menu(parent);
    for (Iterator<Context> i = contexts.iterator(); i.hasNext(); ) {
        Context context = (Context)i.next();
        if (context.isVisible()) {
            Action action = createContextAction(context);
            ActionContributionItem item= new ActionContributionItem(action);
            item.fill(menu, -1);
        }
    }
    return menu;
}
 
开发者ID:Elphel,项目名称:vdt-plugin,代码行数:17,代码来源:ContextsAction.java

示例5: getMenu

import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
@Override
public Menu getMenu(Control parent) {
	Menu menu=new Menu(parent);		
	ActionContributionItem gridViewMenuitem=new ActionContributionItem(actionFactory.getAction(GridViewAction.class.getName()));
	ActionContributionItem formattedViewMenuItem=new ActionContributionItem(actionFactory.getAction(FormattedViewAction.class.getName()));
	ActionContributionItem unformattedViewMenuItem=new ActionContributionItem(actionFactory.getAction(UnformattedViewAction.class.getName()));
	
	gridViewMenuitem.fill(menu, 0);
	formattedViewMenuItem.fill(menu,1);
	unformattedViewMenuItem.fill(menu,2);
	
	return menu;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:14,代码来源:ViewDataGridMenuCreator.java

示例6: createButtonsForButtonBar

import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
@Override
protected void createButtonsForButtonBar(Composite parent) {
	// create buttons
	((GridLayout) parent.getLayout()).numColumns++;// for layout
	ActionContributionItem licenceContrib = new ActionContributionItem(new LicenseAction());
	licenceContrib.fill(parent);
	Button okBtn = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);

}
 
开发者ID:nresare,项目名称:javapasswordsafe,代码行数:10,代码来源:AboutDialog.java

示例7: getMenu

import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
@Override
public Menu getMenu(Control parent) {
	if(menu != null && !menu.isDisposed()) {
		menu.dispose();
	}
	menu = new Menu(parent);
	
	int i = 0;
	for(ActionContributionItem item : items) {
		item.fill(menu, i);
		i++;
	}		
	
	return menu;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:16,代码来源:TemplatePlanViewAddNewItemPulldownAction.java

示例8: getMenu

import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
public Menu getMenu(Control parent) {
	if (fMenu == null) {
		fMenu= new Menu(parent);
		OpenTypeWizardAction[] actions= getActionFromDescriptors();
		for (int i= 0; i < actions.length; i++) {
			OpenTypeWizardAction curr= actions[i];
			curr.setShell(fWizardShell);
			ActionContributionItem item= new ActionContributionItem(curr);
			item.fill(fMenu, -1);
		}

	}
	return fMenu;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:15,代码来源:NewTypeDropDownAction.java

示例9: addActionToMenu

import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
protected void addActionToMenu(Menu parent, Action action) {
	final ActionContributionItem item = new ActionContributionItem(action);
	item.fill(parent, -1);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:5,代码来源:ShowHistoryAction.java

示例10: CopiableLabel

import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
public CopiableLabel(final org.eclipse.swt.widgets.Composite parent, final int style) {
    super(parent, style);

    final Clipboard clipboard = new Clipboard(parent.getDisplay());

    final Menu menu = new Menu(this);
    final Action copyAction = new CopyLabelAction(this, clipboard);
    copyAction.setText(Messages.getString("CopiableLabel.CopyActionText")); //$NON-NLS-1$
    copyAction.setToolTipText(Messages.getString("CopiableLabel.CopyActionTooltip")); //$NON-NLS-1$

    final ActionContributionItem contrib = new ActionContributionItem(copyAction);
    contrib.fill(menu, -1);

    setMenu(menu);

}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:17,代码来源:CopiableLabel.java

示例11: addActionToMenu

import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
private void addActionToMenu(Menu parent, Action action) {
	ActionContributionItem item= new ActionContributionItem(action);
	item.fill(parent, -1);			
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:5,代码来源:MergeResultsView.java

示例12: addActionToMenu

import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
protected void addActionToMenu( Menu parent, Action action){
   ActionContributionItem item = new ActionContributionItem(action);
   item.fill(parent, -1);
}
 
开发者ID:nextinterfaces,项目名称:http4e,代码行数:5,代码来源:ToolsAction.java

示例13: addActionToMenu

import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
protected void addActionToMenu(Menu parent, IAction action) {
	ActionContributionItem item = new ActionContributionItem(action);
	item.fill(parent, -1);
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:5,代码来源:DocumentationMenuAction.java

示例14: addSessionToMenu

import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
private void addSessionToMenu(Menu menu2, String name) {
    Action action = new SaveSessionAction(name);
    ActionContributionItem item = new ActionContributionItem(action);
    item.fill(menu2, -1);
}
 
开发者ID:iloveeclipse,项目名称:skin4eclipse,代码行数:6,代码来源:SaveSessionsPulldownMenu.java

示例15: addSessionToMenu

import org.eclipse.jface.action.ActionContributionItem; //导入方法依赖的package包/类
private void addSessionToMenu(Menu menu2, EditingSession session) {
    Action action = new OpenSessionAction(session);
    ActionContributionItem item = new ActionContributionItem(action);
    item.fill(menu2, -1);
}
 
开发者ID:iloveeclipse,项目名称:skin4eclipse,代码行数:6,代码来源:LoadSessionsPulldownMenu.java


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