开发者

Enabling "Open Declaration" in Aptana Studio 3 PHP Editor

I used PDT for a bit in Eclipse, but wasn't satisfied with its Javascript formatting (especially with jQuery syntax), so I switched to Aptana Studio 3 (standalone version).

I'm really enjoying Aptana's features, but quite a few of things I enjoyed before are missing. For inst开发者_Python百科ance, I would like to be able to right-click on a function and use the Open Declaration feature to make AS3 go to the declaration of the function (whether it is in the current file or another). The option is present in AS3, but when I try to use it nothing happens.

Any way I could enable this functionality in AS3?


The PHP support in AS3 is in its full power when the 'Nature' of the project is recognized by the Studio (e.g. com.aptana.editor.php.phpNature).

As a future reference for others who stumble into this issue, the simplest way to set a Nature in the studio is by right-clicking the project, select 'Properties' and then select the Project Natures item. In that dialog, select the PHP item (the one with the icon next to it). You may also choose to make it as primary, but note that the only effect by doing so is visually (having a P icon on the project, marking it as a PHP project).

Also, by setting the nature this way, an Aptana PHP builder will be added to the .project file. This builder is needed for a proper indexing and code-assist for the project.

As a fix, we are considering some sort of notification that will allow you setting a nature when you import a project. That, in most cases, should solve it.

Hope that helps understanding how things work 'under the hood' :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