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.
Summary: | generated methods in servlet are folded with http servlets methods | ||
---|---|---|---|
Product: | javaee | Reporter: | Radim Roska <rroska> |
Component: | Code | Assignee: | pslechta <pslechta> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | sustaining |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Radim Roska
2008-03-05 10:57:57 UTC
it looks more like a defect rather then enhancement Priority correct at P3. Not critical for 6.1. Reproduced in 6.1 dev build on WinXP. The generated code is placed after folded block only in there is some code after the block (variable declaration is sufficient). It seems that cursor position does not influence where the generated code goes. I looked through NB APIs used for Java source code modification (a lot of compilation trees and diffs) and don't see any way how to fix the problem using these APIs. However, I found that the problem may be eliminated just by changing template for servlet code generation... Fixed. http://hg.netbeans.org/main/rev/ae8df03336ec The fix is very simple and everybody may apply it to his/her NetBeans installation -- just change template for servlet code generation: (1) Tools > Templates > Web > Servlet > Open in Editor. (2) Modify the template according to the diff (see the link above). The most important change is to attach "// </editor-fold>" comment directly after "}". (3) Save the template. Now all new methods should be inserted outside of the folded methods. *** Issue 117977 has been marked as a duplicate of this issue. *** verified The fix has been ported into the release61_fixes branch. http://hg.netbeans.org/release61_fixes/rev/c6e692de4846 |