private void addBlockAddresses(AddressSet addrSet, AttributedVertex vertex)
			throws CancelledException {

		Address blockAddr = getAddress(vertex);
		if (!isValidAddress(blockAddr)) {
			return;
		}

		CodeBlock blocks[] = null;
		if (blockModel != null) {
			CodeBlock block = blockModel.getCodeBlockAt(blockAddr, TaskMonitor.DUMMY);
			if (block != null) {
				blocks = new CodeBlock[1];
				blocks[0] = block;
			}
			else {
				blocks = blockModel.getCodeBlocksContaining(blockAddr, TaskMonitor.DUMMY);
			}
		}
		if (blocks != null && blocks.length > 0) {
			for (CodeBlock block : blocks) {
				addrSet.add(block);
			}
		}
		else {
			addrSet.addRange(blockAddr, blockAddr);
		}
	}
{@link GraphDisplayListener} that handles events back and from program graphs.
Ghidra/Features/ProgramGraph/src/main/java/ghidra/graph/program/BlockModelGraphDisplayListener.java