Netbeans Autocomplete And Relations

Hi.

I’m trying to use Netbeans to develop in Yii, and works great, but I just noticed autocomplete is not working for relations.

Is it just me?

Using NB 7.0.1

I think you’d have to annotate your code to get auto-complete on your relations. Netbeans has no way of knowing that Yii will process the relations array in the way that it does.

This code is generated by Gii, at least the relations function and its comments.

Since Netbeans already autocompletes most of the Yii methods, I expected this to work already ;)

I will have a look into phpdoc and maybe file an enhancement bug.

thanks

If you have a piece of code like that




/**

...

 * @property-read array $registredUsers - Registred Users - Array of User Model indexed by user id.

 */

class Party extends CActiveRecord

{

	/**

	 * Returns the static model of the specified AR class.

	 * @param string $className active record class name.

	 * @return Party the static model class

	 */

	public static function model($className=__CLASS__)

	{

		return parent::model($className);

	}



registredUsers being a relation defined in relations()

That will be ok for autocompletion (that’s ok for me, i’m using netbeans 7). (I also added path to yii/framework in the project include path.)

3270

yii_autocomplete.png

ok but if into the model you write


$this->registeredUser->

will autocomplete with registeredUser properties?