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.
Steps to reproduce: - open any existing project - open any header or source file - type following include directive: #include "f.h" - when Completion list appears press backspace several times to delete the file name. Result: When the last letter ("f") is deleted an Exception window appears with the message: java.lang.StringIndexOutOfBoundsException: String index out of range: 974 at java.lang.String.<init>(String.java:212) at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionTokenProcessor.token(CsmCompletionTokenProcessor.java:449) at org.netbeans.editor.SyntaxSupport.tokenizeText(SyntaxSupport.java:407) at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.query(CsmCompletionQuery.java:142) at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionQuery.query(CsmCompletionQuery.java:103) at org.netbeans.modules.cnd.completion.cplusplus.CsmCompletionProvider$Query.query(CsmCompletionProvider.java:106) at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:195) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
Type in editor: #include "stdio.h> press "left arrows" key 8 times ==> java.lang.StringIndexOutOfBoundsException: String index out of range: 12 at java.lang.String.<init>(String.java:206) at org.netbeans.modules.cnd.completion.cplusplus.ext.CsmCompletionTokenProcessor.token(CsmCompletionTokenProcessor.java:449) at org.netbeans.editor.SyntaxSupport.tokenizeText(SyntaxSupport.java:407) .............
fixed: - correctly produce tokens for #include directives. Updated this part and provided comments cvs log: Checking in CCSyntax.java; /cvs/cnd/core/src/org/netbeans/modules/cnd/editor/cplusplus/CCSyntax.java,v <-- CCSyntax.java new revision: 1.1.2.8; previous revision: 1.1.2.7 done
verified in build 20070423