Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314824 - New templated 'Content Assist': optional parameters are included in the template
Summary: New templated 'Content Assist': optional parameters are included in the template
Status: CLOSED DUPLICATE of bug 309297
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-28 04:49 EDT by Ilya Sedlovsky CLA
Modified: 2020-05-14 11:18 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Sedlovsky CLA 2010-05-28 04:49:48 EDT
Build Identifier: 20100520-1308

When a method of any class is inserted using code assist the list of all parameters of the method is present in the template of the method to fill them regardless of the fact some of them are optional (has default values) for the method and may not be present in the method call.

Reproducible: Always

Steps to Reproduce:
1. Create new PHP file and fill it with:
<?php
class Test {
    public function test($mandatory, $optional = null) {}
}

$test = new Test();
$test->
?>

2. Put your text cursor after "$test->" and press Ctrl+Space (invoke Code Assist).

3. PDT inserts template:
  $test->test($mandatory, $optional)

Note that $optional parameter has default value and must not be present in the template.
Comment 1 Roy Ganor CLA 2010-05-28 17:13:01 EDT
duplicate (original is fixed)

*** This bug has been marked as a duplicate of bug 309297 ***
Comment 2 Zhongwei Zhao CLA 2010-05-28 23:07:37 EDT
I tested it use the pdt product,and I can reproduce it,but it does not exist in devenv.And I have written a pdtt file to test it.Maybe it will works in the next version,but I am not sure!
Comment 3 Gadi Goldbarg CLA 2010-06-17 08:24:32 EDT
Verified at PDT-2.2.0.v20100616
Auto completion is suggested only mandatory function parameters
This issue is fixed
Closing
Thanks

Verified by
Teodor Kirkov
teodor.k@zend.com