Code Completion for NetBeans
Posted: Sat Jul 03, 2010 8:42 pm
Anyone who wants autocompletion in NetBeans (and most likely will work in Eclipse PDT too) just add the following above abstract class Controller in system/engine/controller.php
/**
* @property string $id
* @property string $template
* @property array $children
* @property array $data
* @property string $output
* @property Loader $load
* @property Config $config
* @property DB $db
* @property Log $log
* @property Request $request
* @property Response $response
* @property Cache $cache
* @property Url $url
* @property Document $document
* @property Language $language
* @property Customer $customer
* @property Currency $currency
* @property Tax $tax
* @property Weight $weight
* @property Measurement $measurement
* @property Cart $cart
* @property ModelToolSeoUrl $model_seo_url
*/
This will make life a hell of a lot easier for you as you don't need to guess what all the available properties and methods of those objects are and you can use Ctrl+space to invoke code completion. Also, you can add similar comments above the specific controllers and define properties like model_catalog_category etc so that you can take advantage of code completion on the models too.
/**
* @property string $id
* @property string $template
* @property array $children
* @property array $data
* @property string $output
* @property Loader $load
* @property Config $config
* @property DB $db
* @property Log $log
* @property Request $request
* @property Response $response
* @property Cache $cache
* @property Url $url
* @property Document $document
* @property Language $language
* @property Customer $customer
* @property Currency $currency
* @property Tax $tax
* @property Weight $weight
* @property Measurement $measurement
* @property Cart $cart
* @property ModelToolSeoUrl $model_seo_url
*/
This will make life a hell of a lot easier for you as you don't need to guess what all the available properties and methods of those objects are and you can use Ctrl+space to invoke code completion. Also, you can add similar comments above the specific controllers and define properties like model_catalog_category etc so that you can take advantage of code completion on the models too.