public void add(Program program, AddressSetView addresses) throws InvalidInputException {

		// Do some initial checks on the program and addresses we want to load instructions
		// for.  If these are invalid, no need to proceed.
		if (program == null || addresses == null || addresses.isEmpty()) {
			return;
		}

		// Do a quick check to see if we have any valid code units in the selection.  If not,
		// display an error message.
		Listing listing = program.getListing();
		CodeUnitIterator cuIter = listing.getCodeUnits(addresses, true);
		if (!cuIter.hasNext()) {
			throw new InvalidInputException("No instructions found in selection.");
		}

		TaskLauncher.launch(new LoadInstructionsTask(program, addresses));

		modelChanged(UpdateType.RELOAD);
	}
Examines the given addresses from the given program to extract all instructions; results are 
stored in the local {@link InstructionMetadata} list.

@param program the current program
@param addresses the addresses to load instructions for
@throws InvalidInputException if there's an error parsing the instructions
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/instructionsearch/model/InstructionSearchData.java