|
newyen, lagsalot, Hmmm, mp: I'm there with you, guys! Same situation, equally unhappy.
ddmitrie: great idea with that "globbing" option. I consider this to be the biggest weakness of PhpEd (actually I thought it was a bug). And don't wait for the 4.0, please. |
||||||||||||
|
|
Count me in too!
The way code completion works right now is only smart for small projects, that is to say for projects where you don't need a professional editor like PHPED anyway! If index.php includes functions.php and later includes content.php, you can't see any of the functions defined in the 1st include while coding the 2nd include. Definitely not smart. "Globbing" should not only be an option, it should be the default option. This is why we define a project anyway. Also, our company already uses PhpED and we've gone mad trying to figure out why we couldn't get this thing to work. We are seriously considering moving to Zend now... is that the only solution? |
||||||||||||
Last edited by fplanque on Fri Mar 25, 2005 12:22 pm; edited 1 time in total _________________ - François PLANQUE |
|
I second that. It would be very helpful if 'phped' stopped trying to be so smart, and think more like us humans. There are several situations i've encountered in the program where it is too smart, and thus pisses me off (simple indentation of code for example is one of those). Anyway, if it were a configurable option to the user I think would be better, because it may be a performance concern why ddmitrie hasn't done it that way. People have complained about huge projects running slowly.. So if he has to go through everything and walk everything all the time polling for updates in a sourcetree with say 5000 php files that could quickly get out of hand. Thinking it through further, he could cull away the unwanted stuff just searching through the includes, which he is doing now, but that is alot of work i'd imagine. Bottom line is unfortunate though because there are definitely instances when you can call a custom class or function without the file where it is defined being officially included/required (for example a template scenario where only the header.tpl file includes the files, but the nav.tpl and footer.tpl also take advantage of the functions header includes -- and the extension is custom (tpl) so phped has no way to know if it should even look for includes/requires/etc). Because of those facts, the best solution IMO would be a toggleable option. Something like ([ ] Search entire project tree for codehints) ... Could even be done in a project scope (which may be even more helpful) and set on the project properties page. Definitely a bummer that zend does something better |
||||||||||||||||
|
Site Admin
|
Actually this scenario works. See: FILE1, named index.php:
FILE2, named localBDDconst.php:
FILE3, named constants.inc.php:
Here you are: |
||||||||||||||||||||
|
Site Admin
|
I'm not sure what finally you're talking about. Really, CodeExplorer in PHPED 3.3 update 3 is reimplemented according to this forum thread. Any further clue noticed? A non-working example would be of more help than a dozen words (Thanks in Advance) |
||||||||||||||
|
|
No not personally, I was just assuming that it was still an issue and trying to figure out how it would be best to politically express agreement with those also desiring the functionality described. |
||||||||||||||||
|
|
No it does *NOT*. I think you misunderstood what I'm trying to tell. You have proven that if file A includes B and B includes C, then A can "insight" the definitions made in C. Yes, I agree recursivity is woking. What is not working is this: File A includes B. File A later includes C. When you are editing C, you cannot "insight" definitions made in B. Is this clearer? In a lot more words: File a.php:
file b.php:
file c.php
Furthermore: If I type
I don't get code insight either for my global variable, in order to type this:
(I am using version 3.3.3 buil 3397) |
||||||||||||||||||||||||||||
_________________ - François PLANQUE |
Site Admin
|
Hi François,
good example, thanks. Fortunately, there is a workaround for your case. You can require_once() all the files with classes w/o breaking the functionality... BTW, as far as I know, in most cases, people use a little different approach when they organize their code. All php files are grouped into two (or more) groups. First one represents a library which contains all classes and functions to be used by other files. And latter do require_once the files from the first group. Moreover, in many cases the library is moved off the web tree as it's often not safe to have them there. I think that's the case for example with PEAR and many other 3rd party libraries. |
||||||||||||
|
|
ddmitrie,
I am glad you got our point here in the end. However I think it's a pity you are understating this issue... Yes I know how people would include include files and then develop a web page by using what's been included. However, this is only what happens for small projects. Great for demoing PHPEd, but that's not how it works in the real world. 1) In the real world, people do write the include files themselves (vs using prewritten include files) and some of the include files make use of objects defined in another include file! (do I really need to come up with yet another example for this?) 2) In the real world, people use code structures which are a little more complex than a:include+b:code . One of them is the MVC aka Model-View-Controller paradigm. I only use this example because it's a well known concept, not because it's necessarily the best. Anyway in this paradigm it is explicitely stated that the page output should be handled in a separate (INCLUDE) file and not in the "main" file. I really think you guys are really good at coding PHPED in C++ (or whatever it is) but you might not be practicing large application development in PHP on a regular basis... As a matter of fact, if you carefully re-read this thread you'll see how many developers use code structures far more complex than a:include followed by b:code. Please listen to us! If we were only including a few prewritten libraries and write some code after that, we would not need something like NuSphere PHPED! Regarding the workaround, require_once on multiple includes files isn't very efficient, here's what I've been doing so far (if it can help someone else): (The following would be file c.php in the example above)
|
||||||||||||||
Last edited by fplanque on Wed Mar 30, 2005 11:48 am; edited 1 time in total _________________ - François PLANQUE |
|
Well, before it's getting too hot here... I've seen the "globbing" feature in the 4012 beta, and it seems to work for me, although I cannot judge if the performance hit is critical.
So the problem reduces to "when will the next version be relased" ? |
||||||||||||
|
|
Yes, the "globbing" feature would definitely take some pain out of the process... however, thinking a little more about it, I think ddmitrie is right when stating it would pollute the insight significantly... For example, I have a project here where I have included PhpMyAdmin into the project tree. If I turned on the "globbing", I would start to see PhpMyAdmin internals in code insight all over the place. So, as a matter of fact, selectively specifying which files we need code insight to be aware of isn't that bad... Except doing it with extra includes is ugly, especially when you participate in an open source project. Other devs who are not using PHPED won't understand why the extra includes. Now it seems to me there's a smart way to handle this by taking advantage of the @uses tag from PHPDocumentor. The earlier mantioned example would then look like this: (c.php)
What do you think? Wouldn't it make sense for code insight to react to thoses @uses ? This way you don't put any extra include/require/once statements into your code. phpdoc for @uses: http://manual.phpdoc.org/HTMLSmartyConverter/PHP/phpDocumentor/tutorial_tags.uses.pkg.html |
||||||||||||||||
_________________ - François PLANQUE |
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