private void createActions() {

		String group = "search for";
		String pullRightGroup = "0"; // top of 'search for' group
		tool.setMenuGroup(new String[] { "&Search", MENU_PULLRIGHT }, group, pullRightGroup);

		HelpLocation helpLocation = new HelpLocation(HelpTopics.SEARCH, "Mnemonic_Search");

		//
		// ACTION 1: Search for instructions, excluding constants. 
		//
		setSearchMnemonicOpsNoConstAction =
			new NavigatableContextAction("Include Operands (except constants)", getName()) {

				@Override
				public void actionPerformed(NavigatableActionContext context) {
					processAction(context, true, false);
				}

				@Override
				protected boolean isEnabledForContext(NavigatableActionContext context) {
					return context.hasSelection();
				}

			};

		setSearchMnemonicOpsNoConstAction.setMenuBarData(new MenuData(new String[] { "&Search",
			MENU_PULLRIGHT, "Include Operands (except constants)" }, null, group,
			MenuData.NO_MNEMONIC, "3"));
		setSearchMnemonicOpsNoConstAction.setHelpLocation(helpLocation);
		setSearchMnemonicOpsNoConstAction
				.addToWindowWhen(NavigatableActionContext.class);

		//
		// ACTION 2: Search for instructions, including operands. 
		//
		setSearchMnemonicOpsConstAction =
			new NavigatableContextAction("Include Operands", getName()) {

				@Override
				public void actionPerformed(NavigatableActionContext context) {
					processAction(context, true, true);
				}

				@Override
				protected boolean isEnabledForContext(NavigatableActionContext context) {
					return context.hasSelection();
				}
			};

		setSearchMnemonicOpsConstAction.setMenuBarData(new MenuData(new String[] { "&Search",
			MENU_PULLRIGHT, "Include Operands" }, null, group, MenuData.NO_MNEMONIC, "2"));
		setSearchMnemonicOpsConstAction.setHelpLocation(helpLocation);
		setSearchMnemonicOpsConstAction
				.addToWindowWhen(NavigatableActionContext.class);

		//
		// ACTION 3: Search for instructions, excluding constants. 
		//
		setSearchMnemonicNoOpsNoConstAction =
			new NavigatableContextAction("Exclude Operands", getName()) {

				@Override
				public void actionPerformed(NavigatableActionContext context) {
					processAction(context, false, false);
				}

				@Override
				protected boolean isEnabledForContext(NavigatableActionContext context) {
					return context.hasSelection();
				}
			};

		setSearchMnemonicNoOpsNoConstAction.setMenuBarData(new MenuData(new String[] { "&Search",
			MENU_PULLRIGHT, "Exclude Operands" }, null, group, MenuData.NO_MNEMONIC, "1"));
		setSearchMnemonicNoOpsNoConstAction.setHelpLocation(helpLocation);
		setSearchMnemonicNoOpsNoConstAction
				.addToWindowWhen(NavigatableActionContext.class);

		// Add the actions to the tool...
		tool.addAction(setSearchMnemonicOpsNoConstAction);
		tool.addAction(setSearchMnemonicOpsConstAction);
		tool.addAction(setSearchMnemonicNoOpsNoConstAction);

		// ...and set in the menu group.
		tool.setMenuGroup(new String[] { MENU_PULLRIGHT }, POPUP_MENU_GROUP);
	}
Create the menu action objects and defines click behavior for each.
Ghidra/Features/Base/src/main/java/ghidra/features/base/memsearch/mnemonic/MnemonicSearchPlugin.java