private void templateMenuItemOnClick(final AsciidocTemplateI template) {
		applicationController.getSelectedItemOrWorkspacePath()
				.map(p -> !Files.isDirectory(p) ? p.getParent() : p)
				.filter(Objects::nonNull)
				.ifPresent(targetDir -> {
					threadService.runTaskLater(() -> {
						try {
							indikatorService.startProgressBar();
							templateService.provide(template, targetDir);
						} catch (Exception e) {
							logger.error("Could not supply the template %s".formatted(template.getName()), e);
						} finally {
							indikatorService.stopProgressBar();
						}
					});
				});
	}
Component which handles the creation of template menu entries.
Also adds them to the Menu.
src/main/java/com/kodedu/component/TemplateSubMenu.java