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 146936

Summary: using EL in embedded JS breaks reformating
Product: javaee Reporter: Jindrich Sedek <jsedek>
Component: JSPAssignee: Torbjorn Norbye <tor>
Status: VERIFIED FIXED    
Severity: blocker CC: mfukala
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Jindrich Sedek 2008-09-11 13:19:25 UTC
use this code in JSP file:
---------------------
        <script type="text/javascript">
            function f(){
                var p = 10;
                if (p == ${var}){
                }
            }
        </script>
--------------------
invoke reformat ->
result -> end brackets are reformatted incorrectly:
--------------------
        <script type="text/javascript">
            function f(){
                var p = 10;
                if (p == ${var}){
            }
        }
        </script>
--------------------
Comment 1 Jindrich Sedek 2008-09-16 16:36:54 UTC
using more blocks like this one in one scriptlet shifts code more and more to the left side of the document
try to reformat this code in JSP file:
        <script type="text/javascript">
            function f(){
                if (p == ${var}){
                   if (q == ${var}){
                        if (e == ${var}){
                        }
                    }
                }
            }
        </script>
Comment 2 Torbjorn Norbye 2008-10-01 03:51:09 UTC
Fixed in changeset 61516a7c95c3.
Comment 3 Jindrich Sedek 2008-10-07 09:58:03 UTC
verified.
NetBeans IDE Dev (Build 081007)