private void save() {
		if (!hasChanges()) {
			return;
		}

		if (scriptSourceFile == null) {
			saveAs();
			return;
		}

		if (isFileOnDiskMissing()) {
			doSave();
			return;
		}

		if (hasFileOnDiskChanged()) {
			// special case--the editor has been changed AND the file has been changed on disk
			handleChangesOnDisk();
			return;
		}

		doSave();
	}
Returns false if the user cancels--meaning they did not make a decision regarding the
file (or 'handle' it).
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/script/GhidraScriptEditorComponentProvider.java