diff --git a/src/main/java/org/openrewrite/java/template/RefasterTemplateProcessor.java b/src/main/java/org/openrewrite/java/template/RefasterTemplateProcessor.java index 116b6cc8..66709777 100644 --- a/src/main/java/org/openrewrite/java/template/RefasterTemplateProcessor.java +++ b/src/main/java/org/openrewrite/java/template/RefasterTemplateProcessor.java @@ -390,10 +390,11 @@ public void visitClassDef(JCTree.JCClassDecl classDecl) { String outerClassName = className.substring(className.lastIndexOf('.') + 1); out.write("public final class " + outerClassName + " extends Recipe {\n"); + String simpleInputOuterFQN = inputOuterFQN.substring(inputOuterFQN.lastIndexOf('.') + 1); out.write("\n" + " @Override\n" + " public String getDisplayName() {\n" + - " return \"Refaster recipes for `" + inputOuterFQN + "`\";\n" + + " return \"`" + simpleInputOuterFQN + "` Refaster recipes\";\n" + " }\n" + "\n" + " @Override\n" + diff --git a/src/test/resources/recipes/MultipleDereferencesRecipes.java b/src/test/resources/recipes/MultipleDereferencesRecipes.java index bc109b10..42d17c9e 100644 --- a/src/test/resources/recipes/MultipleDereferencesRecipes.java +++ b/src/test/resources/recipes/MultipleDereferencesRecipes.java @@ -18,7 +18,7 @@ public final class MultipleDereferencesRecipes extends Recipe { @Override public String getDisplayName() { - return "Refaster recipes for `foo.MultipleDereferences`"; + return "`MultipleDereferences` Refaster recipes"; } @Override diff --git a/src/test/resources/recipes/ShouldAddImportsRecipes.java b/src/test/resources/recipes/ShouldAddImportsRecipes.java index fd74e9c6..b23a0bc5 100644 --- a/src/test/resources/recipes/ShouldAddImportsRecipes.java +++ b/src/test/resources/recipes/ShouldAddImportsRecipes.java @@ -21,7 +21,7 @@ public final class ShouldAddImportsRecipes extends Recipe { @Override public String getDisplayName() { - return "Refaster recipes for `foo.ShouldAddImports`"; + return "`ShouldAddImports` Refaster recipes"; } @Override diff --git a/src/test/resources/recipes/ShouldSupportNestedClassesRecipes.java b/src/test/resources/recipes/ShouldSupportNestedClassesRecipes.java index 086f7302..b67ef9af 100644 --- a/src/test/resources/recipes/ShouldSupportNestedClassesRecipes.java +++ b/src/test/resources/recipes/ShouldSupportNestedClassesRecipes.java @@ -18,7 +18,7 @@ public final class ShouldSupportNestedClassesRecipes extends Recipe { @Override public String getDisplayName() { - return "Refaster recipes for `foo.ShouldSupportNestedClasses`"; + return "`ShouldSupportNestedClasses` Refaster recipes"; } @Override