/**
  * Creates and returns a contribution item representing the command to start the Mapping Mode for
  * a specific Running AUT.
  *
  * @param autId The ID of the Running AUT for which the Mapping Mode will be started.
  * @return the created contribution item.
  */
 private static IContributionItem createItem(AutIdentifier autId) {
   Map<String, Object> params = new HashMap<String, Object>();
   params.put(StartObservationModeHandler.RUNNING_AUT, autId);
   StringBuilder labelBuilder = new StringBuilder();
   labelBuilder.append(autId.getExecutableName());
   return CommandHelper.createContributionItem(
       RCPCommandIDs.START_OBSERVATION_MODE,
       params,
       labelBuilder.toString(),
       CommandContributionItem.STYLE_CHECK);
 }
Exemplo n.º 2
0
 /** {@inheritDoc} */
 protected void fillContextMenu(IMenuManager mgr) {
   CommandHelper.createContributionPushItem(mgr, IWorkbenchCommandConstants.EDIT_COPY);
   CommandHelper.createContributionPushItem(mgr, IWorkbenchCommandConstants.EDIT_PASTE);
   mgr.add(new Separator());
   mgr.add(new GroupMarker("editing")); // $NON-NLS-1$
   CommandHelper.createContributionPushItem(mgr, RCPCommandIDs.REVERT_CHANGES);
   mgr.add(new Separator());
   CommandHelper.createContributionPushItem(mgr, CommandIDs.DELETE_COMMAND_ID);
   mgr.add(
       CommandHelper.createContributionItem(
           RCPCommandIDs.FIND,
           null,
           Messages.FindContextMenu,
           CommandContributionItem.STYLE_PUSH));
   CommandHelper.createContributionPushItem(mgr, CommandIDs.OPEN_SPECIFICATION_COMMAND_ID);
   CommandHelper.createContributionPushItem(mgr, CommandIDs.SHOW_SPECIFICATION_COMMAND_ID);
   CommandHelper.createContributionPushItem(mgr, CommandIDs.EXPAND_TREE_ITEM_COMMAND_ID);
   mgr.add(new Separator());
   CommandHelper.createContributionPushItem(mgr, RCPCommandIDs.NEW_COMMENT);
   CommandHelper.createContributionPushItem(mgr, RCPCommandIDs.EDIT_COMMENT);
 }