Package org.eclipse.ui.menus

Examples of org.eclipse.ui.menus.CommandContributionItem


          SWT.PUSH // style
      );
      itemParam.label = file.getName();
      itemParam.parameters = params;

      list[index++] = new CommandContributionItem(itemParam);
    }
    return list;
  }
View Full Code Here


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

      Map map = new HashMap();
      map.put("net.sf.logsaw.ui.commands.ShowFilterSettingsCommand.newField", fld.getKey()); //$NON-NLS-1$
      map.put("net.sf.logsaw.ui.commands.ShowFilterSettingsCommand.newOperator", Integer.toString(op.getId())); //$NON-NLS-1$
      map.put("net.sf.logsaw.ui.commands.ShowFilterSettingsCommand.newValue", editor.getFocusCellText()); //$NON-NLS-1$
      param.parameters = map;
      ret.add(new CommandContributionItem(param));
    }
   
      return ret.toArray(new IContributionItem[ret.size()]);
  }
View Full Code Here

    CommandContributionItemParameter p = new CommandContributionItemParameter(
        serviceLocator, "", command.getId(), CommandContributionItem.STYLE_PUSH);
   
    p.label = item.getName();
   
    CommandContributionItem contribItem = new CommandContributionItem(p);
    contribItem.setVisible(true);
   
    return contribItem;
  }
View Full Code Here

  }

  CommandContributionItem createContributionItem(
      CommandContributionItemParameter commandContributionItemParameter)
  {
    return new CommandContributionItem(commandContributionItemParameter);
  }
View Full Code Here

        .getActiveWorkbenchWindow();
    IHandlerService hsr = CommonUtils.getService(activeWorkbenchWindow, IHandlerService.class);
    IEvaluationContext ctx = hsr.getCurrentState();
    ctx.addVariable(ACTIVE_MENU_SELECTION_NAME, getContext().getSelection());

    return new CommandContributionItem(itemParam);
  }
View Full Code Here

  private CommandContributionItem createCommandContributionItem(
      String commandId) {
    CommandContributionItemParameter parameter = new CommandContributionItemParameter(
        getSite(), commandId, commandId,
        CommandContributionItem.STYLE_PUSH);
    return new CommandContributionItem(parameter);
  }
View Full Code Here

      IWorkbenchSite site) {
    CommandContributionItemParameter parameter = new CommandContributionItemParameter(
        site, commandId, commandId, CommandContributionItem.STYLE_PUSH);
    parameter.label = menuLabel;
    parameter.parameters = parameters;
    return new CommandContributionItem(parameter);
  }
View Full Code Here

      CommandContributionItemParameter parameter = new CommandContributionItemParameter(
          site, commandId, commandId,
          CommandContributionItem.STYLE_PUSH);
      parameter.label = menuLabel;
      parameter.parameters = parameters;
      return new CommandContributionItem(parameter);
    }
View Full Code Here

          CommandContributionItemParameter params = new CommandContributionItemParameter(
              this.serviceLocator, getClass().getName(),
              ActionCommands.PUSH_BRANCH_ACTION,
              CommandContributionItem.STYLE_PUSH);
          params.label = menuLabel;
          CommandContributionItem item = new CommandContributionItem(
              params);
          res.add(item);
        } catch (IOException ex) {
          Activator.handleError(ex.getLocalizedMessage(), ex, false);
        }
View Full Code Here

TOP

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

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.