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: | Code template will not expand outside class method | ||
---|---|---|---|
Product: | php | Reporter: | ptrwrsm |
Component: | Editor | Assignee: | Ondrej Brejla <obrejla> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | BullfrogBlues, bullito, eternoendless, gsnerf, hinson0, luke, mmirilovic, sidtj, vriha |
Priority: | P3 | Keywords: | REGRESSION |
Version: | 7.1 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
ptrwrsm
2011-12-15 00:24:44 UTC
*** Bug 205968 has been marked as a duplicate of this bug. *** *** Bug 205750 has been marked as a duplicate of this bug. *** *** Bug 207279 has been marked as a duplicate of this bug. *** Fixed in web-main: http://hg.netbeans.org/web-main/rev/0ff1b19b4ae7 Integrated into 'main-golden', will be available in build *201201260600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/0ff1b19b4ae7 User: Ondrej Brejla <obrejla@netbeans.org> Log: #206413 - Code template will not expand outside class method i still have that issue on nb nigtly 201201260600. i saw you marked few bugs as duplicate. i dont think it was, becouse it depends somehow on nb background state (i dont know details). what i mean: in exacly same context, sometimes Code template works, and sometimes not. exacly same context mean same file, cursor placement etc. what i noticed also: i have CT expand on space press. when i type "sthsthsth" and hit space, there is no laq. but when i type some of code template for example "vd" (should expand to var dump) i feel some kind of laqy. but then nothing happens. Product Version: NetBeans IDE Dev (Build 201201260600) Java: 1.6.0_30; Java HotSpot(TM) Client VM 20.5-b03 System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb) Encountering the same problem. Can be tested with my set of code templates for Symfony2. https://github.com/Monomachus/Symfony2CodeTemplates/downloads You can just try to type in a PHP class action - code template should generate something like this: public function ${name}Action(${cursor} Vlado, please, can you verify this patch candidate? Just create your custom code template and try to expand it in some class definition. Thanks! The bug (partially) still exists. To reproduce create new empty project (PHP 5.3/5.4) and in index.php declare new class and type "my_fa" and hit TAB. Code template should be inserted but it's not. If you repeat the same in function, it works. I've noticed that If I create custom template, then it works just fine inside the class declaration. I even copied the content of "Expanded text" of the "my_fa" to custom new template and it also works. Product Version: NetBeans IDE Dev (Build 201202060400) Java: 1.7.0_03; Java HotSpot(TM) Client VM 22.1-b02 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) But I think, that it's the right behavior. Because "my_fa" is a template for a while cycle...and it can't be used in class declaration (only "fnc" and "fcom" can be used there). But all custom templates are allowed everywhere, because there is no possibility to set the right context in the UI. OK, v. Can I test it somehow? It's in dev builds. Works for me too. It is reproducible in .twig files. I added a custom code template block {% block ${name} %} ${cursor} {% endblock %} And now when I try to type block and press Tab key, nothing is happening. It's issue of twig templates...it's another file type. Integrated into 'releases', will be available in build *201202072200* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/36822f922938 User: Ondrej Brejla <obrejla@netbeans.org> Log: #206413 - Code template will not expand outside class method (transplanted from 0ff1b19b4ae78ed35457281e59736c977b7de658) *** Bug 208180 has been marked as a duplicate of this bug. *** *** Bug 200359 has been marked as a duplicate of this bug. *** verified 7.1.1 Product Version: NetBeans IDE 7.1.1 (Build 201202122200) all is ok!~thank you!~i love you.version 7.1.1 is very very good!~i love it Nice fix guys. Verified 7.1.1 |