private void createActions() {

		int programHighlightSubMenuPosition = 1;

		setHighlightFromSelectionAction =
			new NavigatableContextAction("Set Highlight From Selection", getName()) {
				@Override
				protected void actionPerformed(NavigatableActionContext context) {
					setHighlight(context.getNavigatable(), copySelection(context.getSelection()));
				}

				@Override
				protected boolean isEnabledForContext(NavigatableActionContext context) {
					return context.hasSelection() && context.getNavigatable().supportsHighlight();
				}
			};
		MenuData menuData =
			new MenuData(new String[] { ToolConstants.MENU_SELECTION, MENU_HIGHLIGHT,
				"Entire Selection" }, HIGHLIGHT_GROUP);
		menuData.setMenuSubGroup(Integer.toString(programHighlightSubMenuPosition++));
		setHighlightFromSelectionAction.setMenuBarData(menuData);
		setHighlightFromSelectionAction.setPopupMenuData(new MenuData(SET_HIGHLIGHT_POPUPPATH,
			HIGHLIGHT_GROUP));
		setHighlightFromSelectionAction.setKeyBindingData(new KeyBindingData(KeyEvent.VK_H,
			InputEvent.CTRL_DOWN_MASK));
		setHighlightFromSelectionAction
				.addToWindowWhen(NavigatableActionContext.class);
		tool.addAction(setHighlightFromSelectionAction);

		clearHighlightAction = new NavigatableContextAction("Remove Highlight", getName()) {
			@Override
			protected void actionPerformed(NavigatableActionContext context) {
				setHighlight(context.getNavigatable(), new ProgramSelection());
			}

			@Override
			protected boolean isEnabledForContext(NavigatableActionContext context) {
				return context.hasHighlight();
			}
		};
		menuData =
			new MenuData(new String[] { ToolConstants.MENU_SELECTION, MENU_HIGHLIGHT, "Clear" },
				HIGHLIGHT_GROUP);
		menuData.setMenuSubGroup(Integer.toString(programHighlightSubMenuPosition++));
		clearHighlightAction.setMenuBarData(menuData);
		clearHighlightAction.setPopupMenuData(new MenuData(CLEAR_HIGHLIGHT_POPUPPATH,
			HIGHLIGHT_GROUP));
		clearHighlightAction.addToWindowWhen(NavigatableActionContext.class);
		tool.addAction(clearHighlightAction);

		addSelectionAction = new NavigatableContextAction("Add Selection To Highlight", getName()) {
			@Override
			protected void actionPerformed(NavigatableActionContext context) {
				ProgramSelection highlight = context.getHighlight();
				highlight = new ProgramSelection(highlight.union(context.getSelection()));
				setHighlight(context.getNavigatable(), highlight);
			}

			@Override
			protected boolean isEnabledForContext(NavigatableActionContext context) {
				return context.hasSelection() && context.hasHighlight();
			}
		};
		menuData =
			new MenuData(new String[] { ToolConstants.MENU_SELECTION, MENU_HIGHLIGHT,
				"Add Selection" }, HIGHLIGHT_GROUP);
		menuData.setMenuSubGroup(Integer.toString(programHighlightSubMenuPosition++));
		addSelectionAction.setMenuBarData(menuData);
		addSelectionAction.setPopupMenuData(new MenuData(ADD_SELECTION_POPUPPATH, HIGHLIGHT_GROUP));
		addSelectionAction.addToWindowWhen(NavigatableActionContext.class);
		tool.addAction(addSelectionAction);

		subtractSelectionAction =
			new NavigatableContextAction("Subtract Selection From Highlight", getName()) {
				@Override
				protected void actionPerformed(NavigatableActionContext context) {
					ProgramSelection highlight = context.getHighlight();
					highlight = new ProgramSelection(highlight.subtract(context.getSelection()));
					setHighlight(context.getNavigatable(), highlight);
				}

				@Override
				protected boolean isEnabledForContext(NavigatableActionContext context) {
					return context.hasSelection() && context.hasHighlight();
				}
			};
		menuData =
			new MenuData(new String[] { ToolConstants.MENU_SELECTION, MENU_HIGHLIGHT,
				"Subtract Selection" }, HIGHLIGHT_GROUP);
		menuData.setMenuSubGroup(Integer.toString(programHighlightSubMenuPosition++));
		subtractSelectionAction.addToWindowWhen(NavigatableActionContext.class);
		subtractSelectionAction.setMenuBarData(menuData);
		subtractSelectionAction.setPopupMenuData(new MenuData(SUBTRACT_SELECTION_POPUPPATH,
			HIGHLIGHT_GROUP));

		tool.addAction(subtractSelectionAction);

		setSelectionFromHighlightAction =
			new NavigatableContextAction("Set Selection From Highlight", getName()) {
				@Override
				protected void actionPerformed(NavigatableActionContext context) {
					setSelection(context.getNavigatable(), copySelection(context.getHighlight()));
				}

				@Override
				protected boolean isEnabledForContext(NavigatableActionContext context) {
					return context.hasHighlight();
				}
			};
		setSelectionFromHighlightAction.setMenuBarData(new MenuData(new String[] {
			ToolConstants.MENU_SELECTION, "From Highlight" }, HIGHLIGHT_GROUP));
		setSelectionFromHighlightAction.setPopupMenuData(new MenuData(SET_SELECTION_POPUPPATH,
			HIGHLIGHT_GROUP));
		setSelectionFromHighlightAction
				.addToWindowWhen(NavigatableActionContext.class);
		tool.addAction(setSelectionFromHighlightAction);

		tool.setMenuGroup(new String[] { MENU_SELECTION, MENU_HIGHLIGHT }, HIGHLIGHT_GROUP);
	}
Create the actions and add them to the tool.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/highlight/SetHighlightPlugin.java