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.

Bug 173504 - completion in code templates
Summary: completion in code templates
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-01 15:32 UTC by rmatous
Modified: 2009-10-21 16:06 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
image taken when editing PHP file (6.43 KB, image/png)
2009-10-01 15:34 UTC, rmatous
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rmatous 2009-10-01 15:32:48 UTC
User's description:
if I use ctrl+space for auto complete in a code template, after ide
finish completion it finish also template, i.e. does not jump to next
variable to be edited in template. Is it bug?

$arrr = array();
foreach ($arrr as $value) {

}


in code above I type "fore" then TAB, template is created, start
completion for $arrr, press ENTER to confirm completion suggestion and
instead to get editing rectangle for $value IDE does nothing more
defined in template. If I just type name of $arrr and press Enter
cursor jumps as expected into $value.
Comment 1 rmatous 2009-10-01 15:34:38 UTC
Created attachment 88681 [details]
image taken when editing PHP file
Comment 2 rmatous 2009-10-01 15:36:09 UTC
Relatively severe because usage of completion for variables in php will be relatively common scenario
Comment 3 Vitezslav Stejskal 2009-10-01 15:56:28 UTC
Umm, seems to work fine in java. Or maybe I am doing something different.
Comment 4 rmatous 2009-10-01 16:46:25 UTC
substituted text seems to be out of boundary => will be fixed in php
Comment 5 rmatous 2009-10-02 12:46:07 UTC
Tomas, could you go through code templates in code-templates.xml and substitute in templates pattern $$${array} for
${$array} when appropriate
Comment 6 Tomas Mysik 2009-10-21 16:06:02 UTC
Fixed as part of issue #174334.