private ProgramSelection getSelection(Program program, AddressSetView addressSetView){
		AddressSet addressSet = new AddressSet();

		AddressIterator refAddrIter = program.getReferenceManager().getReferenceDestinationIterator(addressSetView,true);
		
		while (refAddrIter.hasNext()) {
			Address reffedAddr = refAddrIter.next();

			ReferenceIterator memRefIter  = program.getReferenceManager().getReferencesTo(reffedAddr);
			while (memRefIter.hasNext()){
				Reference memRef = memRefIter.next();
				Address addr = memRef.getFromAddress();
				if ( addr.isMemoryAddress() ) {
				    addressSet.addRange(addr,addr);
				}
			}
		}	
		return new ProgramSelection(addressSet);	
	}
Method called when the action is invoked.
@param ActionEvent details regarding the invocation of this action
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/select/reference/SelectBackRefsAction.java