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.
Build: NetBeans IDE Dev (Build 100409-426982565d9f) VM: Java HotSpot(TM) 64-Bit Server VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01 OS: Linux User Comments: fzamboj: attempt to override method using alt+insert 1. choose method 2. press enter Stacktrace: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1937) at org.netbeans.modules.php.editor.indent.TokenFormatter$1.replaceString(TokenFormatter.java:1397) at org.netbeans.modules.php.editor.indent.TokenFormatter$1.run(TokenFormatter.java:1086) at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:311) at org.netbeans.modules.php.editor.indent.TokenFormatter.reformat(TokenFormatter.java:340) at org.netbeans.modules.php.editor.indent.PHPFormatter.reformat(PHPFormatter.java:126)
Created attachment 96962 [details] stacktrace
Created attachment 96980 [details] stacktrace expanding a php template (tab)
I connot reproduce. Please, do you have a reproducible case? Laurin1, do you remember, which tamplate it was?
(In reply to comment #3) > I connot reproduce. Please, do you have a reproducible case? Laurin1, do you > remember, which tamplate it was? Here is a short video with an error http://ukkopekka.ru/includes/upload/out.ogv Nightly builds Netbeans.
Thanks for the video, but I can not still get the exception, even if my function looks almost as the function at the video. Is it possible to send me the file?
One more idea, probably the file itself is not so much important. How did you set up the formatting? Did you altered the settings?
(In reply to comment #6) > One more idea, probably the file itself is not so much important. How did you > set up the formatting? Did you altered the settings? Yes, I have a lot has changed in the formatting options. In any case, enclose a file with all settings. http://ukkopekka.ru/includes/upload/nb_opt.zip Try to reset the default?
Thanks very much, I'm now able to reproduce it. The reason is space within for that you have set up to true. I'm going to fix it.
Created attachment 97096 [details] stacktrace typing return;
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=167826
Created attachment 97109 [details] stacktrace AutoCompleting a PHP template
I have commit a fix for this in web-main. It should be OK now.
Integrated into 'main-golden', will be available in build *201004131450* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/956755f300b3 User: Petr Pisl <ppisl@netbeans.org> Log: #183773 - [69cat] StringIndexOutOfBoundsException: String index out of range: -1