public void setCurrentSelection(ProgramSelection selection) {
		if (SystemUtilities.isEqual(currentSelection, selection)) {
			return;
		}
		this.currentSelection = selection;
		if (isGlobalState && tool != null) {
			ProgramSelection sel = currentSelection != null ? currentSelection
					: new ProgramSelection(new AddressSet());
			PluginEvent evt =
				new ProgramSelectionPluginEvent(getClass().getName(), sel, currentProgram);
			tool.firePluginEvent(evt);
		}
	}
Set the current selection and fire a {@link ProgramSelectionPluginEvent}.

@param selection the selection
Ghidra/Features/Base/src/main/java/ghidra/app/script/GhidraState.java