Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-4630

Remove semicolon of Code Templates when inserted into Java lambda expression body

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      For Java lambda function body which has no enclose braces({}) , it would be better to remove the  semicolon of inserted Code Templates.

       

      Given the code(character ^ indicates the position of cursor):

      strList.forEach(s -> sout^); 
      
      

      After invoking code completion at the cursor, the code template is insert into the Editor:

      strList.forEach(s -> System.out.println(""););
      
      

      The first semicolon is redundant.

       

      It would be better to remove the redundant semicolon automatically.

      If you tell me to add another Code Template which does not have trailing semicolon, I  will be disappointed.

       

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            humphrey gao KoKo

            Dates

              Created:
              Updated:

              Slack

                Issue deployment