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 5660 - Reformat Code: When Compound Bracket on Next Line =true, method bodies creep away from declarations with repeated calls to Reformat Code.
Summary: Reformat Code: When Compound Bracket on Next Line =true, method bodies creep...
Status: CLOSED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P1 major (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-02-07 21:39 UTC by _ tboudreau
Modified: 2007-11-05 13:44 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 _ tboudreau 2000-02-07 21:39:49 UTC
I changed the following code formatting (Tools--> Global Options --> Java
Editor) settings from the defaults:

     Compound Bracket on Next Line       (true)


I found that each time I did a code reformat (by right clicking in the editor)
my compound brackets had lines inserted before them and I lost the spaces that

indented my "system.out.println" as shown in the example below:

E.G.  My code was:

public void destroy ()
{
    if (debug)
        system.out.println("destroy() called");
}

When I selected code reformat it looked like this:

public void destroy ()

{
    if (debug)
    system.out.println("destroy() called");
}

When I selected code reformat again it looked like this:

public void destroy ()



{
    if (debug)
    system.out.println("destroy() called");
}

Could an option be added to fix the problem with the indenting of non compound
statements?
Comment 1 Neal Sanche 2000-06-29 20:12:59 UTC
This bug is also affecting one of our developers, and shows itself in
build 842 as well. When will this be resolved?
Comment 2 Quality Engineering 2003-06-30 18:11:15 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.