@Override
	public void processEvent(PluginEvent event) {

		if (event instanceof ViewChangedPluginEvent) {
			AddressSet set = ((ViewChangedPluginEvent) event).getView();
			// If we are doing a Diff on the entire program then use the combined addresses for both programs.
			if (primaryProgram != null && showingSecondProgram) {
				addressesOnlyInP1 = new AddressSet();
				compatibleOnlyInP2 = new AddressSet();
				AddressSet addressSet = new AddressSet(primaryProgram.getMemory());
				if (set.equals(addressSet)) {
					if (secondaryDiffProgram != null) {
						try {
							ProgramMemoryComparator programMemoryComparator =
								new ProgramMemoryComparator(primaryProgram, secondaryDiffProgram);
							set = ProgramMemoryComparator.getCombinedAddresses(primaryProgram,
								secondaryDiffProgram);
							addressesOnlyInP1 = programMemoryComparator.getAddressesOnlyInOne();
							compatibleOnlyInP2 =
								programMemoryComparator.getCompatibleAddressesOnlyInTwo();
						}
						catch (ProgramConflictException e) {
							Msg.error(this, "Diff encountered a problem while changing the view. " +
								e.getMessage(), e);
						}
					}
				}
			}
			viewChanged(set);
		}
		else {
			super.processEvent(event);
		}
	}
Creates the plugin for indicating program differences to the user.

@param tool the tool that owns this plugin.
Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/ProgramDiffPlugin.java