This method initializes menuHelp

@return javax.swing.JMenu
338225
public JMenu getMenuHelp() {
		if (menuHelp == null) {
			menuHelp = new JMenu();
			menuHelp.setText(Constant.messages.getString("menu.help")); // ZAP: i18n
			menuHelp.setMnemonic(Constant.messages.getChar("menu.help.mnemonic"));
			menuHelp.add(getMenuHelpAbout());
			menuHelp.add(getMenuHelpSupport());
		}
		return menuHelp;
	}
220456
@Override
	public Menu getContextMenu() {
		if (menu == null) {
			menu = new Menu();
			menu.addItem(new NewFeatureAction(mapWidget, this));
			menu.addItem(new EditFeatureAction(mapWidget, this));
			menu.addItem(new DeleteFeatureAction(mapWidget, this));
			menu.addItem(new MenuItemSeparator());
			menu.addItem(new DeselectAllAction(mapWidget.getMapModel()));
		}
		return menu;
	}
918525
def addHelpMenu(menuName, parentMenuFunction=None):
    '''
    
    '''

    parentMenuFunction = parentMenuFunction or iface.addPluginToMenu
    namespace = _callerName().split(".")[0]
    path = "file://{}".format(os.path.join(os.path.dirname(_callerPath()), "docs",  "html", "index.html"))    
    helpAction = QtWidgets.QAction(QgsApplication.getThemeIcon('/mActionHelpContents.svg'), 
                                    "Plugin help...", iface.mainWindow())
    helpAction.setObjectName(namespace + "help")
    helpAction.triggered.connect(lambda: openHelp(path))
    parentMenuFunction(menuName, helpAction)
    global _helpActions
    _helpActions[menuName] = helpAction
1096377
protected JMenu newHelpMenu(final ActionListener listener)
	{
		// Help menu
		final JMenu menuHelp = new JMenu(newLabelTextHelp());
		menuHelp.setMnemonic('H');

		// Help JMenuItems
		// Help content
		final JMenuItem mihHelpContent = JComponentFactory.newJMenuItem(newLabelTextContent(), 'c',
			'H');
		menuHelp.add(mihHelpContent);

		// 2. assign help to components
		CSH.setHelpIDString(mihHelpContent, newLabelTextOverview());
		// 3. handle events
		final CSH.DisplayHelpFromSource displayHelpFromSource = new CSH.DisplayHelpFromSource(
			helpBroker);
		mihHelpContent.addActionListener(displayHelpFromSource);
		// Donate
		final JMenuItem mihDonate = new JMenuItem(newLabelTextDonate());
		mihDonate.addActionListener(
			newOpenBrowserToDonateAction(newLabelTextDonate(), applicationFrame));
		menuHelp.add(mihDonate);
		// Licence
		final JMenuItem mihLicence = new JMenuItem(newLabelTextLicence());
		mihLicence.addActionListener(
			newShowLicenseFrameAction(newLabelTextLicence() + "Action", newLabelTextLicence()));
		menuHelp.add(mihLicence);
		// Info
		final JMenuItem mihInfo = new JMenuItem(newLabelTextInfo(), 'i'); // $NON-NLS-1$
		MenuExtensions.setCtrlAccelerator(mihInfo, 'I');

		mihInfo.addActionListener(newShowInfoDialogAction(newLabelTextInfo(),
			(Frame)applicationFrame, newLabelTextInfo()));
		menuHelp.add(mihInfo);

		return menuHelp;
	}
919991
function initContextMenuContainer(params) {
          // Destructuring
          var customClass = params.customClass;

          var $ul = $('<ul>');
          $ul.addClass('dropdown-menu');
          $ul.attr({ 'role': 'menu' });
          $ul.css({
            display: 'block',
            position: 'absolute',
            left: params.event.pageX + 'px',
            top: params.event.pageY + 'px',
            'z-index': 10000
          });

          if(customClass) { $ul.addClass(customClass); }

          return $ul;
        }
1285078
private void fillMenu() {
        isBugItem = new MenuItem(menu, SWT.RADIO);
        isBugItem.setText("Bug");
        notBugItem = new MenuItem(menu, SWT.RADIO);
        notBugItem.setText("Not Bug");

        isBugItem.addSelectionListener(new SelectionAdapter() {
            /*
             * (non-Javadoc)
             *
             * @see
             * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse
             * .swt.events.SelectionEvent)
             */
            @Override
            public void widgetSelected(SelectionEvent e) {
                if (bugInstance != null) {
                    classifyWarning(bugInstance, true);
                }
            }
        });

        notBugItem.addSelectionListener(new SelectionAdapter() {
            /*
             * (non-Javadoc)
             *
             * @see
             * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse
             * .swt.events.SelectionEvent)
             */
            @Override
            public void widgetSelected(SelectionEvent e) {
                if (bugInstance != null) {
                    classifyWarning(bugInstance, false);
                }
            }
        });

        menu.addMenuListener(new MenuAdapter() {
            @Override
            public void menuShown(MenuEvent e) {
                // Before showing the menu, sync its contents
                // with the current BugInstance (if any)
                if (DEBUG) {
                    System.out.println("Synchronizing menu!");
                }
                syncMenu();
            }
        });
    }
1253971
public CmsContextMenu createContextMenu() {

        m_entries = new ArrayList<I_CmsContextMenuEntry>();
        m_entries.add(
            new EditorModeEntry(
                Messages.get().key(Messages.GUI_ONLY_NAVIGATION_BUTTON_TITLE_0),
                EditorMode.navigation));
        m_entries.add(
            new EditorModeEntry(Messages.get().key(Messages.GUI_NON_NAVIGATION_BUTTON_TITLE_0), EditorMode.vfs));
        m_entries.add(
            new EditorModeEntry(Messages.get().key(Messages.GUI_ONLY_GALLERIES_BUTTON_TITLE_0), EditorMode.galleries));
        if (CmsCoreProvider.get().getUserInfo().isCategoryManager()) {
            m_entries.add(
                new EditorModeEntry(
                    Messages.get().key(Messages.GUI_CONTEXTMENU_CATEGORY_MODE_0),
                    EditorMode.categories));
        }
        if (m_canEditModelPages) {
            m_entries.add(new EditorModeEntry(Messages.get().key(Messages.GUI_MODEL_PAGES_0), EditorMode.modelpages));
        }
        if (CmsSitemapView.getInstance().getController().isLocaleComparisonEnabled()) {
            m_entries.add(
                new EditorModeEntry(Messages.get().key(Messages.GUI_LOCALECOMPARE_MODE_0), EditorMode.compareLocales));
        }

        CmsContextMenu menu = new CmsContextMenu(m_entries, false, getPopup());
        return menu;
    }
57868
public function create()
    {
        $menu = $this->handler->add($this->name, $this->getAttribute('position'))
                    ->title($this->getAttribute('title'))
                    ->link($this->getAttribute('link'))
                    ->handles($this->menu['link'] ?? null);

        $this->attachIcon($menu);
        $this->handleNestedMenu();

        return $this;
    }
928469
private JPopupMenu getJPopupMenu()
    {
        Container parent = this.getParent();
        while (parent != null)
        {
            if (parent instanceof JPopupMenu)
                return (JPopupMenu)parent;
            parent = parent.getParent();
        }
        return null;
    }
175626
JMenuBar createMainMenuBar() {
        JMenuBar menuBar = new JMenuBar();

        // Create JMenus for menuBar.
        JMenu fileMenu = newJMenu("menu.file_menu", "File");
        fileMenu.setMnemonic(KeyEvent.VK_F);
        JMenu editMenu = newJMenu("menu.edit_menu", "Edit");
        editMenu.setMnemonic(KeyEvent.VK_E);

        // Edit fileMenu JMenu object.
        JMenuItem openMenuItem = newJMenuItem("menu.open_item", "Open...", KeyEvent.VK_O);
        recentMenu = newJMenu("menu.recent_menu", "Recent");
        recentMenuCache = new RecentMenu(recentMenu);
        saveAsMenuItem = newJMenuItem("menu.saveas_item", "Save As...", KeyEvent.VK_A);
        JMenuItem importFilter = newJMenuItem("menu.importFilter_item", "Import bug filters...");
        JMenuItem exportFilter = newJMenuItem("menu.exportFilter_item", "Export bug filters...");

        JMenuItem exitMenuItem = null;
        if (!MainFrame.MAC_OS_X) {
            exitMenuItem = newJMenuItem("menu.exit", "Exit", KeyEvent.VK_X);
            exitMenuItem.addActionListener(evt -> mainFrame.callOnClose());
        }
        JMenu windowMenu = mainFrame.getGuiLayout().createWindowMenu();

        JMenuItem newProjectMenuItem = null;
        if (!FindBugs.isNoAnalysis()) {
            newProjectMenuItem = newJMenuItem("menu.new_item", "New Project", KeyEvent.VK_N);

            attachAcceleratorKey(newProjectMenuItem, KeyEvent.VK_N);

            newProjectMenuItem.addActionListener(evt -> mainFrame.createNewProjectFromMenuItem());
        }

        reconfigMenuItem.setEnabled(false);
        attachAcceleratorKey(reconfigMenuItem, KeyEvent.VK_F);
        reconfigMenuItem.addActionListener(evt -> new NewProjectWizard(mainFrame.getCurProject()));

        JMenuItem mergeMenuItem = newJMenuItem("menu.mergeAnalysis", "Merge Analysis...");

        mergeMenuItem.setEnabled(true);
        mergeMenuItem.addActionListener(evt -> mainFrame.getMainFrameLoadSaveHelper().mergeAnalysis());

        if (!FindBugs.isNoAnalysis()) {
            redoAnalysis = newJMenuItem("menu.rerunAnalysis", "Redo Analysis", KeyEvent.VK_R);

            redoAnalysis.setEnabled(false);
            attachAcceleratorKey(redoAnalysis, KeyEvent.VK_R);
            redoAnalysis.addActionListener(evt -> mainFrame.redoAnalysis());
        }
        closeProjectItem = newJMenuItem("menu.closeProject", "Close Project");
        closeProjectItem.addActionListener(e -> {
            mainFrame.getMainFrameLoadSaveHelper().closeProject();
            mainFrame.clearBugCollection();
        });
        closeProjectItem.setEnabled(false);


        openMenuItem.setEnabled(true);
        attachAcceleratorKey(openMenuItem, KeyEvent.VK_O);
        openMenuItem.addActionListener(evt -> mainFrame.getMainFrameLoadSaveHelper().open());

        saveAsMenuItem.addActionListener(evt -> mainFrame.getMainFrameLoadSaveHelper().saveAs());
        exportFilter.addActionListener(evt -> mainFrame.getMainFrameLoadSaveHelper().exportFilter());
        importFilter.addActionListener(evt -> mainFrame.getMainFrameLoadSaveHelper().importFilter());
        saveMenuItem.setEnabled(false);
        attachAcceleratorKey(saveMenuItem, KeyEvent.VK_S);
        saveMenuItem.addActionListener(evt -> mainFrame.getMainFrameLoadSaveHelper().save());

        if (!FindBugs.isNoAnalysis()) {
            fileMenu.add(newProjectMenuItem);
        }

        fileMenu.add(openMenuItem);
        fileMenu.add(recentMenu);
        fileMenu.addSeparator();
        fileMenu.add(saveAsMenuItem);
        fileMenu.add(saveMenuItem);
        fileMenu.addSeparator();
        fileMenu.add(reconfigMenuItem);
        if (!FindBugs.isNoAnalysis()) {
            fileMenu.add(redoAnalysis);
        }

        fileMenu.addSeparator();
        fileMenu.add(closeProjectItem);
        // fileMenu.add(mergeMenuItem);
        fileMenu.addSeparator();
        fileMenu.add(importFilter);
        fileMenu.add(exportFilter);

        if (exitMenuItem != null) {
            fileMenu.addSeparator();
            fileMenu.add(exitMenuItem);
        }

        menuBar.add(fileMenu);

        // Edit editMenu Menu object.
        JMenuItem cutMenuItem = new JMenuItem(new CutAction());
        JMenuItem copyMenuItem = new JMenuItem(new CopyAction());
        JMenuItem pasteMenuItem = new JMenuItem(new PasteAction());
        preferencesMenuItem = newJMenuItem("menu.preferences_menu", "Preferences...");
        groupByMenuItem = newJMenuItem("menu.sortConfiguration", "Sort Configuration...");
        JMenuItem goToLineMenuItem = newJMenuItem("menu.gotoLine", "Go to line...");

        attachAcceleratorKey(cutMenuItem, KeyEvent.VK_X);
        attachAcceleratorKey(copyMenuItem, KeyEvent.VK_C);
        attachAcceleratorKey(pasteMenuItem, KeyEvent.VK_V);

        preferencesMenuItem.addActionListener(evt -> mainFrame.preferences());

        groupByMenuItem.addActionListener(evt -> {
            SorterDialog.getInstance().setLocationRelativeTo(mainFrame);
            SorterDialog.getInstance().setVisible(true);
        });

        attachAcceleratorKey(goToLineMenuItem, KeyEvent.VK_L);
        goToLineMenuItem.addActionListener(evt -> {
            mainFrame.getGuiLayout().makeSourceVisible();
            try {
                int num = Integer.parseInt(JOptionPane.showInputDialog(mainFrame, "",
                        L10N.getLocalString("dlg.go_to_line_lbl", "Go To Line") + ":", JOptionPane.QUESTION_MESSAGE));
                mainFrame.getSourceCodeDisplayer().showLine(num);
            } catch (NumberFormatException e) {
            }
        });

        editMenu.add(cutMenuItem);
        editMenu.add(copyMenuItem);
        editMenu.add(pasteMenuItem);
        editMenu.addSeparator();
        editMenu.add(goToLineMenuItem);
        editMenu.addSeparator();
        // editMenu.add(selectAllMenuItem);
        // editMenu.addSeparator();
        if (!MainFrame.MAC_OS_X) {
            // Preferences goes in Findbugs menu and is handled by OSXAdapter
            editMenu.add(preferencesMenuItem);
        }

        menuBar.add(editMenu);

        if (windowMenu != null) {
            menuBar.add(windowMenu);
        }

        viewMenu = newJMenu("menu.view_menu", "View");
        setViewMenu();
        menuBar.add(viewMenu);

        final ActionMap map = mainFrame.getMainFrameTree().getTree().getActionMap();

        JMenu navMenu = newJMenu("menu.navigation", "Navigation");

        addNavItem(map, navMenu, "menu.expand", "Expand", "expand", KeyEvent.VK_RIGHT);
        addNavItem(map, navMenu, "menu.collapse", "Collapse", "collapse", KeyEvent.VK_LEFT);
        addNavItem(map, navMenu, "menu.up", "Up", "selectPrevious", KeyEvent.VK_UP);
        addNavItem(map, navMenu, "menu.down", "Down", "selectNext", KeyEvent.VK_DOWN);

        menuBar.add(navMenu);

        if (!MainFrame.MAC_OS_X) {
            // On Mac, 'About' appears under Findbugs menu, so no need for it
            // here
            JMenu helpMenu = newJMenu("menu.help_menu", "Help");
            JMenuItem aboutItem = newJMenuItem("menu.about_item", "About SpotBugs");
            helpMenu.add(aboutItem);

            aboutItem.addActionListener(evt -> mainFrame.about());

            menuBar.add(helpMenu);
        }
        return menuBar;
    }
