Package org.eclipse.ui.menus

Examples of org.eclipse.ui.menus.CommandContributionItemParameter


  }
 
  protected CommandContributionItem createCommandContribution(String commandId) {
    IWorkbenchWindow svcLocator = getPage().getWorkbenchWindow();
    return new CommandContributionItem(
      new CommandContributionItemParameter(svcLocator, null, commandId, CommandContributionItem.STYLE_PUSH));
  }
View Full Code Here


        return (IContributionItem[]) items.toArray(new IContributionItem[items.size()]);
    }

    private void addCommand(MenuManager menuManager, List/* <IContributionItem> */items,
            String commandId) {
        CommandContributionItemParameter parm = new CommandContributionItemParameter(
                serviceLocator, null, commandId, CommandContributionItem.STYLE_PUSH);
        fillMenu(menuManager, items, new CommandContributionItem(parm));
    }
View Full Code Here

   * @param commandId the commandId for the new CommandContributionItem.  Must not be <code>null</code>.
   * @param rosterEntry the IRosterEntry for the new CommandContributionItem.  Must not be <code>null</code>.
   * @return CommandContributionItem created.  Must not return <code>null</code>.
   */
  protected CommandContributionItem createCommandContributionItemForEntry(String commandId, IRosterEntry rosterEntry) {
    CommandContributionItemParameter p = new CommandContributionItemParameter(serviceLocator, null, commandId, CommandContributionItem.STYLE_PUSH);
    p.icon = getRosterEntryImageDescriptor(rosterEntry);
    p.label = rosterEntry.getName();
    // 3.4 return new CommandContributionItem(serviceLocator, null, commandId, new HashMap(), getRosterEntryImageDescriptor(rosterEntry), null, null, rosterEntry.getName(), null, null, CommandContributionItem.STYLE_PUSH);
    return new CommandContributionItem(p);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.menus.CommandContributionItemParameter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.