This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 7732 - "Reformat Code" with "Compound Bracket on Next Line" adds blank lines
Summary: "Reformat Code" with "Compound Bracket on Next Line" adds blank lines
Status: CLOSED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Windows 3.1/NT
: P4 minor (vote)
Assignee: issues@editor
URL: http://www.sun.com/forte/ffj/ce/docum...
Keywords:
Depends on:
Blocks:
 
Reported: 2000-09-21 17:34 UTC by Nicolas Duclos-Hindié
Modified: 2007-11-05 13:42 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Duclos-Hindié 2000-09-21 17:34:36 UTC
Using the "Global Options"
I set to TRUE the parameter <<Compound Bracket on Next Line>>:

- Editor Settings
- - Java Editor
- - - << Compound Bracket on Next Line >>


Then, while editing a file, I selected a group of lines
that included brackets as follow:

----------------------------------

if( true == true ) {
  System.out.println("True");
}
if( false == true )
{
  System.out.println("False");
}

--------------------------------
then Rigth-Clicked the mouse to select the
<< Reformat Code >> and obtained
following set of lines:

--------------------------------
    if( true==true )
    {
      System.out.println("True");
    }
    if( false == true )

    {
      System.out.println("False");
    }
--------------------------------
The first group of brackets are correctly
moved one line down.

Note: the EMPTY LINE after the "if ( false == true )"


If I repeat the "Reformat Code" process, new empty
lines keep being added for both goups:
--------------------------------------
    if( true==true )

    {
      System.out.println("True");
    }
    if( false == true )


    {
      System.out.println("False");
    }
------------------------------------


This looks like an incorrect behavior, right ?


Nicolas
Comment 1 Jan Lahoda 2001-01-24 15:35:59 UTC
Only changed version to Development.
Comment 2 Jan Lahoda 2001-02-09 11:57:59 UTC
It seems to be fixed for me. Tested on boston 1160 and netbeans r3.1 36,
netbeans 118.
Comment 3 Quality Engineering 2003-06-30 18:01:28 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.
Comment 4 Quality Engineering 2003-06-30 18:10:10 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.