539250
public void create(Menu menu) {
        String url = WxEndpoint.get("url.menu.create");
        String json = JsonMapper.nonEmptyMapper().toJson(menu);
        logger.debug("create menu: {}", json);
        wxClient.post(url, json);
    }
551757
public static JMenuItem addMenuItem (
        ActionListener l, JMenu menu, String name)
    {
        return addMenuItem(l, menu, name, null, null);
    }
446532
private void initialize() {
    try {
      for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
        if ("Nimbus".equals(info.getName())) {
          UIManager.setLookAndFeel(info.getClassName());
          break;
        }
      }
    } catch (Exception e) {
      // If Nimbus is not available, you can set the GUI to another look and feel.
    }
    frame = new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    splitPane = new JSplitPane();
    frame.getContentPane().add(splitPane, BorderLayout.CENTER);

    tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    tabbedPane.setPreferredSize(new Dimension(500, 7));
    splitPane.setRightComponent(tabbedPane);

    componentDetailsTab = new JScrollPane();
    tabbedPane.addTab("Component details", null, componentDetailsTab, null);

    componentEditor = new JEditorPane();
    componentDetailsTab.setViewportView(componentEditor);

    sourceTab = new JScrollPane();
    tabbedPane.addTab("Source", null, sourceTab, null);

    sourceEditor = createSourceEditor();
    sourceEditor.setEditable(false);
    sourceTab.setViewportView(sourceEditor);

    textLineNumber = createTextLineNumber();
    sourceTab.setRowHeaderView(textLineNumber);

    highlightingTab = new JScrollPane();
    tabbedPane.addTab("Highlighting", null, highlightingTab, null);

    highlightingEditor = new JEditorPane();
    highlightingTab.setViewportView(highlightingEditor);

    symbolTab = new JScrollPane();
    tabbedPane.addTab("Symbol references", null, symbolTab, null);

    symbolEditor = new JEditorPane();
    symbolTab.setViewportView(symbolEditor);

    coverageTab = new JScrollPane();
    tabbedPane.addTab("Coverage", null, coverageTab, null);

    coverageEditor = new JEditorPane();
    coverageTab.setViewportView(coverageEditor);

    duplicationTab = new JScrollPane();
    tabbedPane.addTab("Duplications", null, duplicationTab, null);

    duplicationEditor = new JEditorPane();
    duplicationTab.setViewportView(duplicationEditor);

    testsTab = new JScrollPane();
    tabbedPane.addTab("Tests", null, testsTab, null);

    testsEditor = new JEditorPane();
    testsTab.setViewportView(testsEditor);

    issuesTab = new JScrollPane();
    tabbedPane.addTab("Issues", null, issuesTab, null);

    issuesEditor = new JEditorPane();
    issuesTab.setViewportView(issuesEditor);

    externalIssuesTab = new JScrollPane();
    tabbedPane.addTab("External Issues", null, externalIssuesTab, null);

    externalIssuesEditor = new JEditorPane();
    externalIssuesTab.setViewportView(externalIssuesEditor);

    measuresTab = new JScrollPane();
    tabbedPane.addTab("Measures", null, measuresTab, null);

    measuresEditor = new JEditorPane();
    measuresTab.setViewportView(measuresEditor);

    scmTab = new JScrollPane();
    tabbedPane.addTab("SCM", null, scmTab, null);

    scmEditor = new JEditorPane();
    scmTab.setViewportView(scmEditor);

    activeRuleTab = new JScrollPane();
    tabbedPane.addTab("Active Rules", null, activeRuleTab, null);

    activeRuleEditor = new JEditorPane();
    activeRuleTab.setViewportView(activeRuleEditor);

    adHocRuleTab = new JScrollPane();
    tabbedPane.addTab("Add Hoc Rules", null, adHocRuleTab, null);

    adHocRuleEditor = new JEditorPane();
    adHocRuleTab.setViewportView(adHocRuleEditor);

    qualityProfileTab = new JScrollPane();
    tabbedPane.addTab("Quality Profiles", null, qualityProfileTab, null);

    qualityProfileEditor = new JEditorPane();
    qualityProfileTab.setViewportView(qualityProfileEditor);

    pluginTab = new JScrollPane();
    tabbedPane.addTab("Plugins", null, pluginTab, null);

    pluginEditor = new JEditorPane();
    pluginTab.setViewportView(pluginEditor);

    cpdTextBlocksTab = new JScrollPane();
    tabbedPane.addTab("CPD Text Blocks", null, cpdTextBlocksTab, null);

    cpdTextBlocksEditor = new JEditorPane();
    cpdTextBlocksTab.setViewportView(cpdTextBlocksEditor);

    significantCodeTab = new JScrollPane();
    tabbedPane.addTab("Significant Code Ranges", null, significantCodeTab, null);
    
    significantCodeEditor = new JEditorPane();
    significantCodeTab.setViewportView(significantCodeEditor);

    treeScrollPane = new JScrollPane();
    treeScrollPane.setPreferredSize(new Dimension(200, 400));
    splitPane.setLeftComponent(treeScrollPane);

    componentTree = new JTree();
    componentTree.setModel(new DefaultTreeModel(
      new DefaultMutableTreeNode("empty") {
        {
        }
      }));
    treeScrollPane.setViewportView(componentTree);
    componentTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
    componentTree.addTreeSelectionListener(new TreeSelectionListener() {
      @Override
      public void valueChanged(TreeSelectionEvent e) {
        DefaultMutableTreeNode node = (DefaultMutableTreeNode) componentTree.getLastSelectedPathComponent();

        if (node == null) {
          // Nothing is selected.
          return;
        }

        frame.setCursor(new Cursor(Cursor.WAIT_CURSOR));
        updateDetails((Component) node.getUserObject());
        frame.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));

      }

    });
    frame.pack();
  }
831245
public function init()
    {
        if ($this->submenuOptions === null) {
            // copying of [[options]] kept for BC
            // @todo separate [[submenuOptions]] from [[options]] completely before 2.1 release
            $this->submenuOptions = $this->options;
            unset($this->submenuOptions['id']);
        }
        parent::init();
        Html::addCssClass($this->options, ['widget' => 'dropdown-menu']);
    }
953367
@PostConstruct
    public void init() {

        bindAction(burger1);
        bindAction(burger2);
        bindAction(burger3);
        bindAction(burger4);

        snackbar = new JFXSnackbar(root);
        snackbar.setPrefWidth(300);

        badge1.setOnMouseClicked((click) -> {
            int value = Integer.parseInt(badge1.getText());
            if (click.getButton() == MouseButton.PRIMARY) {
                value++;
            } else if (click.getButton() == MouseButton.SECONDARY) {
                value--;
            }

            if (value == 0) {
                badge1.setEnabled(false);
            } else {
                badge1.setEnabled(true);
            }
            badge1.setText(String.valueOf(value));

            // trigger snackbar
            if (count++ % 2 == 0) {
                snackbar.fireEvent(new SnackbarEvent(new JFXSnackbarLayout("Toast Message " + count)));
            } else {
                if (count % 4 == 0) {
                    JFXButton button = new JFXButton("CLOSE");
                    button.setOnAction(action -> snackbar.close());
                    snackbar.fireEvent(new SnackbarEvent(
                        new JFXSnackbarLayout("Snackbar Message Persistent " + count, "CLOSE", action -> snackbar.close()),
                        Duration.INDEFINITE, null));

                } else {
                    snackbar.fireEvent(new SnackbarEvent(
                        new JFXSnackbarLayout("Snackbar Message" + count, "UNDO", null),
                        Duration.millis(3000), null));
                }
            }
        }
213314
public Menu add(Menu m) {
        submenus.add(m);
        m.setParent(this);
        return m;
    }
514971
public static function init() {
		$active_types = Menu_Icons_Settings::get( 'global', 'icon_types' );

		if ( empty( $active_types ) ) {
			return;
		}

		foreach ( Menu_Icons::get( 'types' ) as $type ) {
			if ( in_array( $type->id, $active_types, true ) ) {
				self::$icon_types[ $type->id ] = $type;
			}
		}

		/**
		 * Allow themes/plugins to override the hidden label class
		 *
		 * @since  0.8.0
		 * @param  string $hidden_label_class Hidden label class.
		 * @return string
		 */
		self::$hidden_label_class = apply_filters( 'menu_icons_hidden_label_class', self::$hidden_label_class );

		/**
		 * Allow themes/plugins to override default inline style
		 *
		 * @since  0.9.0
		 * @param  array $default_style Default inline style.
		 * @return array
		 */
		self::$default_style = apply_filters( 'menu_icons_default_style', self::$default_style );

		add_action( 'wp_enqueue_scripts', array( __CLASS__, '_enqueue_styles' ), 7 );
		add_filter( 'wp_nav_menu_args', array( __CLASS__, '_add_menu_item_title_filter' ) );
		add_filter( 'wp_nav_menu', array( __CLASS__, '_remove_menu_item_title_filter' ) );
	}