JaroslavTulach commented on a change in pull request #3262:
URL: https://github.com/apache/netbeans/pull/3262#discussion_r740177182
##########
File path:
platform/api.templates/src/org/netbeans/api/templates/CreateFromTemplateHandler.java
##########
@@ -59,4 +64,171 @@
CreateDescriptor desc
) throws IOException;
+ /**
+ * Replaces ${param} tokens in a String. The parameter reference has
syntax "${" paramName [":" defaultValue ] "}".
+ * Parameters are replaced recursively. "${" can be escaped by \, so "\${"
will not act as parameter reference start.
+ * @param expression string template
+ * @param parameters parameter values
+ * @return evaluated string.
+ * @since 1.23
+ */
+ public static String mapParameters(String expression, Map<String, ?>
parameters) {
Review comment:
I still like the [use of the templating engine
itself](https://github.com/apache/netbeans/pull/3262#discussion_r740114513)
more than our own substitution mechanism...
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists