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

Move code up/down should reindent the code inside and outside blocks

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Next
    • None
    • None

    Description

      I hope that I don't need to create for each language a new ticket, please let me know that. If you move code up or down, from outside of a function or outside of an if block or other blocks, it should reindent the code.

      function test() {
          if(true) {
              
          }
      
          ^
          |
      
          console.log("test");
      }
      

      expected behaviour:

      function test() {
          if(true) {
              console.log("test");
          }
      }
      

      Current behaviour:

      function test() {
          if(true) {
          console.log("test");
          }
      }
      

      It will still have the same indentation as it has it before.

      The correct/expected behaviour is only supported for Java. No support for PHP, JS, CSS/SCSS/LESS, HTML/XML. I didn't test it in C/C++ but I guess it will not work there too. So this must be a generic language feature.

      Attachments

        Activity

          People

            Unassigned Unassigned
            chrizzly Christian Lenz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: