private void createAddressRangeTable(CodeViewerProvider componentProvider) {
		TableService tableService = tool.getService(TableService.class);
		if (tableService == null) {
			Msg.showWarn(this, null, "No Table Service", "Please add the TableServicePlugin.");
			return;
		}
		Program program = componentProvider.getProgram();
		ProgramSelection selection = componentProvider.getSelection();
		if (selection.isEmpty()) {
			tool.setStatusInfo("Unable to create selected ranges table: no addresses in selection");
			return;
		}
		ToolOptions options = tool.getOptions(OPTION_CATEGORY_NAME);
		int resultsLimit = options.getInt(RANGES_LIMIT_OPTION_NAME, RANGES_LIMIT_DEFAULT);
		long minLength = options.getLong(MIN_RANGE_SIZE_OPTION_NAME, MIN_RANGE_SIZE_DEFAULT);
		AddressRangeTableModel model =
			new AddressRangeTableModel(tool, program, selection, resultsLimit, minLength);
		Icon markerIcon = new GIcon("icon.plugin.codebrowser.cursor.marker");
		String title = "Selected Ranges in " + program.getName();
		TableComponentProvider<AddressRangeInfo> tableProvider =
			tableService.showTableWithMarkers(title, "Address Ranges", model,
				SearchConstants.SEARCH_HIGHLIGHT_COLOR, markerIcon, title, componentProvider);
		tableProvider.installRemoveItemsAction();

		SelectEndpointsAction selectMin =
			new SelectEndpointsAction(this, program, model, RangeEndpoint.MIN);
		selectMin.setHelpLocation(new HelpLocation(HelpTopics.CODE_BROWSER, "Range_Table_Actions"));
		tableProvider.addLocalAction(selectMin);

		SelectEndpointsAction selectMax =
			new SelectEndpointsAction(this, program, model, RangeEndpoint.MAX);
		selectMax.setHelpLocation(new HelpLocation(HelpTopics.CODE_BROWSER, "Range_Table_Actions"));
		tableProvider.addLocalAction(selectMax);

	}
Plugin for adding some basic selection actions for Code Browser Listings.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/codebrowser/CodeBrowserSelectionPlugin.java