Package org.eclipse.jface.action

Examples of org.eclipse.jface.action.IMenuManager.appendToGroup()


                targetMenu.appendToGroup(ADDITIONS_GROUP, groupItem);
            }
           
            targetMenu.appendToGroup(group, action);
            handleActionAccelerator(action, targetMenu, serviceReference);
            targetMenu.appendToGroup(group, new Separator());
            algorithmsToActions.put(getItemID(serviceReference), action);
            actionsToMenuManagers.put(action, targetMenu);
           
            Display.getDefault().asyncExec(this.updateAction);
        } else {
View Full Code Here


  public void contributeToMenu(IMenuManager menu) {
    super.contributeToMenu(menu);
   
    IMenuManager editMenu= menu.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
    if (editMenu != null) {
      editMenu.appendToGroup(ITextEditorActionConstants.GROUP_ASSIST, fQuickAssistMenuEntry);
      fQuickAssistMenuEntry.setVisible(false);
      editMenu.appendToGroup(ITextEditorActionConstants.GROUP_INFORMATION, fRetargetShowInformationAction);
    }
  }
View Full Code Here

   
    IMenuManager editMenu= menu.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
    if (editMenu != null) {
      editMenu.appendToGroup(ITextEditorActionConstants.GROUP_ASSIST, fQuickAssistMenuEntry);
      fQuickAssistMenuEntry.setVisible(false);
      editMenu.appendToGroup(ITextEditorActionConstants.GROUP_INFORMATION, fRetargetShowInformationAction);
    }
  }

  /*
   * @see IEditorActionBarContributor#setActiveEditor(org.eclipse.ui.IEditorPart)
View Full Code Here

      addOrInsert(editMenu, new Separator(ITextEditorActionConstants.GROUP_INFORMATION));
      addOrInsert(editMenu, new Separator(ITextEditorActionConstants.GROUP_ASSIST));
      addOrInsert(editMenu, new Separator(ITextEditorActionConstants.GROUP_GENERATE));
      addOrInsert(editMenu, new Separator(IWorkbenchActionConstants.MB_ADDITIONS));

      editMenu.appendToGroup(ITextEditorActionConstants.GROUP_ASSIST, fHippieCompletion);
    }

    IMenuManager navigateMenu= menu.findMenuUsingPath(IWorkbenchActionConstants.M_NAVIGATE);
    if (navigateMenu != null) {
      navigateMenu.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, fGotoLine);
View Full Code Here

      editMenu.appendToGroup(ITextEditorActionConstants.GROUP_ASSIST, fHippieCompletion);
    }

    IMenuManager navigateMenu= menu.findMenuUsingPath(IWorkbenchActionConstants.M_NAVIGATE);
    if (navigateMenu != null) {
      navigateMenu.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, fGotoLine);
    }
  }

  /**
   * The <code>item</code> is {@link IContributionManager#add(IContributionItem) added} to
View Full Code Here

    if (editMenu != null) {
      editMenu.insertBefore("additions", new Separator("amateras"));
      for(int i=0;i<actionIds.size();i++){
        RetargetTextEditorAction action = new RetargetTextEditorAction(HTMLPlugin.getDefault().getResourceBundle(), null);
        this.actions.add(action);
        editMenu.appendToGroup("amateras",action);
      }
    }
  }

}
View Full Code Here

    // Add action.
    try {
      if (popupmenu) {
        // Context menu need a newly created contribution item
        if (sep != null && sep.isGroupMarker())
          parent.appendToGroup(sep.getId(), ad.getAction());
        else
          parent.insertAfter(mgroup, ad.getAction());
      }
      else {
        // Normal menu need to add existing contribution item to
View Full Code Here

      }
      else {
        // Normal menu need to add existing contribution item to
        // remove it from menu listener
        if (sep != null && sep.isGroupMarker())
          parent.appendToGroup(sep.getId(), ad.getContributionItem());
        else
          parent.insertAfter(mgroup, ad.getContributionItem());
      }
    }
    catch (IllegalArgumentException e) {
View Full Code Here

  public void contributeToMenu(IMenuManager menu) {
    super.contributeToMenu(menu);

    IMenuManager editMenu= menu.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
    if (editMenu != null) {
      editMenu.appendToGroup(IContextMenuConstants.GROUP_ADDITIONS, fToggleInsertModeAction);
    }
/*
    addToMenu(menu);
*/
    if (extendedContributor != null) {
View Full Code Here

           
            // FIXME: for UNDO/REDO, maybe need also wrap them in
            // DesignerCommand.
            // otherwise don't have validate() called after the source
            // change.
            editSubmenu.appendToGroup(PageDesignerActionConstants.GROUP_UNDO,
                    getAction(IWorkbenchCommandConstants.EDIT_UNDO));
            editSubmenu.appendToGroup(PageDesignerActionConstants.GROUP_UNDO,
                    getAction(IWorkbenchCommandConstants.EDIT_REDO));

            editSubmenu.appendToGroup(PageDesignerActionConstants.GROUP_EDIT,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.