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.
The 'Insert Closing Brackets Automatically' option does nothing in a JSP. In JAVA code it does as it should. Furthermore, when hitting enter after entering the left brace, the cursor should not indent on the next line, but it does. This results in me having to backspace everytime i enter a code block so my right brace will be in line with the left edge of my starting block. NB 5 was smart enough to put that right brace in the right spot. I am using a Free form web application
The issue can be seen with html code as well. If you enter a tag, then hit Enter to go to the next line, the cursor will indent, but it should not do this.
Any word on when this fix will be in? It is a constant annoyance and time killer for me to always have to backspace or shift-tab after entering my right-space to get it to be in the right place. Let me clarify the bug description, in case its not quite clear. There are 2 issues at work here. The first issue is that if i have the 'Insert Closing Brackets Automatically' option enabled, the right parenthesis will be auto-inserted in java code, but not in a jsp. The 2nd issue is that when i enter my right parenthesis of a code block on a new line, it should automatically re-align it to the left side of the block after i hit enter. This worked fine in NB 5, but has never worked since. If issue #1 is fixed, then issue #2 will not be so important for me. As for the comment on html being broke, i found out why i saw that behavior, and it turns out everything is working fine in that regard.
typo correction --------------- 'entering my right-space' should be 'entering my right parenthesis'
trobbins, Do I understand it right that the HTML editor behaviour is OK? For me it seems to be fine if the cursor is indented if you press enter after an open tag. Then the tag content is indented as "in tag" and when you type the close tag the tag aligns with the open tag. As for the other problem I understand: #1: curly bracket autocompletion doesn't work in java code embedded in JSP; to reproduce put <% | %> in a jsp file and type { at the pipe position => no closing } bracket is added as in standalone java #2: curly bracket indentation/aligning doesn't work; to reproduce (in a jsp scriptlet) type {, then enter => new line indent level is increased, then type } => the } bracket is not aligned with the opening pair. I think someone should look at the issues. Tomasz, you are the java-jsp expert, can you please look at this issue. If you have no experience in this field, feel free to reassign to me.
I did some more testing on the html auto-indention and completion issues, to see what I could find. I was able to find a couple of screwy issues with NB 6.5. After entering an opening tag and hitting enter, the closing tag will auto-fill. If you then hit enter, it will be properly aligned with the opening tag. However, if you hit <spacebar> after entering the opening tag, then hit enter, the tag will not-autocomplete, which is fine, IMO. Instead, it will move the cursor to the next line, and the cursor will be indented. This is still fine. But, when you go to enter the closing tag, then hit enter, the tag will not auto-indent back to the left to be aligned with the opening tag. This would be a bug, and is similar to how closing brackets behave. Also, depending on the what html is in the page (i.e. - i can't reproduce it reliably), the auto-indent for the closing tag will sometimes happen, but incorrectly. For example, I often see it that the closing tag will be a few tabs to the left of the opening tag. As for your descriptions of the JSP scriptlet / bracket issues, those are correct. I think NB should respect the 'Insert Closing Brackets Automatically' option in JSPS, and if the option is unchecked, then it should re-align the closing tag, as it had done correctly in NB 5.
This issue has a target milestone of 6.7, yet this issue has not been fixed for NB 6.7 RC1. Is anyone still working on a fix for this for 6.7?
Any word on this? I have just tested NB 6.8 Beta, and this issue has still not been addressed. is this really so hard?
trobbins, please specify briefly what still doesn't work. The JSP-java stuff or html end tag indentation?
I am concerned with the 'Insert Closing Brackets Automatically' issue in jsps. You can forget about the html indention issue, not to say that it's fixed. Its just one of the those more rare, hard-to-reproduce issues that will only happen for me on certain pages, but I can live with it. On the other hand, this bracket issue affects me all day, everyday, and it is an obvious bug.
Looks like a productivity issue, Tomasz can you please look at it? Upgrading to P2 so it appears in your radar range.
Everything seems OK on the embedding side, reassigning to Java editor for further evaluation
I don't think this is P2 bug (making it P3).
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/0a3e61cdf34e
Integrated into 'main-golden', will be available in build *201011050000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/0a3e61cdf34e User: Dusan Balek <dbalek@netbeans.org> Log: Issue #154466: Insert Closing Brackets Automatically doesn't work in java embedded in JSPs - fixed.