Code Completion for Project, Code Snippet, Search ... |
Site Admin
|
Thanks for your comments.
It is the case. Let me know if you get a particular problem with that. A code sample(s) that won't work would be highly appreciated.
Yep, no doubts. This feature is already in our TODO lists.
Will be done the same way as it works in Workspace (incremental search).
|
||||||||||||||||||||
|
|
"It is the case. Let me know if you get a particular problem with that. A code sample(s) that won't work would be highly appreciated. "
My PHPEd version is 3.3.3 (Build 3391 eval) running on Windows XP Pro. I included the entire project; not one function was part of the code completion list. Code Explorer found all of the functions, and list them for me. Thanks! BTW your reply to my questions is amazingly fast! |
||||||||||||
|
Site Admin
|
ahh, surely code completion is smart enough to no waste the space with the full list. If you need a particular function(s) or class(se) to be shown you have to include corresponding file in your source. For example if you have function myFunc defined in myfile.php and you need myFunc to be shown when you edit myfile2.php you have to have include("myfile.php") or require("myfile") appeared somewhere in myfile2.php... otherwise php engine itself won't find the function too...
|
||||||||||||
|
|
Why is this smart? This is the way Zend handles things and it works pretty well. At anytime, working in any given file the project knows that when I call, $mail = new Mailer(); $mail->(I get a list of functions and variables).. Any chance this will be revisted? This is a show killer for me. PHPEd > Debugging than Zend.. But Zend is more user friendly when working with large projects.. Code explorer doesn't due the trick when there is a few hundred classes/functions listed.. |
||||||||||||||
|
|
And actually.. From this thread it looks like it should.. code-insight-when-using-require-once-var-t952.html
However now its stated again that it does not work that way. Can I get some clarifacation as this is the only thing preventing me from going ahead with the PO. PS.. The last version I evaluated was 3.3.2 - 3386Eval and the functionality was still not present. |
||||||||||||
|
Site Admin
|
Fine. Let's go deeper.
Please first post the code sample that replicates the "problem". I think just $mail = new Mailer(); and corresponding include() will be sufficient. |
||||||||||||
|
|
Well the "include" is the problem. These classes and functions are in the project, yet they are included from another file.
Here is some screen shots from Zend. Above we have a fresh project and a blank new file. With out having to have includes or requires called, Zend knows that the obj exists within the project and allows code insight. And the methods and members for that called function.. Now in PHPEd, the include statement is required in EVERY file, for any class or object you are referencing if you want code insight to work. Also, if you use a config and set something like.. define("CLASS_PATH", "/project/includes/classes"); And then in your PHPEd file you use.. include(CLASS_PATH."/my_class.php"); You will also not get any code insight... Like I stated, for small projects this isn't a big concern. But when you are working with a few hundred classes and many files for a single page load, this becomes troublesome because you are constantly switching files to view the arguments for a class or function. Also spending time looking for the name of a certain class.. This is really my only issue with an otherwise great IDE. |
||||||||||||
|
Site Admin
|
What's the advantage to show classes that are not really available at this context and will produce run-time error ?
Not really. my_class.php will be found in the project and used. If it is beyound the project root directory you have to include its directory to Include Path setting in the project properties. No problems so far, isn't it ? |
||||||||||||||
|
|
Well in the project I'm currently working on for example, the class that manages sessions is used through out the project, but is loaded by the index page.
All the index page does is read in the config, load the required classes, setup the db connection, permissions and such. Then based on other paramaters will include what ever other modules/pages/forms. This is done specifically so that I don't have to include these management classes on every page. So the class is available, although it wouldn't appear to be if you looked at this single file. -- Its no huge deal.. If this is not a behavoir you would like to include I can understand, as I can see both sides of the situation. |
||||||||||||
|
Site Admin
|
I think the best solution is to have one option that will turn on/off "globbing" the classes, methods and functions. So when it is on you see all the classes regardless of include statement is there or not. Actually it will even speed up the code completion...
|
||||||||||||
|
|
yeah.. I have the same complaint about the code completion, and I abstain of using of PhpEd because of this. The last sugestion about turning on/off "globbing" of completions is great... I suppose that it is easy to implement.
PS: I have absolutely the same situation like lagsalot. My index includes needed files with functions, then includes content pages, in which I am using functions from files included in index. In content pages I have not explicit include statement, but i need to see defined functions. |
||||||||||||
|
Code Completion for Project, Code Snippet, Search ... |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by