private List<Program> getOpenProgramList() {
		List<Program> primaryList = new ArrayList<>();
		List<Program> secondaryList = new ArrayList<>();
		for (Program p : programManagerService.getAllOpenPrograms()) {
			if (!programManagerService.isVisible(p) || p == activeProgram ||
				!ProgramMemoryComparator.similarPrograms(activeProgram, p)) {
				continue;
			}
			if (p.getName().equals(activeProgram.getName())) {
				primaryList.add(p);
			}
			else {
				secondaryList.add(p);
			}
		}
		Comparator<Program> programComparator = (a, b) -> {
			return a.getDomainFile().getName().compareTo(b.getDomainFile().getName());
		};
		Collections.sort(primaryList, programComparator);
		Collections.sort(secondaryList, programComparator);

		List<Program> programList = new ArrayList<>();
		programList.addAll(primaryList);
		programList.addAll(secondaryList);
		return programList;
	}
Generate a list of programs which are currently open in the tool which are compatible
with the primaryProgram to be diff'd.  The top/primary entries correspond to this 
programs which have the same name (see {@link Program#getName()}) as the primaryProgram, 
while the remaining compatible programs will be considered secondary.  Each of these
two groups will be sorted by its domain file name then concatenated to form a single list.  
@return ordered open program list for use with the {@link OpenVersionedFileDialog}.
Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/ProgramDiffPlugin.java