Auto complete params in child class method? [message #99741] |
Tue, 07 July 2009 22:51  |
Eclipse User |
|
|
|
Hi, I have this code:
class cParent{
/**
* @param CForm $ret
* @param array $row
* @return void
*/
function getFormEx($ret, $row){
$ret->addHeader('input', 'header');
$ret->addHeader('content', 'content');
$ret->XXX
}
}
class cChild extends cParent{
function getFormEx($ret, $row){
$ret->YYY
}
}
In XXX position PDT (eclipse 3.5 + pdt 2.1) auto comlete works fine - it
shows methods of "CForm" class for $ret.
But on YYY position PDT _not_ works (in editor method showing with
overriden marker).
How can I fix this without adding phpDoc comments for each overridden
method, and without typing each param type in each overriden function
prototype (like "function getFormEx(CForm $ret, $row){")?
|
|
|
Re: Auto complete params in child class method? [message #99762 is a reply to message #99741] |
Wed, 08 July 2009 04:48  |
Eclipse User |
|
|
|
> How can I fix this without adding phpDoc comments for each overridden
> method, and without typing each param type in each overriden function
> prototype (like "function getFormEx(CForm $ret, $row){")?
>
I think this is simply impossible, since the overiding method can have a
different method signature then those from the overidden method.
It would be possible of course to implement this behaviour in PDT, but
from a language pointview this would be incorrect.
|
|
|
Powered by
FUDForum. Page generated in 0.03315 seconds