I’m using ubuntu 12.04 and Netbeans 7.2.1
I’v got this project from github
https://github.com/opencart/opencart
Then I tried to add some variables in /upload/system/engine/controller.php via phpDoc like this
/** * @property Loader $load Description * @property Config $config Description * @property DB $db Desc */
It worked fine and in child controllers (for example upload/catalog/product/category.php) I saw hints when typed “$this->”.
Then I got all “global” vars that can be in Registry, that contains parent controller and available via “$this->” and wrote them with code
echo ‘ * @property ‘ . get_class($value) . ‘ ‘ . $key . ‘ Description’ . ‘
‘;
Then I copy result and paste it to phpdoc block. It was
* @property Loader load Description * @property Config config Description * @property DB db Description * @property Url url Description * @property Log log Description * @property Request request Description * @property Response response Description * @property Cache cache Description * @property Session session Description * @property Language language Description * @property Document document Description * @property Customer customer Description * @property Affiliate affiliate Description * @property Currency currency Description * @property Tax tax Description * @property Weight weight Description * @property Length length Description * @property Cart cart Description * @property Encryption encryption Description
I was very hopeful opening child controller for testing autocomplete, but autocomplete didn’t show me anything I added after typing “$this->”.
I tried some combinations and noticed, that it works only when I’m using autocomplete when type “@pro” and then type “enter” button and then fill fields by typing “tab” to focus on next field. So even typing “@pro” and then typing “tab” and then manually write all other words don’t make netbeans show autocomplete for that.
Does anyone know, what am I doing wrong?
I see, i miss “$” symbol in
need
Shame on me.