private List<AddressRangeInfo> getSelectedRanges(ActionContext context) {
		Component component = context.getSourceComponent();
		if (!(component instanceof JTable table)) {
			return Collections.emptyList();
		}

		TableModel tableModel = table.getModel();
		if (model != tableModel) {
			return Collections.emptyList();
		}

		List<AddressRangeInfo> ranges = new ArrayList<>();
		for (int row : table.getSelectedRows()) {
			ranges.add(model.getRowObject(row));
		}

		return ranges;
	}
Creates an action which selects the endpoint of a range based on {@code RangeEndpoint}
@param plugin plugin
@param program program
@param model model 
@param endpoint left or right endpoint
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/codebrowser/SelectEndpointsAction.java