private int getIndexOfShortestAddressTable(int[] selectedRows) {

		if (selectedRows.length < 0) {
			throw new AssertionError(
				"There must be rows selected in " + "order to process multiple rows.");
		}

		int shortestRowIndex = selectedRows[0];
		int shortestLength = Integer.MAX_VALUE;
		for (int i = 0; i < selectedRows.length; i++) {
			int row = selectedRows[i];
			int length = model.getTableLength(row);
			if (length < shortestLength) {
				shortestLength = length;
				shortestRowIndex = i;
			}
		}

		return shortestRowIndex;
	}
@see ghidra.app.plugin.ProgramPlugin#selectionChanged(ProgramSelection)
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/disassembler/AutoTableDisassemblerPlugin.java