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 super neat function in netbeans that shows template in the autocomplete does not work well. For example [1]: create a new php file, start with <?php and type <enter> 'class' <ctr>+<space> In the list you'll find the 'cls template'. Don't use it but type 'class Test { }' + <enter> <enter> Type again 'class' <ctr>+<space> and the template is not there. ------------------------- example [2] : Create a new template: abbr: 'test'; expanded text: '$test = 'test'; create a new php file. enter <?php type <enter><enter> type test, type <ctr>+<space> results in => 'No suggestions'
example [2] is not a good example.. sorry :S. example [3] make a new template: abbr: test value: # test function function test() { $test = 'test'; return $test; } then in the autocomplete this template doesn't show when typing #test
templates are expanded by tab key. 1/ So, either use: test<tab> 2/or CC then use prefix matching with first characters inside the template. For your template: function test() { $test = 'test'; return $test; } you should use: funct<ctrl+space> and in CC you should see also your test template So, works as designed. Naturally if you don't like it, please file an new Enhancement, thanks
Hi Rmatous, Thanks for diving into this! I can't reproduce the functionality you're describing. You write: --- "2/or CC then use prefix matching with first characters inside the template. For your template: function test() { $test = 'test'; return $test; } you should use: funct<ctrl+space> and in CC you should see also your test template" --- but when i type funct<ctrl+space> the template doesn't show up. When i type function<ctrl+space> it shows up. I think all these 'restrictions' makes this functionality not intuitive. What also makes this functionality 'live templates' not workable is: if you change the testtemplate like this: ----------------- /** * Function to test code tempates * * @return String */ function test() { $test = 'test'; return $test; } ------------------ the template won't show up anymore in the autocomplete list. My proposal would be to change this functionality as how ZendStudio 5.5 would cope with this. They don't look at the template itself, but they autocomplete on the abbreviation. Thanks! P.s.: you can also expand templates with the enter key ;)
Product Version: NetBeans IDE Dev (Build 100421-c43437331587) Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01 this is not reproducible in above mentioned build. Solution proposed by reporter is enhancement and is reported against php as BUG 184604