@Override
	protected void okCallback() {

		List<DomainFile> list = new ArrayList<>();

		for (int i = 0; i < checkboxes.length; i++) {
			if (checkboxes[i].isSelected()) {
				list.add(files.get(i));
			}
		}
		if (list.size() > 0) {
			DomainFile[] saveFiles = new DomainFile[list.size()];
			SaveTask task = new SaveTask(list.toArray(saveFiles));
			new TaskLauncher(task, getComponent());
		}
		else {
			operationCompleted = true;
			close();
		}
	}
Gets called when the user clicks on the OK Action for the dialog.
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/SaveDataDialog.java