Difference between #6 and #7 of
Eclipse PDT - code-hints, references and other goodies

Revision #7 has been created by Woil on Jan 31, 2011, 11:56:38 PM with the memo:

Added Code Hints in Your Yii Views
« previous (#6)

Changes

Title unchanged

Eclipse PDT - code-hints, references and other goodies

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

IDE

Content changed

[...]
* whether to create project for yii (maybe you'd like to checkout latest revisions from time to time?)
* add Yii as a library (e.g., its in your system- or user-wide PHP includes dir)
* add Yii as a source folder
5. Once Eclipse parses the code you've got all the good stuff

## Code Hints in Your Yii Views
 
 
Views in Yii have a minimal amount of markup but are launched in the scope of the calling controller class. The "$this" variable references the calling controller but Eclipse and other editors won't be able to provide code hints without some help from you. At the top of the view file you can put:
 
 
 
```php 
<?php /* @var $this SiteController */ ?>
 
```
 
 
Change "SiteController" to the name of the calling controller for each view.
 
 
## Tips * Might happen code-hints doesn't work. Try to remove yiilite.php - it has all framework's classes inside but without documentation. Maybe Eclipse stops after parsing it. * Having yiilite.php will actually give you all classes twice. You might want to remove it for convenience. (Check docs on performance once you're approaching release date!) * Holding mouse over something in the code will give you tooltip with info on that something if any. * F4 will open type-hierarchy (PDT 2.0).
14 0
6 followers
Viewed: 42 091 times
Version: 1.1
Category: Tutorials
Tags: IDE
Written by: mindeh
Last updated by: Woil
Created on: Feb 18, 2009
Last updated: 13 years ago
Update Article

Revisions

View all history