Auto Completion Issue |
|
I see the same behavior in 14043, I copied your code and paste it in a new file and the auto completion suggest both method.
|
||||||||||||
|
Site Admin
|
This is not a bug, but rather an intended behaviour.
Your example is too simple and wouln't appear anywhere in real life. Consider the following case. I think it makes it clear why IDE works this way:
there could also be loops, branches and other things that would make it impossible to guess what class instance is assigned to $obj without knowing all values at run-time. |
||||||||||||||
_________________ The PHP IDE team |
|
Well, i understand that behaviour right now.
But saying that "wouln't appear anywhere in real life" is a little bit naive, isn't it? Just a quick example how you maybe come in this situation. It's simple right now but when you have many of those calls with special fields, that uses a lot of parent classes, where you don't know the exact dependencies, than it will be a bit tricky and you may expect (as i) that auto-completion show exactly that things that are available at the moment, like when php executes the code for you. Nevermind, i totally understand the design decision, i just don't like your answer because it's not true saying "wouln't appear anywhere in real life"
|
||||||||||||||
|
Site Admin
|
and what you presented is not what was originally posted and what wouldn't be expected in real life.
To be specific -- you assign a variable with some class instance, then use it, then assign another class instance (seemngly related to the 1st), then use 2nd. In the original sample -- two assignmes are made in a row. This is not that useful |
||||||||||||
_________________ The PHP IDE team |
|
You are right, my first example was just for showing up the issue.
I thought you referenced your answer to the functionality in nusphere and not explicitely to my short example. Seems like we had a little communication mistake here. Anyway, for me the actual PHPEd behaviour make more sense now - Listing more is better than listing to less things - Especially for your "switch" case. It's really depending on how people do the work. |
||||||||||||
|
Auto Completion Issue |
|
||
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