You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "will mason (JIRA)" <ji...@apache.org> on 2018/04/18 04:11:00 UTC

[jira] [Created] (NETBEANS-687) Code Refactoring Must respect code style, formatting, spacing and layout

will mason created NETBEANS-687:
-----------------------------------

             Summary: Code Refactoring Must respect code style, formatting, spacing and layout
                 Key: NETBEANS-687
                 URL: https://issues.apache.org/jira/browse/NETBEANS-687
             Project: NetBeans
          Issue Type: Bug
          Components: editor - Refactoring, java - Refactoring
    Affects Versions: 9.0
         Environment: Product Version: Apache NetBeans IDE Dev (Build incubator-netbeans-release-205-on-20180202)
Java: 10; Java HotSpot(TM) 64-Bit Server VM 10+46
Runtime: Java(TM) SE Runtime Environment 10+46
System: Windows 10 version 10.0 running on amd64; Cp1252; en_AU (nb)
User directory: Z:\tmp\.other\user\netbeans\v09.00-beta\FourAbs
Cache directory: Z:\tmp\.other\cache\netbeans\FourAbs-09
            Reporter: will mason
             Fix For: 9.0


h2. 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}}'   {code:java}
      //  Example 1
    helper.enable(
        jComboBoxNoteType,
        jComboBoxSectionCorridor
    );

        //  Example 2

    helper.enable
    (
        jComboBoxNoteType,
        jComboBoxSectionCorridor
    );

    // Example 3

    helper.setEnabled(
        jRadioButtonSection.isSelected() && enabled,
            jComboBoxSectionCorridor,
            jComboBoxNirCode
    );
{code}

h2. actual

*  This is highly undesirable
* The first two code examples are change to the following:  {code:java}
    helper.enable(jComboBoxNoteType,
        jComboBoxSectionCorridor
    );
{code}
* Example 3 results in a even less desirable change:  {code:java}
    helper.enable(
            (jRadioButtonSection.isSelected() && enabled,
            jComboBoxSectionCorridor,
            jComboBoxNirCode
{code}
**  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






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

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