private void visitRecursively(Category category,
			ExceptionalConsumer<Category, CancelledException> callback) throws CancelledException {

		callback.accept(category);
		Category[] categories = category.getCategories();
		for (Category childCategory : categories) {
			visitRecursively(childCategory, callback);
		}
	}
{@link SearchAndReplaceHandler} for handling search and replace for datatype category names.
Ghidra/Features/Base/src/main/java/ghidra/features/base/replace/handler/DatatypeCategorySearchAndReplaceHandler.java