From 216c0c1d74f9efa6c8cc3ec76212ceb12c640846 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Mon, 23 Dec 2024 14:37:31 +0100 Subject: [PATCH] Add language hints to `getDisplayName()` and `getDescription()` --- .../java/template/processor/RefasterTemplateProcessor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/openrewrite/java/template/processor/RefasterTemplateProcessor.java b/src/main/java/org/openrewrite/java/template/processor/RefasterTemplateProcessor.java index c870a0d..8cdce22 100644 --- a/src/main/java/org/openrewrite/java/template/processor/RefasterTemplateProcessor.java +++ b/src/main/java/org/openrewrite/java/template/processor/RefasterTemplateProcessor.java @@ -298,7 +298,7 @@ private void writeRecipeClass(JCTree.JCClassDecl classDecl, boolean outerClassRe out.write("@Generated(\"" + GENERATOR_NAME + "\")\n"); out.write("public class " + outerClassName + " extends Recipe {\n"); out.write(" /**\n"); - out.write(" * Instantiates a new instance.\n"); + out.write(" * Instantiates a new instance.\n"); // For -Xdoclint out.write(" */\n"); out.write(" public " + outerClassName + "() {}\n\n"); out.write(recipeDescriptor(classDecl, @@ -545,11 +545,13 @@ private String recipeDescriptor(JCTree.JCClassDecl classDecl, String defaultDisp String recipeDescriptor = " @Override\n" + " public String getDisplayName() {\n" + + " //language=markdown\n" + " return \"" + displayName + "\";\n" + " }\n" + "\n" + " @Override\n" + " public String getDescription() {\n" + + " //language=markdown\n" + " return \"" + description + "\";\n" + " }\n" + "\n";