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