Summary: | PHP code completion inside strings should be more intelligent | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Alexander <ashaduri> |
Component: | Language Support: PHP | Assignee: | kdevelop-bugs-null |
Status: | CONFIRMED --- | ||
Severity: | wishlist | ||
Priority: | LO | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Alexander
2009-08-20 11:28:59 UTC
My opinion on this matter: a) no completion in '...' strings b) only completion of variables in "..." strings, and only do auto completion of e.g. member variables or array keys when the first var was prepended by a "{" exception: do only function completion inside '...' or "..." inside call_user_func, function_exists, call-back arguments etc. We should do this since our global PHP file includes pretty much all modules which might not exist at runtime, hence completion would make sense. Also with full project parsing you get all functions of your project, and the function you are looking for will exist _somewhere_ in there. when the call-back argument is an array, first do class completion, then method completion. Low priority though. (In reply to comment #1) > My opinion on this matter: ... Sounds completely reasonable. I guess the a) rule could be applied to heredoc, and b) could be applied to newdoc as well. For b), the member variables are always prefixed with $this-> (AFAIK), so I guess they should be shown only for "...{$this->". Thanks Yes, here- and nowdoc should be handled just like their quoted counterparts. And regarding $this, what about _this_ ;-) $a = new stdClass; $a->b = 1; $foo = "asdf {$a-> => we should get completion for b ;-) (In reply to comment #3) > And regarding $this, what about _this_ ;-) > > $a = new stdClass; > $a->b = 1; > > $foo = "asdf {$a-> > > => we should get completion for b ;-) Ah yes :) I wrongly assumed you were talking about members of the current class, so that members would pop up without $this-> (like in C++). I guess I've been writing in too many languages simultaneously. :) |