yii API reference help files and eclipse/zend/aptana studio?

I'm learning right now the framework. Not an expert. So…

Is there any possibility to use YII API reference from within Eclipse (or zend / aptana) to have help pressing F1 or something for a quicker learning?

Thanks

You probably need some eclipse plugin or something…  I've never been able to get my head around the way eclipse works…

any other (easy) way?..someone?..

In aptana studio configuration pages for PHP Editor, I saw that it draws it's documentation from www.php.net/manual/en, and it has options to add some other links, local links, web links, or chm files.

I tried to add the chm file of yii api, but to no avail.

Another idea that crossed my mind: if "Find declaration" (F3 key) works, isn't possible to display somehow the documentation comments for every class / method in the source code?

Still searching a solution…

hey,

I use Eclipse PDT and code hints work pretty nice. Just make sure to put Yii in your includes (Project->Properties->PHP include path). I've created s separate project for the framework, but probably its possible to add it as a library.

Eclipse parses phpDoc comments for function argument and return types and since Yii is well documented it works great.

Problem is only with class' field as /** @var varType */ doesn't seem to work.

On the other hand, using getters solves the problem.

hope this helped

cheers,

Minde

I'm trying to achieve what you are saying. Could you be more specific about details? (maybe write here some step by step actions to get context help with eclipse pdt)

For example, when you said you've created a project with yii framework, did you add to that project only framework directory inside yii, or all yii directory?

I must do something wrong, I still don't have context help.

I am trying right now with eclipse PDT 2.0, that's why I write these lines.

I like aptana studio, but if I cannot manage to get context help for aptana, I guess I will remain with pdt.

Thank you

I think I figured it out after all.

The problem with aptana is that it is stopping searching for phpdoc comments after finding yiilite.php. yiilite.php doesn't contain any phpdocs, and here is the problem.

After I moved yiilite.php, phpdoc was working.

eclipse pdt is much smoother than aptana at this moment.

I still prefer aptana for color syntax customization though.

Anyway, is there a possibility to make context help display all the comment?

By default it displays only until it finds period "."… everything afterwards is not displayed…

So, thread resolved. Thanks for help.

[edit]@mishhh just noticed, you've got the problem solved. Anyway I leave my reply - maybe someone will find it useful

With Eclipse PDT all this works out of the box. Here are the steps:

  1. Create PHP project

2a. Yii is inside project's dir

3a. Once files are built/parsed by Eclipse, code hints should work. F1 isn't working for me, but suggestions for method arguments, method & class descriptions and other stuff give tooltips when typing or mouseOver.

2b. Yii isn't inside project's dir

3b. Click Project->Properties->PHP Include Path. You've got 3 tabs, 2 are important: Projects & Libraries.

4b.a. You create project for Yii and add it here (I've done this way so that PHP Project Outline would outline less classes for me - only my own).

4b.b. You add Yii dir as a library.

It should work either way. You might need to check Project->Build automatically.

If there are still problems, please be more specific, maybe I can help then.

cheers,

Minde

How about a cookbook article for this? Would be easier to find and maintain.

Very clear response mindeh. Thank you and yes, it's good you've answered for newcomers.

And yes mike, it would be nice to have a cookbook. How to get Yii working with eclipse, eclipse pdt, zend studio, aptana and what not.

Now that I investigated for sometime, through trial and error mostly, I see that's not that complicated, but I don't know how many have as little persistence as I had honestly.

In the end aptana has many bugs in this area of context help, or code assist.

Nushpere PhpED is impressive in code exploring also. (If someone wants to check it out)

hey,

I'll write a recipe to the cookbook once at work tomorrow

cheers,

Mindeh

hi,

created it here: http://www.yiiframew…oc/cookbook/13/

Difficult to define complete but this recipe is not, so be sure to add you're own tips and additions/corrections.

cheers,

Mindeh

Wow… very nice mindeh. Your cookbook sums up everything (for starters anyway). Great work. I didn't know I could create cookbooks:) Thanks for this info too…

Case closed I guess…