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: | Patch for: Code completion for templates | ||
---|---|---|---|
Product: | editor | Reporter: | Filip Zamboj <fzamboj> |
Component: | Completion & Templates | Assignee: | Dusan Balek <dbalek> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | 11mb, culli, joshis, jrojcek, markiewb, mcinp |
Priority: | P3 | Keywords: | PATCH_AVAILABLE |
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: |
Proposed patch
Patch in action |
Description
Filip Zamboj
2010-04-21 12:15:14 UTC
Makes sense to me. Perhaps CC could offer any template containing the text typed in the editor and not just those that start with the text. A reasonable ordering of these suggestions would be neccessary of course. Or maybe these inexact templates might not be offered in the smart CC. Just random thoughts... Created attachment 130859 [details] Proposed patch I like to propose a patch for this issue. * completion now works with the abbreviation (as prefix) - as requested * completion based on parameterized text has been removed (made no sense for me - see http://netbeans.org/bugzilla/show_bug.cgi?id=184604#c0 point 2.) * no contexts are supported anymore (made no sense for me too) @NetBeans-Devs: Please review, discuss and commit... Thank you Created attachment 130860 [details]
Patch in action
*** Bug 194734 has been marked as a duplicate of this bug. *** Comments to the proposed patch: - I'm not sure that using the template abbreviation as the code completion prefix is always better than the expanded text prefix (e.g. typing 'Sy(ctrl+space)' inside method body, code template 'System.out.println()' with abbreviation 'sout' would not be proposed) - as for contexts - makes sense for me not to propose e.g. "protected void method()" outside of a class or inside of another method body. Anyway, I think that the NB integration of code templates and code completion deserves a deeper redesign (currently planned for the next release hopefully). *** Bug 108180 has been marked as a duplicate of this bug. *** *** Bug 129278 has been marked as a duplicate of this bug. *** *** Bug 167108 has been marked as a duplicate of this bug. *** Fixed in jet-main. Abbreviations should be used together with parameterized text prefix. http://hg.netbeans.org/jet-main/rev/9cde477eea86 Integrated into 'main-golden', will be available in build *201305042300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/9cde477eea86 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #184604: Code completion for templates should use abbreviations as well - fixed. |