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.
[NetBeans 200508281800; FC4; JDK 1.5.0_04] Issue Summary: -------------- Code templates are shown among methods in code completion. That's of no usage and makes methods and fields harded to access. Steps to Reproduce: ------------------- 1. Create a new java class. 2. In constructor, type in "this.f". 3. Invoke code completion after f. -> Many code templates are shown but are useless.
Parameters of methods are harder to acces also. When using CC to supply a variable as a methods parameter, I need to skip the abbrevations first, if they begin ie. with the same letter as the variable I intend to paste there. Either they shouldn't be listed there, or be moved downwards.
*** Issue 64775 has been marked as a duplicate of this issue. ***
*** Issue 65296 has been marked as a duplicate of this issue. ***
Upping to P2 because of the duplicate. See it for additional details.
Since we currently cannot evaluate the context syntactically well (i.e. we can't offer only the code templates that are syntactically appropriate at the given context) the best solution now would IMHO be to shift the code templates completion items beyond the java completion items.
Fixed in trunk: Checking in src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionItem.java; /cvs/editor/codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionItem.java,v <-- CodeTemplateCompletionItem.java new revision: 1.6; previous revision: 1.5
Additional fix - moved CT above java classes and packages. Checking in src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionItem.java; /cvs/editor/codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionItem.java,v <-- CodeTemplateCompletionItem.java new revision: 1.7; previous revision: 1.6
Well, quite a dirty solution, but ok. Verified.