Skip to main content



      Home
Home » Language IDEs » PHP Development Tools (PDT) » Auto complete params in child class method?
Auto complete params in child class method? [message #99741] Tue, 07 July 2009 22:51 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
> 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.
Previous Topic:auto completion of PHP-directive
Next Topic:[Announce] PDT 2.1.1RC2 is available
Goto Forum:
  


Current Time: Mon May 05 08:41:53 EDT 2025

Powered by FUDForum. Page generated in 0.03315 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top