Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Binding from ASt(parsing php code)
Binding from ASt [message #1385849] Wed, 11 June 2014 15:55 Go to next message
Laleh m is currently offline Laleh mFriend
Messages: 9
Registered: May 2013
Junior Member

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?



Re: Binding from ASt [message #1387982 is a reply to message #1385849] Wed, 25 June 2014 21:48 Go to previous message
Dawid Pakula is currently offline Dawid PakulaFriend
Messages: 228
Registered: March 2013
Senior Member
PDT is not using include and require while binding. It always looking for all global functions.

So if you have two functions with same name, PDT will collect return types, and next will use to collect fields/methods.

Same for classes. If your project contain two classes with same name (and namespace), PDT will use both of them.

Previous Topic:Eclipse PHP install problem
Next Topic:Can we debug php code in eclipse helios???
Goto Forum:

Current Time: Sat May 26 17:53:57 GMT 2018

Powered by FUDForum. Page generated in 0.01724 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top