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.
Build 200709140000 reindent starting line 2 for 7 lines (first file line is line 1), see attachment for argument details Second attachment has code used to call reindent. And another example of failure. To reproduce with jVi, put caret on "{" of class declaration, enter two characters "=%" which means "reindent-toMatchingBrace". Note that arguments are from beginning of first line to after end of last line. This has been going on for a while, when it fails it is always lines at the end of the specified range. Several '}' in a row is typically part of the failure. =================================== package javaapplication1; class e { void f() { int x = 0; if(x > 0) { } } } // // // 2 chars per line for 11 lines =================================== class e { void f() { int x = 0; if(x > 0) { } } } ===================================
Created attachment 48875 [details] arguments to reindent method
Created attachment 48876 [details] code that calls reindent, another failing example
Additional bizzare behavior. With the example file the only file opened, close the IDE, then restart. Then do the indent operation and *nothing* happens. Seems that in o.n.m.e.indent.IndentImpl.reindent indentHandler.hasItems() is false and then there is no default formatter. Modify the file by adding a space after one of the "//". Now do the indent operation, and it modifies the file in the typical failing way. After modifying the file, there is a defaultFormatter.
The original problem could be in fact the same like issue 116018.
As expected, this issues main problem is fixed with this mornings sources; no doubt because of fix for issue 116018. (which also explains several other observations about the failure) Changing the summary to reflect the less important issue I ran into: Seems that in o.n.m.e.indent.IndentImpl.reindent there is no default formatter until after the file is modified. See comment of Sat Sep 15 04:46:39 +0000 2007
moving opened issues from TM <= 6.1 to TM=Dev
Will be resolved LATER.
NetBeans.org Migration: changing resolution from LATER to WONTFIX