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.
1. Create web project 2. create servlet doGet and doPost methods are folded as desc="HttpServlet methods... thats ok. But if user generate another methods (e.g. rightclick->enterprise resource->send JMS Message), these methods are folded in the same "block" as doGet and doPost and are collapsed by default. This may be confusing. I suggest to place these new methods somewhere before "doGet & doPost block"..so its not collapsed automatically.
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