Find Function within PHP project [message #74297] |
Mon, 30 June 2008 15:10  |
Eclipse User |
|
|
|
Hello,
I have a Drupal project that I am working on through Eclipse 3.4 with
PDT 1.1. In the PHP Project Outline I noticed that there is a listing of
all functions from the PHP files on Drupal. As Drupal uses very little
in the way of classes the function list is very long for each module
that is used with Drupal. Is there a way to quickly search for a
function much like you look for a class (Open Type) / file (Open
Resource)???
If there is no way, how do I go about making a request to get that
functionality added? I don't think it would take much more work as the
list of functions is already being done by the indexer.
Thanks
P.S. I know I could do a search through all the php files to find the
function but that includes all calls to the function. I would much
rather be able to take advantage of the list that is already in the PHP
Project Outline.
--
Shawn Clark
|
|
|
|
|
|
|
|
|
|
Re: Find Function within PHP project [message #74791 is a reply to message #74758] |
Thu, 03 July 2008 08:31  |
Eclipse User |
|
|
|
Of course, that what I was talking about.
Filtering by include() should be optional.
I've just committed a new bug about it:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=239431
Thanks!
Shawn Clark wrote:
> Michael,
>
> I see what you are talking about but this functionality doesn't work
> well with the way Drupal files / includes are organized. This may be
> something a little Drupal specific but it has a fairly active OS
> community and making Eclipse PDT work nicely with it would be beneficial.
>
> The main thing with Drupal is that it loads modules through dynamic
> include statements. The include statement has a variable for the
> included file and that variable is retrieved from a database call.
>
> What would need to happen is that if the Open Declaration (F3) command
> doesn't find a function then it would open the 'Open Method / Open PHP
> Element' window with the current selected function name entered into
> this window so the user can see all possible matches and choose which
> one is the actual function declaration.
>
> Sound feasible?
>
>
> Michael Spector wrote:
>>
>> Hi,
>>
>> I think this is a matter of file network filtering... I'll explain:
>>
>> F3 will only work if PHP element is accessible from current file. I.e.
>> there is a resolved 'include' statement in the original file, which
>> leads to the file where PHP element is declared.
>>
>> I think this feature must be configurable, and it should be disabled
>> by default.
>>
>> What do you think?
>>
>> Thanks!
>>
>>
>> Shawn Clark wrote:
>>> Thanks for the quick reply Стоян Димитров...
>>>
>>> I was thinking that functionality must be there as I use to use a
>>> similar ability with my Java development. Unfortunately with the
>>> I20080616 build I don't have that 'Open PHP Element' menu item. The
>>> other thing is pressing F3 while on a function name doesn't take me
>>> to the declaration. I will grab the latest nightly build to see if it
>>> is back.
>>>
>>> --
>>> Shawn Clark
>>>
>>> Стоян Димитров wrote:
>>>> Hi Shawn,
>>>> you can use 'Navigate' > 'Open PHP Element' from the main menu or
>>>> Shift+Alt+G shortcut. If you need to go to the function declaration
>>>> just click on the function name and press F3.
>>>>
>>>> Shawn Clark wrote:
>>>>> Hello,
>>>>>
>>>>> I have a Drupal project that I am working on through Eclipse 3.4 with
>>>>> PDT 1.1. In the PHP Project Outline I noticed that there is a
>>>>> listing of
>>>>> all functions from the PHP files on Drupal. As Drupal uses very little
>>>>> in the way of classes the function list is very long for each module
>>>>> that is used with Drupal. Is there a way to quickly search for a
>>>>> function much like you look for a class (Open Type) / file (Open
>>>>> Resource)???
>>>>>
>>>>> If there is no way, how do I go about making a request to get that
>>>>> functionality added? I don't think it would take much more work as the
>>>>> list of functions is already being done by the indexer.
>>>>>
>>>>> Thanks
>>>>>
>>>>> P.S. I know I could do a search through all the php files to find the
>>>>> function but that includes all calls to the function. I would much
>>>>> rather be able to take advantage of the list that is already in the
>>>>> PHP
>>>>> Project Outline.
>>>>>
>>>>> --
>>>>> Shawn Clark
>>>>
|
|
|
Powered by
FUDForum. Page generated in 0.03755 seconds