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.
NB 4.2 200504191800 JDK 1.5.0 In the JSP Editor try the following. 1. Auto-complete inserted an extra quote unnecessarily. Try keying this in: <% String mav = "<body>"; mavhtm.replaceFirst("<body>" [Here auto-complete spontaneously gave me an extra quote mark] %> extra quote mark: mavhtm.replaceFirst("<body>"" 2. Auto-complete could not find "if" after having encountered "else" and started to croak: <% if (mav==null) mav = "<html>No Report</html>"; else[here the auto-complete threw the exception] java.lang.IllegalArgumentException: Only accept 'else'. at org.netbeans.editor.ext.java.JavaFormatSupport.findIf (JavaFormatSupport.java:194) at org.netbeans.editor.ext.java.JavaFormatSupport.findIndent (JavaFormatSupport.java:523) at org.netbeans.editor.ext.java.JavaFormatSupport.indentLine (JavaFormatSupport.java:850) [...I truncated the exception dump ...]
The second problem seems to be fixed. I used to be able to reproduce but not now. It has likely been fixed in java since the JSP scriptlet editor only delegates to java editor classes in case of the indentation (which seems to caused the problem according to the stacktrace piece). As for the first problem - there is the same problem in java editor => reassigning.
The first problem is already reported. Thanks. *** This issue has been marked as a duplicate of 50006 ***