| IMPORTANT: Code completion on class member Objects fix for PDT <2.x [message #479721] |
Wed, 12 August 2009 03:51  |
|
Originally posted by: mnm.criion.net
I have tested this only on Eclipse 3.3 and PDT 1.05
Others with older setups please add test results.
Courtesy of Mark Kirchner. Thank you Mark!
class FooClass {
/**
* @var BarClass
*/
public $Object;
public function __construct(BarClass $o) {
$this->Object = $o;
}
public function worker() {
$this->Object->|
}
}
class BarClass {
public function doSomething() {}
public function doSomeOtherThing() {}
}
Code-assist invoked at the "|"-position in worker() suggests both
methods of "BarClass".
--
-michael
|
|
|
|
| Re: IMPORTANT: Code completion on class member Objects fix for PDT <2.x [message #479782 is a reply to message #479760] |
Wed, 12 August 2009 09:33  |
|
Originally posted by: mnm.criion.net
True true I just didn't know it was implemented in PDT. I have asked for
this many times but no one seemed to know how to do it so I figured
maybe there were many who would like to know how :)
yes you are right regarding the naming of instance variables. It is a,
perhaps bad, habit because in PHP we have a sign in front of variables
making it easy to see if it's a variable or class name. But this is no
excuse for someone beating hard on the "best practice"-path.
--
-michael
|
|
|
Powered by
FUDForum. Page generated in 0.01625 seconds