Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323462

Summary: "Completion Overrides" does not override the parameters of a method
Product: z_Archived Reporter: Sylvia Tancheva <silviya>
Component: PDTAssignee: Zhongwei Zhao <zhaozhongwei>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: ganoro, ilina.s, qiangsheng.w, silviya
Version: unspecifiedFlags: zhaozhongwei: review? (ganoro)
zhaozhongwei: review?
zhaozhongwei: review? (zhaozhongwei)
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

Description Sylvia Tancheva CLA 2010-08-24 02:36:22 EDT
Sample code:
<?php
class A
{
	/**
	 * Enter description here ...
	 * @param String $a
	 * @param boolean $b
	 */
	function bla($a,$b){}
	/**
	 * Enter description here ...
	 * @param String $c
	 * @param boolean $d
	 */
	function kla($c,$d){}
	function usage()
	{
		$this->bla('haha', true);
	}
}

1. Turn on Completion Overrides (Preferences -> PHP -> Editor -> Content Assist)
2. In method usage() put the cursor after $this-> and invoke Content Assist
3. From the list choose kla()

Expected:
$this->kla($c, $d);
Actual:
$this->kla($c, $d)('haha', true); -> parameters from previous method remain.
Comment 1 Zhongwei Zhao CLA 2010-08-25 03:33:30 EDT
after discuss with Roy,we decide to align with the JDT behavior.
expected:
$this->kla('haha', true);

fixed in head and branch
Comment 2 Zhongwei Zhao CLA 2010-08-26 04:44:41 EDT
still reproducible!!
Comment 3 Zhongwei Zhao CLA 2010-09-02 04:35:14 EDT
Created attachment 178024 [details]
patch
Comment 4 Roy Ganor CLA 2010-09-03 17:28:59 EDT
let's commit to head and not to branch as this is not critical

thanks!
Comment 5 Roy Ganor CLA 2010-09-06 04:28:10 EDT
fixed by Zhao!
Comment 6 Sylvia Tancheva CLA 2011-07-14 08:06:23 EDT
After retesting with Studio 9 #179 on Win XP, 32 bit the result is: $this->kla('haha', true);

Closing.

Ilina Stefanova