You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "lkishalmi (via GitHub)" <gi...@apache.org> on 2024/02/24 03:27:29 UTC

[PR] Java Code Templates for List.of(), Map.of(), and Set.of() [netbeans]

lkishalmi opened a new pull request, #7102:
URL: https://github.com/apache/netbeans/pull/7102

   
   Some cheap new tricks for Java Wizards!
   


-- 
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-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Java Code Templates for List.of(), Map.of(), and Set.of() [netbeans]

Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi commented on PR #7102:
URL: https://github.com/apache/netbeans/pull/7102#issuecomment-1964707867

   > @lkishalmi what would you think about also adding `ilof` `imof` and `isof`?
   
   Where `i` would stand for?
   


-- 
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-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Java Code Templates for List.of(), Map.of(), and Set.of() [netbeans]

Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi merged PR #7102:
URL: https://github.com/apache/netbeans/pull/7102


-- 
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-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Java Code Templates for List.of(), Map.of(), and Set.of() [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #7102:
URL: https://github.com/apache/netbeans/pull/7102#issuecomment-1964702175

   @lkishalmi what would you think about also adding `ilof` `imof` and `isof`?


-- 
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-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Java Code Templates for List.of(), Map.of(), and Set.of() [netbeans]

Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi commented on PR #7102:
URL: https://github.com/apache/netbeans/pull/7102#issuecomment-1964703893

   > (not sure about using var for collections by default, since types often matter but it is just a template)
   
   Well, since the resulted collection is immutable, I do not think the type would really matter.
   
   Personally I would mainly use them in education space, creating sort code for demonstration purposes, and yes they are just templates.


-- 
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-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Java Code Templates for List.of(), Map.of(), and Set.of() [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #7102:
URL: https://github.com/apache/netbeans/pull/7102#issuecomment-1964717066

   `i` for the interface on the left hand side.
   
   `ilof` would be `List<|> list = List.of()`
   
   it might have to put the cursor between `<>` first, since I am not quite sure how to automatically set the there.


-- 
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-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Java Code Templates for List.of(), Map.of(), and Set.of() [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #7102:
URL: https://github.com/apache/netbeans/pull/7102#issuecomment-1964660010

   (not sure about using var for collections by default, since types often matter but it is just a template)


-- 
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-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Java Code Templates for List.of(), Map.of(), and Set.of() [netbeans]

Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi commented on PR #7102:
URL: https://github.com/apache/netbeans/pull/7102#issuecomment-1964769176

   Could be done, I'd probably use `llof`, `mmof, and `ssof` for abbrevs. `isof` is pretty close to the commonly used `iof`.
   
   Also popped in my mind, that the `List.copyOf()`, etc would be more common with records, and then records with compact constructor...


-- 
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-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists