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.
When using the Format feature (Alt+Shift+f) on a JSP document containing more than two Java blocks the document may have corrupt intents. In particular it does happen when the Java code does contain several nested statements. At the example below the Java code in the middle is eight chars too far right. Furthermore I do not understand why the first intent is at twelve chars. It seems there is just an eight char intention that simply should be removed. Example: <body> <h1>Hello World!</h1> <% String s1; if (1 == 1) { s1 = "1"; %> <h1>Hello World!</h1> <% if (1 == 1) { s1 = "1"; %> <h1>Hello World!</h1> <% if (1 == 1) { s1 = "1"; } } } %> </body> A much better layout would look like this: <body> <h1>Hello World!</h1> <% String s1; if (1 == 1) { s1 = "1"; %> <h1>Hello World!</h1> <% if (1 == 1) { s1 = "1"; %> <h1>Hello World!</h1> <% if (1 == 1) { s1 = "1"; } } } %> </body>
Formating changed its behaviour a little bit, but it's still doesn't work properly for your case: <body> <h1>Hello World!</h1> <% String s1; if (1 == 1) { s1 = "1"; %> <h1>Hello World!</h1> <% if (1 == 1) { s1 = "1"; %> <h1>Hello World!</h1> <% if (1 == 1) { s1 = "1"; } } } %> </body>
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