|Binding from ASt [message #1385849]
||Wed, 11 June 2014 15:55
| Laleh m
Registered: May 2013
I am using eclipse pdt to parse php code. I have a question regarding binding.
I resolved the binding for all most all method/function invocations. So I could get for majority of method/function calls, the type (for method invocation) or file (for function invocation) in which the method/function was declared.
I want to know how much the result is accurate?
When opening a php project in eclipse, there are cases where for a function call, eclipse poposes more than one candidate for the actual function decraration (using shortcut keys in eclipse (ctrl+space) to navigate to method/function declaration).
So could it be true that when resolving binding useing eclipse, in cases where there are more than one candidates, eclipse returns the first one as a possible binding?
I could not provide example because you need an actual project, but to see what I mean, I attached an image to explain better:
As you see in the image, for the function call "add_action" in file "plugin.php", eclipse proposes three canddiates (one in the same file and two in files script.php and style.php). However when I resolve binding when parsing the same code, I have only one candiate and it is the add_action function in file "plugin.php" (the first one in the list).
So the question is: can I trust the resolve binding in eclipse and be sure that the actual function is indeed in file plugin.php or eclipse simply retured me the first in the list?
Powered by FUDForum
. Page generated in 0.07105 seconds