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

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

    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

          People

            Unassigned Unassigned
            humphrey gao KoKo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: