Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enabling "Open Declaration" in Aptana Studio 3 PHP Editor

Tags:

php

aptana

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 instance, 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?

like image 639
Austyn Mahoney Avatar asked Aug 17 '11 21:08

Austyn Mahoney


1 Answers

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' :)

like image 81
sgibly Avatar answered Oct 30 '22 21:10

sgibly