Bug 197906 - Formatter sometimes breaks inserting life code templates
Formatter sometimes breaks inserting life code templates
Status: RESOLVED FIXED
Product: php
Classification: Unclassified
Component: Formatting & Indentation
7.0
PC Linux
: P3 with 2 votes (vote)
: 7.0.1
Assigned To: Petr Pisl
issues@php
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-20 13:00 UTC by Petr Pisl
Modified: 2011-05-02 09:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Pisl 2011-04-20 13:00:30 UTC
When you create a new template like this:

/**
* ${methoddescription}
*/
function ${functionN}($$${variable1}, $$${variable2}) {
    ${selection}${cursor}
}

the inserting is not finished correctly. The parameters of the template are not processed and the template is inserted as text.
Comment 1 Petr Pisl 2011-04-20 13:01:57 UTC
My guess is that the formatter format also whitespaces around the template and when is something changed outside the template region, then the template handler stops to process parameters of template.
Comment 2 Petr Pisl 2011-04-20 15:10:00 UTC
So the first assumption was wrong. The problem was in formatting phpdoc that is replaced line by line. It means that the template parameter in php doc (${methoddescription}) was touched and the template processor finished editing of the template. 

The formatter is fixed now. Will be a part of NetBeans 7.0.1.
Comment 3 Quality Engineering 2011-04-21 04:56:23 UTC
Integrated into 'main-golden', will be available in build *201104210000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b6e82ed44a25
User: Petr Pisl <ppisl@netbeans.org>
Log: #197906 - Formatter sometimes breaks inserting life code templates
Comment 4 umpirsky 2011-04-26 08:03:55 UTC
Tested with NetBeans IDE Dev (Build 201104250000), worked like a charm, thanks!
Comment 5 umpirsky 2011-04-29 12:00:52 UTC
When will this be merged into some stable release (probably 7.1)?
Comment 6 Petr Pisl 2011-04-29 12:15:19 UTC
It should be part of NB 7.0.1. There is possibility to add this fix to the patch that should be available during 3 - 4 weeks. But then the issue should have bigger priority. If you think that it's needed, please increase the priority to P2.
Comment 7 umpirsky 2011-04-29 12:17:20 UTC
(In reply to comment #6)
> It should be part of NB 7.0.1. There is possibility to add this fix to the
> patch that should be available during 3 - 4 weeks. But then the issue should
> have bigger priority. If you think that it's needed, please increase the
> priority to P2.

Let me revisit the question. When will NB 7.0.1 be released? :)
Comment 8 Petr Pisl 2011-05-02 09:41:21 UTC
The plan of NB 7.0.1 is here http://wiki.netbeans.org/NetBeans_701 .


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo