mbien commented on code in PR #7088:
URL: https://github.com/apache/netbeans/pull/7088#discussion_r1498328345
##########
java/java.editor/src/org/netbeans/modules/java/editor/resources/DefaultAbbrevs.xml:
##########
@@ -489,6 +493,25 @@ ${cursor}]]></code></codetemplate>
}
}
]]></code></codetemplate>
+
+ <!-- Record generation -->
+
+ <codetemplate abbreviation="prec"><code><![CDATA[${no-format}private
record ${Type}(${cursor}) {}]]></code></codetemplate>
+ <codetemplate abbreviation="preci"><code><![CDATA[${no-format}private
record ${Type}(${cursor}) implements ${classVar editable="false" currClassName
default="getClass()"} {}]]></code></codetemplate>
+ <codetemplate abbreviation="rec"><code><![CDATA[${no-format}public record
${Type}(${cursor}) {}]]></code></codetemplate>
+ <codetemplate abbreviation="reci"><code><![CDATA[${no-format}public record
${Type}(${cursor}) implements ${classVar editable="false" currClassName
default="getClass()"} {}]]></code></codetemplate>
Review Comment:
how about letting `rec` generate `record ${Type}(${cursor}) {}` and `purec`
`public record ${Type}(${cursor}) {}`?
Since i found declaring records inside methods is quite common, those would
have no `public`/`private` modifier.
--
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