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 58198 - Case of Over-eager Auto-complete.
Summary: Case of Over-eager Auto-complete.
Status: RESOLVED DUPLICATE of bug 50006
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-22 00:37 UTC by ssoong
Modified: 2007-11-05 13:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ssoong 2005-04-22 00:37:57 UTC
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 ...]
Comment 1 Marek Fukala 2005-09-30 18:21:29 UTC
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.
Comment 2 Dusan Balek 2005-11-01 10:58:57 UTC
The first problem is already reported. Thanks.

*** This issue has been marked as a duplicate of 50006 ***