dbalek commented on a change in pull request #3584: URL: https://github.com/apache/netbeans/pull/3584#discussion_r809747330
########## File path: java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/LspTemplateUI.java ########## @@ -115,12 +116,24 @@ private LspTemplateUI() { CompletionStage<DataObject> findTemplate = findTemplate(templates, client); CompletionStage<Pair<DataFolder, String>> findTargetFolderAndName = findTargetAndName(findTemplate, client, params); return findTargetFolderAndName.thenCombineAsync(findTemplate, (targetAndName, source) -> { + final DataFolder target = targetAndName.first(); final String name = targetAndName.second(); if (name == null || name.isEmpty()) { + Object creator = source.getPrimaryFile().getAttribute(LSP_CREATOR); + if (creator instanceof Function) { + Object result = ((Function) creator).apply(target); Review comment: `LspTemplateUI.createFromTemplate` rewritten to use `FileBuilder`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For additional commands, e-mail: notifications-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists