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 6409 - [indentation]Reformat Code should work better.
Summary: [indentation]Reformat Code should work better.
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 3.x
Hardware: All All
: P4 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-04-20 23:54 UTC by Jan Becicka
Modified: 2016-07-07 07:31 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Becicka 2000-04-20 23:54:20 UTC
Input:
  someMethod1();
  someMethod2();{someMethod3(); someMethod4();}

Output is:
  someMethod1();
someMethod2();{someMethod3(); someMethod4();}


But I thing it should be:
  someMethod1();
  someMethod2();
  {
     someMethod3();
     someMethod4();
  }
Comment 1 Marek Grummich 2000-07-25 09:10:59 UTC
Priority is changed to P4 (normal).
Comment 2 Jan Lahoda 2001-01-24 15:39:59 UTC
Only changed version to Development.
Comment 3 Miloslav Metelka 2001-02-22 17:56:16 UTC
We would need to have an additional flag for whether the user wants either 

{ method()

or

{
    method();

Until that the indent engine should keep the "{ method()" on the same line if 
they were originally on the same line and vice versa.
The first bug here is that the { is not put onto the next line. I assume 
the 'Add newline before brace' was turned on.
The second bug is that "{method()" be indented like "{   method()" if indent 4 
is used.

Comment 4 Jan Lahoda 2001-02-27 12:26:12 UTC
It works slightly better now - it doesn't do backindent:
Input:
  someMethod1();
  someMethod2();{someMethod3(); someMethod4();}

Output is:
  someMethod1();
  someMethod2();{someMethod3(); someMethod4();}

Comment 5 Jan Lahoda 2001-02-27 12:52:45 UTC
If add newline before brace is turned on, it indents:
Input:
  someMethod1();
  someMethod2();{someMethod3(); someMethod4();}

Output is:
  someMethod1();
  someMethod2();
  {someMethod3(); someMethod4();}


Comment 6 Jan Chalupa 2001-03-12 10:38:06 UTC
Version: 'Dev' -> 3.2
Comment 7 David Konecny 2001-04-04 15:36:05 UTC
I'm moving this issue back to the Dev and changing the type to ENHANCEMENT. It 
will be implemented in next version.
Comment 8 Jan Chalupa 2001-05-05 21:58:08 UTC
Target milestone -> 3.3
Comment 9 David Konecny 2001-05-22 15:35:29 UTC
Re-assigning issues back to the bugs@editor.netbeans.org
Comment 10 David Konecny 2001-05-22 15:51:41 UTC
Changing the state of the issue to ASSIGNED, because it was cover in 
Requirements document at http://editor.netbeans.org/doc/Requirements.html
Comment 11 Jan Chalupa 2001-11-27 12:28:16 UTC
Target milestone -> 3.3.1.
Comment 12 Marek Grummich 2002-07-22 10:04:21 UTC
Set target milestone to TBD
Comment 13 Marek Grummich 2002-07-22 10:09:44 UTC
Set target milestone to TBD
Comment 14 Roman Strobl 2004-12-07 14:57:06 UTC
Changing subcomponent to formatting.
Comment 15 Martin Balin 2016-07-07 07:31:44 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss