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.
In order to reproduce this bug, set NetBeans editor to expand tabs to spaces (maybe I set it to convert tabs to spaces if such option is available, I'm not sure). Then try to use some of PHP code templates, for example fnc and press tab, it will work ok, but if you delete generated code and save file, next time you try to type fnc and press tab, the template will not be generated, but one space written instead. Looks like there is something in save routine that makes template to stop working. In addition, if I move to some other line in the script and try template agsain, it will work, but when I save it will stop again. So it works before you save, but after save no.
I tested it with NetBEans 7 RC1.
I can not reproduce the bug and I don't know what is going wrong. How big is the file? Can you reproduce it in new php file? I'm just trying to find out what can be wrong.
I'm marking this issue as incomplete, waiting for the response. Please reopen the issue, after more info.
Created attachment 107994 [details] Template not working after save 1. Create new PHP file. 2. Type fnc, press tab - template works. 3. Delete generated code 4. Save file. 5. Repeat step 2 - template does not work.
Now it happens to me as well. It looks like a timing issue and on Vista happens more often than on my Linux system. It happens for me from 20 attempts one time. But the issue is there. Thanks
(In reply to comment #5) > Now it happens to me as well. It looks like a timing issue and on Vista happens > more often than on my Linux system. It happens for me from 20 attempts one > time. But the issue is there. Thanks OK. Good thing is that we reproduced it.
So far what i have discovered: There is called a PHP temlate filter, that should decide whether the written letters are a template or not. The PHP template filter decides based on the context where is the abbrev written. For it requires actual parse result and run UserActionTask, where the context should be fined. The problem now is that due to some circumstances the UserActionTask is not started in Parsing API at all. So it looks like an issue with running UserActionsTasks in Parsing API. Need to work on this more.
The fix required changes in parsing api infrastructure. More in issue #198307 that is now fixed. The php editor part is now also committed into the web-main.
Integrated into 'main-golden', will be available in build *201105050000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/fa42cef38899 User: Petr Pisl <ppisl@netbeans.org> Log: #197887 - PHP code templates don't work after save
Verify on: Product Version: NetBeans IDE Dev (Build 201105090000) Java: 1.7.0-ea; Java HotSpot(TM) Client VM 21.0-b10 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
For the list of included fixed bugs please check http://wiki.netbeans.org/NetBeans70PatchesInfo
Transplanted into releases70_fixes http://hg.netbeans.org/releases/rev/8149d9bcbe52 http://hg.netbeans.org/releases/rev/6523cda6fe79
This bug is still not fixed for me on Windows, version 7.1.2 . The 'expand space to tab' option has no effect on this, it doesn't work whether the option is enabled or not. Please fix this!! This is very important and its forcing me to not use the latest version of netbeans. In 6.9.1 the templates feature was still working.