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

Code Refactoring Must respect code style, formatting, spacing and layout

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 9.0
    • None

    Description

      expected

      • I expect automatic code edits to respect code layout as much as possible
      • For example the code layout below should NOT change, following...
      • Rename of 'jComboBoxCorridor' --> 'jComboBoxSectionCorridor'
              //  Example 1
            helper.enable(
                jComboBoxNoteType,
                jComboBoxSectionCorridor
            );
        
                //  Example 2
        
            helper.enable
            (
                jComboBoxNoteType,
                jComboBoxSectionCorridor
            );
        
            // Example 3
        
            helper.setEnabled(
                jRadioButtonSection.isSelected() && enabled,
                    jComboBoxSectionCorridor,
                    jComboBoxNirCode
            );
        

      actual

      • This is highly undesirable
      • The first two code examples are change to the following:
            helper.enable(jComboBoxNoteType,
                jComboBoxSectionCorridor
            );
        
      • Example 3 results in a even less desirable change:
            helper.enable
            (jRadioButtonSection.isSelected() && enabled,
                    jComboBoxSectionCorridor,
                    jComboBoxNirCode
        
        • In this case the indenting was showing that the boolean result is applied to all the indented fields.
        • That information has been lost and was overlooked during debugging
      • These changes are definitely potential source for application code bugs

      Attachments

        Activity

          People

            Unassigned Unassigned
            aplatypus aplatypus
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: