Add one more snippet

This commit is contained in:
Kris De Volder
2017-09-20 14:01:52 -07:00
parent 0a47b7c158
commit 5fe87f6522

View File

@@ -130,6 +130,19 @@ public class BootJavaLanguageServer extends SimpleLanguageServer {
" return new ${SomeData}(${cursor});\n" +
"}\n"
));
snippetManager.add(new JavaSnippet(
"GetMapping method",
JavaSnippetContext.BOOT_MEMBERS,
CompletionItemKind.Method,
ImmutableList.of(
"org.springframework.web.bind.annotation.GetMapping",
"org.springframework.web.bind.annotation.RequestParam"
),
"@GetMapping(value=\"${path}\")\n" +
"public ${SomeData} ${getMethodName}(@RequestParam ${String} ${param}) {\n" +
" return new ${SomeData}(${cursor});\n" +
"}"
));
return new BootJavaCompletionEngine(javaProjectFinder, providers, snippetManager);
}