private void open() {

		OpenVersionedFileDialog<Program> openDialog =
			new OpenVersionedFileDialog<>(tool, "Open Program", Program.class);

		DomainFile startFile = null;
		Program p = getCurrentProgram();
		if (p != null) {
			startFile = p.getDomainFile();
		}
		openDialog.selectDomainFile(startFile);
		openDialog.setHelpLocation(new HelpLocation(HelpTopics.PROGRAM, "Open_File_Dialog"));

		openDialog.addOkActionListener(e -> {
			DomainFile domainFile = openDialog.getDomainFile();
			int version = openDialog.getVersion();
			if (domainFile == null) {
				openDialog.setStatusText("Please choose a Program");
			}
			else {
				openDialog.close();
				doOpenProgramSwing(new ProgramLocator(domainFile, version), OPEN_CURRENT);
			}
		});

		tool.showDialog(openDialog);
		contextChanged();
	}
Start a transaction if one has not been started; needed when program properties are about to
change from the options editor.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/progmgr/ProgramManagerPlugin.java