private void scriptsChanged(ChangeEvent e) {
		hasBeenRefreshed = true;

		TreePath preRefreshSelectionPath = scriptCategoryTree.getSelectionPath();

		updateAvailableScriptFilesForAllPaths();

		trimUnusedTreeCategories();

		scriptRoot.fireNodeStructureChanged();
		if (preRefreshSelectionPath != null) {
			scriptCategoryTree.setSelectionPath(preRefreshSelectionPath);
		}
	}
refresh the list of scripts by listing files in each script directory.

Note: this method can be used off the swing event thread.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/script/GhidraScriptComponentProvider.java