@Override
		public void run(TaskMonitor monitor) {
			try {
				for (DomainFile domainFile : domainFiles) {
					if (monitor.isCancelled()) {
						break;
					}
					monitor.setProgress(0);
					monitor.setMessage("Saving " + domainFile.getName());
					domainFile.save(monitor);
				}
				operationCompleted = !monitor.isCancelled();

			}
			catch (CancelledException ce) {
				// this is OK, it will be handled below
			}
			catch (Throwable t) {
				Msg.showError(this, null, "Error Saving Data", "Unexpected exception saving data!",
					t);
			}
			if (operationCompleted) {
				Swing.runNow(() -> close());
			}
			else if (monitor.isCancelled()) {
				Swing.runNow(() -> initList());
			}
		}
Mouse listener to get the selected cell in the list.
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/SaveDataDialog.java