Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323462 - "Completion Overrides" does not override the parameters of a method
Summary: "Completion Overrides" does not override the parameters of a method
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Zhongwei Zhao CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-24 02:36 EDT by Sylvia Tancheva CLA
Modified: 2020-05-14 11:09 EDT (History)
4 users (show)

See Also:
zhaozhongwei: review? (ganoro)
zhaozhongwei: review?
zhaozhongwei: review? (zhaozhongwei)


Attachments
patch (3.44 KB, patch)
2010-09-02 04:35 EDT, Zhongwei Zhao CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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